Closed Tongbcc closed 7 months ago
Have you tried passing approx = FALSE
to RunPCA
? It's possible that the irlba
is doing some parallelization under the hood that isn't subject to mc.cores
or future::plan
.
As an aside, it's pretty striking that you are trying to find 800 principal components - why so many?
Have you tried passing
approx = FALSE
toRunPCA
? It's possible that theirlba
is doing some parallelization under the hood that isn't subject tomc.cores
orfuture::plan
.As an aside, it's pretty striking that you are trying to find 800 principal components - why so many?
Thank you for your suggestion. I have tried passing approx = FALSE
to RunPCA
, but it didn't work. I chose to use 800 PCs based on the method described by Mah, J.L. & Dunn, C.W. in their paper "Cell type evolution reconstruction across species through cell phylogenies of single-cell RNA sequencing data". Using a larger number of PCs can better preserve the evolutionary relationships between cell types when constructing the phylogenetic tree of cell types using continuous variables.
When running the 'RunPCA()' function, it occupies all remaining threads in the system. Since I need to calculate a large number of PCs, the computation takes a long time, which is not allowed by our regulations. When I use
options(mc.cores = 15)
andneither of these methods is effective. The following is the origin codes: