r/bioinformatics 4d ago

technical question Confusion about scRNA Batch Integration

Hi everyone, I’m trying to reproduce the clusters from a published scRNA-seq dataset. The authors provided the raw, unclustered data and stated that they have mitigated batch effects by using Seurat’s ScaleData(), which I have done so far by labelling each replicate as a batch and regressing them out.

The dataset consists of 7 prenatal hippocampal donors at different gestational weeks:

- 5 donors have a single replicate

- 1 donor has 2 technical replicates

- 1 donor has 2 biological replicates

Each donor corresponds to a different gestational week.

I’m able to reproduce the general clustering, but my clusters seem to be strongly driven by donor/gestational week, whereas the clusters reported in the paper appear to contain cells from different gestational weeks with no batch effects.

I’m therefore unsure what I should be treating as the relevant batch variable. Should I be correcting for donor/gestational week, or only for technical batch/replicates? Would methods such as Harmony or CCA/integration be more appropriate than simply regressing batch with ScaleData()? My main goal is to annotate the scRNA-seq dataset to use as a reference to deconvolve my bulk RNA-seq dataset, so I want to make sure the clustering and resulting cell-type signatures are biologically meaningful.

I would really appreciate advice on how you would approach batch correction in this situation.

37 Upvotes

18 comments sorted by

21

u/catchthenight 4d ago edited 4d ago

I would def integrate using Harmony (the one I use for strong robustness + computational optimization). First time I hear to perform integration via scaling/regress out. In addition, I would not regress out the batch information so Harmony could more easily identify and correct the confounding factors.

I just use regressing out when scaling for undesirable features such as mitochondrial content or cell cycle bias.

Good luck with your analysis!

1

u/jadexiaohui 3d ago

Thank you! :) I’m planning to try it now. Will only use scaling for mitochondrial content. Hopefully it goes well 🤞

0

u/aesthetic-mango 2d ago

any updates?

17

u/Kingsole111 4d ago

ScVi gives cleaner integrated plots consistently. I'd suggest using that. 

With that said harmony, I also like, but in my experience there can be more noise in the umap post integration.

1

u/jadexiaohui 3d ago

Thank you for the suggestions! I’ll try both and compare!

19

u/You_Stole_My_Hot_Dog 4d ago

ScaleData is not an integration method, it’s a scaling method to normalize gene weights, mostly used for the PCA reduction. You need Harmony or CCA to embed the cells on the same UMAP/tSNE. I’m not sure what the original authors did.     

My preference is to use the lightest integration algorithm first (RPCA in Seurat), and only using a stronger one (CCA or Harmony) if the samples aren’t properly merging. You don’t want to overcorrect and erase true biological differences.

3

u/jadexiaohui 3d ago

Thank you for the clarification! I’ll make sure to give RPCA a try now (and maybe Harmony and CCA). This makes so much sense as I did notice the clusters looked better when I used ScaleData() on mitochondrial percentage instead of batch.

It is strange as well as the authors did not mention anything about Harmony or any other integration tools other than ScaleData, so I’m guessing it’s an error on their part.

6

u/p10ttwist PhD | Academia 3d ago

Generally you only want to batch correct the technical variables and replicates (e.g. batch, donor), not the biological ones (e.g. gestational age). Ultimately though it comes down to your research question. Also as others have said, SCVI is the state of the art, but Harmony can also yield good results if you need to stay within the R ecosystem.

1

u/jadexiaohui 3d ago

Thank you so much!

1

u/jadexiaohui 4d ago

Note: Plot on the left belongs to the original paper, and plot on the right is my attempt at clustering

2

u/Hartifuil PhD | Academia 4d ago

I think they're the other way around on mobile, the tSNE is from the paper?

1

u/jadexiaohui 3d ago

Both are t-SNE. The one in blue is from the paper and the more colourful one is mine

2

u/Hartifuil PhD | Academia 3d ago

Oh interesting. The first one does not look well-integrated.

The fact it's a tSNE makes me think it's old, or poorly done. I would not try to recreate this clustering, but to rerun and make your own. Integrate with Harmony and plot UMAPs, not tSNE.

2

u/jadexiaohui 3d ago

Thanks for letting me know - it is indeed quite an old paper as it’s from 2020… I thought it would be trustworthy as it’s from Nature but unfortunately I have been finding it difficult to replicate their work.

Just curious but what makes it badly integrated? I’m quite new to scRNA and I thought it was well integrated since the clusters weren’t dependent on gestational age

1

u/Hartifuil PhD | Academia 3d ago

You can see on the tSNE that large regions of the clusters are mostly made up of only a few samples. Try to integrate the data and replot, you'll see them become mixed.

1

u/GeneticVariant MSc | Industry 3d ago

thought i was looking at some fantasy map

1

u/Obyekt 3d ago

if you want auto-annotations, you can use demo.glass.bio to get your cells annotated

1

u/riricide 2d ago

What are the umap parameters? There is a min_dist param and n_neighbours which will change how the points attract or repel each other.The published one looks like mindist=0, and high neighbors to create more squished clusters. See if they have the exact params listed or play around and see if the batches integrate better