Closed y9c closed 12 months ago
@yech1990 what are some of the constraints you are talking about? I'm also trying to cut down processing time by using as many cores/threads as possible in the parallelizable stages. I think generating fastqs and alignment are both completely parallelizable, but am struggling to optimize cellranger's use of cores on my machine.
This line hard codes the thread.
https://github.com/10XGenomics/cellranger/blob/5f5a6293bbc067e1965e50f0277286914b96c908/lib/python/cellranger/utils.py#L502 https://github.com/10XGenomics/cellranger/blob/5f5a6293bbc067e1965e50f0277286914b96c908/lib/python/cellranger/io.py#L32
I think change 4
to os.cpu_count()
or multiprocessing.cpu_count()
can speed up.
The
_BASIC_SC_RNA_COUNTER.ALIGN_READS
(STAR alignment) step incellranger count
pipeline is ultra slow. The default setting of cellranger split the file int 96 chunks and alignment run one by one in a sequential order. Meanwhile each STAR alignment run use only 4 CPU core. Seems this is the bottleneck of the whole pipeline.Some of other tools in cellranger can detect the core number in host machine and utilize the CPU usage.
Increase the
threads
number incellranger-cs/3.0.2/mro/sc_rna_counter_cs.mro
will doube the performance, but there is still other constraints in the settings.