You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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.
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
The text was updated successfully, but these errors were encountered: