Keeping the Gene names when calculating delta Variance
Opened this issue · 2 comments
Hi,
In the readme, you suggest that the delta variance for a DE gene should be checked, and that DE genes that also have "high" variance are likely false positives. It would be great if the calculation of delta-variance would include the gene name, either by ouputing a list of dataframes with the gene name, or by some other methods
Currently,
DV <- calculate_delta_variance(input = Seurat)
Creates a list of vectors of variances, with no gene level information.
So, in order to relate the statistical significance of a gene to the delta variance, I'm assuming the DVs calculated are given in the same order as the genes listed in the differential expression output, and am appending the delta variance like so:
# Calculate Differential Expression matrix
DE_MAST <- run_de(input = Seurat, de_family = 'singlecell', de_method = 'MAST', de_type = '')
# Filter for specific cell type
DE_MAST_A <- DE_MAST[(MAST$cell_type == 'A'),]
# Add Delta_Variance of cell type "A" to the DE matrix in a new column
DE_MAST_A$Delta_V<- DV$A
This seems like a reasonable way to do this, and can be easily looped for each of the different cell types, but it would be great if the calculate_delta_variance() function would could output the results in a way to minimize the necessary downstream steps.
Thanks again!
Robert
Hi Robert - I pushed a fix to add the gene names.
Thank you!