Define a cluster to use.
define_cluster(cores = "mc.cores", ...)
The argument to use to define the number of cores. This is useful for cases with nested parallelizations.
Advanced arguments are:
If 1 (default), then SerialParam will be used. If greater than 1, then it specifies the number of workers for SnowParam.
Passed to log
when using
SnowParam.
If specified, that's the BPPARAM that will be used.
A BiocParallel *Param object
This function is used internally in many functions.
## Use SerialParam()
define_cluster(mc.cores = 1)
#> class: SerialParam
#> bpisup: FALSE; bpnworkers: 1; bptasks: 0; bpjobname: BPJOB
#> bplog: FALSE; bpthreshold: INFO; bpstopOnError: TRUE
#> bpRNGseed: ; bptimeout: NA; bpprogressbar: FALSE
#> bpexportglobals: FALSE; bpexportvariables: FALSE; bpforceGC: FALSE
#> bpfallback: FALSE
#> bplogdir: NA
#> bpresultdir: NA
## Note that BPPARAM.custom takes precedence
define_cluster(mc.cores = 2, BPPARAM.custom = BiocParallel::SerialParam())
#> class: SerialParam
#> bpisup: FALSE; bpnworkers: 1; bptasks: 0; bpjobname: BPJOB
#> bplog: FALSE; bpthreshold: INFO; bpstopOnError: TRUE
#> bpRNGseed: ; bptimeout: NA; bpprogressbar: FALSE
#> bpexportglobals: FALSE; bpexportvariables: FALSE; bpforceGC: FALSE
#> bpfallback: FALSE
#> bplogdir: NA
#> bpresultdir: NA