Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keeping the Gene names when calculating delta Variance #20

Open
RobertWhitener opened this issue May 17, 2022 · 2 comments
Open

Keeping the Gene names when calculating delta Variance #20

RobertWhitener opened this issue May 17, 2022 · 2 comments

Comments

@RobertWhitener
Copy link

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

@jordansquair
Copy link
Collaborator

Hi Robert - I pushed a fix to add the gene names.

@RobertWhitener
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants