This function will set the number of threads to be used for parallel computing across all ArchR functions.

addArchRThreads(threads = floor(parallel::detectCores()/2), force = FALSE)

Arguments

threads

The default number of threads to be used for parallel execution across all ArchR functions. This value is stored as a global environment variable, not part of the ArchRProject. This can be overwritten on a per-function basis using the given function's threads parameter.

force

If you request more than the total number of CPUs minus 2, ArchR will set threads to (nCPU - 2). To bypass this, setting force = TRUE will use the number provided to threads.

Examples


# Add ArchR Threads
addArchRThreads()