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

SCTransform residuals for differential gene expression using all genes in split vs merged object #2489

Closed
marcusbasiri opened this issue Jan 9, 2020 · 1 comment

Comments

@marcusbasiri
Copy link

Hello,

I would like to run differential expression on the residuals from SCTransform following integration. Integration was run using only a subset of features, so I currently only have the residuals for a fraction of the total features in @scale.data. However, I would like to perform the LRT using all genes.

Since the object was split by sample prior to SCTransform() and integration, the current residuals were calculated based on each sample independently. Therefore, running GetResidual() on the integrated object generates different residuals for features that were originally calculated on the split object before SCT+integration.

Just wondering what is the most appropriate way of doing this? Should I run GetResidual() for all genes on the merged object and use these as input for differential expression, or should I split the object again, calculate residuals, and then merge?

Thanks,

Marcus

@satijalab
Copy link
Collaborator

Very sorry for the slow reply. This is not an easy question to answer, but I understand the motivation.

Because SCTransform normalizes each sample based on a model of technical noise constructed for its individual characteristics, running SCTranform separately on two objects, merging them, and then performing DE is not recommended.

One option would be to rerun SCTransform based on the merged object after integration (using the RNA assay), and use those values. I recognize this does require multiple runs (one on each object separately to faciltate integration, one on the merged object to facilitate consistent pearson residual calcuation for DE). The other option would be to use the RNA assay for DE after integration.

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

1 participant