-
Notifications
You must be signed in to change notification settings - Fork 889
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
Question regarding Cell Cycle Scoring and sctransform order #1679
Comments
In the |
Yes, I understand that, but that's not my question. Is running the |
Thanks for the question, and this is indeed a bit complex. I would recommend exactly the procedure you list out above. Make sure you run |
Hi, why not run SCTransform, then evaluate cell cycle, than apply again SCTransform using vars.to.regress ? This should avoid using the old NormalizeData, using the more robust sctranform. Am I wrong? |
I had the exact same thought as @atermanini , I'm assuming it should be okay? |
Same question, as raised above by @atermanini !! Would be great if @satijalab could please comment :) Thanks a tonne!! |
I think both approaches would be valid. We have not tested the latter (running SCTransform twice), but it should in principle be slightly more robust if there are substantial differences in sequencing depth across cells. |
If we are running SCtransform twice, should we set |
I think you should run SCTransform with the same parameters both times. seurat <- SCTransform(seurat, assay = 'RNA', new.assay.name = 'SCT', ...)
seurat <- CellCycleScoring(seurat, ...)
seurat <- SCTransform(seurat, assay = 'RNA', new.assay.name = 'SCT', vars.to.regress = ...) Otherwise you would normalise the already normalised data, no? You just need the first run of |
hi romanhaa, I see your point but I am not sure if assay "RNA" is original data or not, i guess that is the main gap in my knowledge. if RNA remains "unnormalized" data and and i calculate cell cycle regression based on SCT assay, then i'm not really combining the power of 2 SCTransform calculations, I'm just replacing my first regressed dataset on one set of variables with a second regression dataset on another set of variables. Let me go through the two scenarios I'm thinking about:
And here's the next one
Looking forward to hearing from the community! |
Each assay has two slots for the expression data + an additional which might contain fewer genes than the other two.
When you initialise your Seurat object, both Now, I don't have a lot of experience with the
Based on this, my proposal is the following: # normalize data with SCTransform()
sample <- SCTransform(
sample,
assay = 'RNA',
new.assay.name = 'SCT',
vars.to.regress = c('percent.mt', 'nFeature_RNA', 'nCount_RNA')
)
# perform cell cycle analysis (make sure to specify the "assay" parameter
sample <- CellCycleScoring(
sample,
s.features = s.genes,
g2m.features = g2m.genes,
assay = 'SCT',
set.ident = TRUE
)
# normalise again but this time including also the cell cycle scores
sample <- SCTransform(
sample,
assay = 'RNA',
new.assay.name = 'SCT',
vars.to.regress = c('percent.mt', 'nFeature_RNA', 'nCount_RNA', 'S.Score', 'G2M.Score')
) This should then overwrite the data in the Hopefully a Seurat developer will call me out if I'm wrong :) |
Hello @romanhaa , @anoronh4 , @j-andrews7 , @yuhanH , Just wanted to check in as to which of the above-discussed methods you all tried, and at this date, how did your results turn out, and which of the methods (NormalizeData followed by SCT, or running SCT twice) would you recommend? Many thanks for any responses, and am looking forward to hearing your views! |
I tried both and doing nothing at all with cell cycle, saw little difference, and stopped caring about cell cycle phases in my data. 🤷♂ |
Similar to what @j-andrews7 said, not much has come from it. I have been trying both of these approaches and even tried regressing out the difference between G2M and S scores. I have yet to to come across a dataset where it made a difference -- the phases don't even look less separated to me in the PCA plot! -- and I process datasets from lots of different tissue types. i keep it in my code simply because it is recommended, but that's about it. |
Hi,
In the Cell Cycle regression vignette, you run
NormalizeData
before assigning the Cell Cycle scores. However, sinceSCTransform
combines the normalization and scaling steps, I was wondering if it's valid to perform Cell Cycle scoring on the raw data prior to runningSCTransform
so that they can properly be used for regression. Or would the proper approach be to run SCTransform, add the Cell Cycle scores, and then run it again to regress out the differences?Thanks.
The text was updated successfully, but these errors were encountered: