setThreads: Set the number of threads to use for parallel processing in...

View source: R/utilities.R

setThreadsR Documentation

Set the number of threads to use for parallel processing in Seurat

Description

Set the number of threads to use for parallel processing in Seurat

Usage

setThreads(n = NULL, verbose = TRUE)

Arguments

n

Number of threads (>= 1) to use for processing. If NULL, will be set to (available cores / 2).

verbose

Whether to print the number of threads set and available cores to the console

Details

The default is one thread. Calling setThreads() without specifying n selects half the available cores. This setting applies to supported C++ kernels in NormalizeData, FindVariableFeatures, ScaleData, SCTransform, RunPCA, FindNeighbors, FindClusters, and CCA/RPCA integration. RunUMAP also passes this setting to the uwot backend. Support depends on the input type, backend, and arguments; not every stage of these functions can be run in parallel.

Note that this thread setting is separate from plan.

See Also

getThreads


Seurat documentation built on Oct. 3, 2026, 5:06 p.m.