satijalab / sctransform

R package for modeling single cell UMI expression data using regularized negative binomial regression
GNU General Public License v3.0
213 stars 33 forks source link

"vars.to.regress" not working #174

Closed xiao00su closed 1 year ago

xiao00su commented 1 year ago

after upgrade Seurat to ”V5“,the cell cycle effects seems could not regress out after SCTransform program. Whether the vars.to.regress = c( "S.Score", "G2M.Score" ) is set or not, I got the same clustering results. Anything wrong with my code?

cc.genes$s.genes <- tolower(cc.genes$s.genes) %>% str_to_title()
cc.genes$g2m.genes <- tolower(cc.genes$g2m.genes) %>% str_to_title() 
gfaps <- SCTransform(gfaps, vst.flavor = "v2", assay = "RNA", new.assay.name = "SCT", variable.features.n = 5000,
                     do.scale = T, do.center = T, return.only.var.genes = T, verbose = T,  vars.to.regress = c( "S.Score", "G2M.Score"  ) ) 

Regressing out S.Score, G2M.Score |===========================================================================================| 100%

E18Ctx_E17_noReg E18Ctx_E17_noReg

saketkc commented 1 year ago

Can you update to Seurat 5.0.1 and check again? This was fixed in the latest release.

xiao00su commented 1 year ago

Can you update to Seurat 5.0.1 and check again? This was fixed in the latest release. My Seurat version is already 5.0.1 form CRAN. Do I need to install the package from github?

xiao00su commented 1 year ago

Hi Saket, My Seurat version is 5.0.1 form CRAN. I try the developer version of Seurat from github and different version of SCTransform, the problem remains unresolved. Cell cycle effect can be successfully regressing out using ScaleData function.

Xiaosu

Saket Choudhary @.***> 于2023年11月23日周四 17:04写道:

Closed #174 https://github.com/satijalab/sctransform/issues/174 as completed.

— Reply to this email directly, view it on GitHub https://github.com/satijalab/sctransform/issues/174#event-11044863951, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQHE2HY2KEVY5DHORZR5RILYF4GSRAVCNFSM6AAAAAA7XMTLVCVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJRGA2DIOBWGM4TKMI . You are receiving this because you authored the thread.Message ID: @.***>