satijalab / seurat

R toolkit for single cell genomics
http://www.satijalab.org/seurat
Other
2.26k stars 905 forks source link

Code no longer produces the same UMAP DimPlot after integration #9022

Closed ptk1601 closed 3 months ago

ptk1601 commented 3 months ago

Hello!

Today I re-ran some Seurat code, and I went through my usual pipeline. Before integrating my data, I was able to reproduce everything. And then after integrating my data, the clustering in the UMAP DimPlots were no longer the same clusters I had observed in prior analyses with the same exact code. I do not believe this is an issue with the RunUMAP function as it worked before integration, and I have restarted my computer as well as un-installed and re-installed Seurat with a clean R environment. Is there anything else I can do to try and reproduce my original data?

Thank you,

ptk1601 commented 3 months ago

Update - I have just tried re-running some code from another .R file of mine that involves integrating Seurat data. I was successfully able to reproduce my prior clustering analyses even after integrating with the code in this .R file. Could there potentially be an issue with the specific .R file I am working with for the code that I discussed in my first post?

changve commented 3 months ago

You can try setting the same seed for reproducibility with set.seed() and any number.

zskylarli commented 3 months ago

Hi - thank you for the question! Just as @changve has suggested, you should set a random seed to ensure reproducibility (although this will be difficult to do retrospectively), and also double-check if any parameters have been changed, such as the clustering resolution in FindClusters. If you are concerned that there is an issue with your code, please provide a minimal reproducible example that demonstrates the difference between your previous and current outputs.

Just to add that we’ve started asking users to direct questions like this to our Discussions board, where community members and developers can provide more targeted assistance. We’re going to close this issue for now but strongly encourage you to repost your question in the other forum!