This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Integration with Harmony using seurat object + SCTransform

Hi, so I have a few scRNAseq that I would like to integrate using harmony. My 10x are in seurat format and I would like to use SCTransform.

A question I have is during SCTtransform should I also regress out each of the sample "orig.indent" as well. I find that if regressing it out seem to work better but I don't know if this is legit to do? can anyone comment on this?

seurat <- SCTransform(seurat, vst.flavor = "v2", verbose = TRUE, vars.to.regress=  c("percent.mt", "orig.ident" )  ) 
# vs. 
seurat <- SCTransform(seurat, vst.flavor = "v2", verbose = TRUE, vars.to.regress=  c("percent.mt" )  ) 

Here is the entire code

n = names ( slist ) 

seurat <- merge(slist[[ n[1] ]]
                , y = c(slist[[ n[2] ]], slist[[ n[3] ]],
                        slist[[ n[4] ]] ,  slist[[ n[5] ]]  

                )
                , add.cell.ids =  c( n) , project = "test")


# 
## should I regress out each sample as well? or leave it. 
seurat <- SCTransform(seurat, vst.flavor = "v2", verbose = TRUE, vars.to.regress=  c("percent.mt", "orig.ident" )  ) 
## OR 

seurat <- SCTransform(seurat, vst.flavor = "v2", verbose = TRUE, vars.to.regress=  c("percent.mt" )  ) 

seurat <- seurat %>% 
  RunPCA(npcs = 30, verbose = FALSE) %>%
  RunUMAP(reduction = "pca", dims = 1:30, verbose = FALSE) %>%
  FindNeighbors(reduction = "pca", dims = 1:30, verbose = FALSE) %>%
  FindClusters(resolution = 0.7, verbose = FALSE)



pbmc_harmony <- seurat %>% RunHarmony( c ( "orig.ident" ) , plot_convergence = T, assay.use="SCT" )
sctransform seurat scrnaseq

hi, I have the same problem as you. Have you solved it?

seurat <- SCTransform(seurat, vst.flavor = "v2", verbose = TRUE, vars.to.regress= c("percent.mt", "orig.ident" ) ) ------Is it correct? THANKS

0 answers

No answers yet.

Log in to answer this question.