Integration with Harmony using seurat object + SCTransform
0
0
Entering edit mode
7 weeks ago
simplitia ▴ 120

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 • 175 views
ADD COMMENT

Login before adding your answer.

Traffic: 1564 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