cantinilab / scconfluence

A novel method for single-cell diagonal integration: scConfluence
https://scconfluence.readthedocs.io/en/latest/
14 stars 0 forks source link

analyses on multi samples? #2

Closed rLannes closed 6 months ago

rLannes commented 6 months ago

Hi, first thank you for providing these tools, I ran a few preliminary tests, and it looks to achieve very good results.

I have one question: I have multiple pairs of scRNA and scATAC data from the same samples (not multiomics). I tested each sample individually and achieved great results using scConfluence. (scRNA + scATAC from the same sample integrates well)

However, I was wondering what would be the best approach if I wanted to integrate my samples together, i.e., scRNA S1 + scRNA S2 with scATAC S1 + scATAC S2.

Should I merge my samples after performing quality control and then run scConfluence on the merged data?

Do you recommend this practice? Have you ever tried such analyses?

Best regards, Romain

jules-samaran commented 6 months ago

Hi Romain, Thanks for using scConfluence and raising this question!

The model should be able to take into account the presence of multiple samples (through the use of a conditional decoder like in scVI). To do so, you should put all the samples in a single MuData object and register for each modality the sample of origin of the cells in mdata.mod[modality].obs["batch_index"] (not in mdata.obs). Then, when initializing each modality's Autoencoder, you'll just have to specify batch_key="batch_index" like in this tutorial. Some of our experiments contained multiples samples (with a strong batch effect) which were successfully integrated this way by scConfluence.

However, if in your case you find the different samples to be not sufficiently integrated in the latent space, you might want to perform batch correction during the preprocessing (additionally to what I described above). We haven't tried this but it is perfectly compatible with our workflow.

I hope this answers your question, don't hesitate to ask me if anything's not clear!

rLannes commented 6 months ago

Thank you for your prompt answer, I'll try it and come back to you if I have questions!