Seurat sctransform return.only.var.genes = FALSE
2
0
Entering edit mode
4.6 years ago
Lucy ▴ 140

Hi,

If I set return.only.var.genes = FALSE for sctransform in Seurat, will RunPCA use all genes by default or only variable genes (as it would with return.only.var.genes = TRUE)? I am struggling to find the relevant code on their GitHub. If anyone could point me in the direction of that code, that would be really helpful.

Best wishes,

Lucy

scRNA-seq Seurat sctransform • 3.6k views
ADD COMMENT
1
Entering edit mode
4.6 years ago

I think it will use all genes. This is the code from their GitHub:

if (return.only.var.genes & !conserve.memory) {

scale.data <- vst.out$y[top.features, ]

} else {

scale.data <- vst.out$y

}

ADD COMMENT
1
Entering edit mode

Thanks - that's really helpful. However, I am a bit confused as my UMAP seems to look they same whether I set return.var.only.genes = TRUE or return.var.only.genes = FALSE.

ADD REPLY
1
Entering edit mode
4.6 years ago

This information is available in the manual. RunPCA will only use the variable features unless you specify otherwise via the features parameter. RunUMAP uses PCA reductions by default, though you can force it to run on features directly with the features parameter (probably not what you want, and will take much, much longer to run).

ADD COMMENT
0
Entering edit mode

Thank you - that makes sense with the data that I have been getting. Do you know where in the code this is specified?

ADD REPLY
1
Entering edit mode

Those are just the default parameters for each specified function. You can see them in the manual or using ?RunPCA, etc in RStudio.

ADD REPLY

Login before adding your answer.

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