remove batch effect
1
1
Entering edit mode
21 months ago
Andy ▴ 120

Good afternoon,

I integrated about 20 studies on different organs and used merge to combine them, followed by using harmony to remove the batch effect. However, the UMAP plot I generated did not successfully remove the batch effect, as several clusters were just from one study and did not overlap with the other studies. I am seeking advice on the best way to remove the batch effect for pan-cancer studies. I have read articles on pan-cancer research, such as the Pan-cancer single-cell landscape of tumor-infiltrating T cells, and noticed they also use harmony. I am wondering if I need to adjust my harmony code. Can you please offer some advice?

Here is my harmony code:

library(harmony) combine_datalist<-SCTransform(combine_datalist) %>%RunPCA() combine_datalist<-RunHarmony(combine_datalist, group.by.vars="study", assay.use="SCT", max.iter.harmony=40, max.iter.cluster = 40, kmeans_init_nstart=20, kmeans_init_iter_max=100)

harmony • 1.6k views
ADD COMMENT
2
Entering edit mode
21 months ago

This doesn't answer the harmony question directly, but I've found with complex datasets often scVI is the only method (of the more popular ones) that can handle large batch effects and sample diversity for integration.

Seurat v5 adds scVI support via a reticulate wrapper function, but until a stable release I would recommend running it in Python directly or through reticulate yourself.

ADD COMMENT
1
Entering edit mode

interesting that I've never heard of scVI yet it is highly cited and the github is highly starred

The highly influential benchmark study came out 2 years after the scVI paper came out yet it didn't even mention this method... bizarre?

ADD REPLY
0
Entering edit mode

Thanks for the info. I just started learning bioinformatics a few months ago, and I mainly work with R instead of Python. It's really helpful for me to know about different approaches for integration and batch effect removal methods. I'm going to try this out.

ADD REPLY
0
Entering edit mode

Good evening,

I am trying to use scVI method to do the integration. But I meet a lot problems. I am wondering if you could offer me some support? The only tutorial I found for now is from this website, https://docs.scvi-tools.org/en/stable/tutorials/notebooks/scvi_in_R.html. Are there any other sources available?

Best Andy

ADD REPLY
0
Entering edit mode

What code are you trying to run and what problem are you encountering?

ADD REPLY
0
Entering edit mode

I am trying to run it on R, but I meet the error when I run

adata <- convertFormat(data, from="seurat", to="anndata", main_layer="counts", drop_single_values=FALSE).

And the error message said:

Error in compareVersion(as.character(obj@version), "3.0.0") : trying to get slot "version" from an object of a basic class ("function") with no slots.

I am clear what is the problem, and also I did not find other tutorial, this is why I ask please give me more suggestions.

ADD REPLY

Login before adding your answer.

Traffic: 2031 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6