BiocParallelParam objects

The BiocParallelParam virtual class stores configuration parameters for parallel execution. Concrete subclasses include SnowParam, MulticoreParam, BatchJobsParam, and DoparParam and SerialParam.

classes, methods

BiocParallelParam is the virtual base class on which other parameter objects build. There are 5 concrete subclasses:

SnowParam: distributed memory computing

MulticoreParam: shared memory computing

BatchJobsParam: scheduled cluster computing

DoparParam: foreach computing

SerialParam: non-parallel execution

The parameter objects hold configuration parameters related to the method of parallel execution such as shared memory, independent memory or computing with a cluster scheduler.


The BiocParallelParam class is virtual and has no constructor. Instances of the subclasses can be created with the following:

  • SnowParam()
  • MulticoreParam()
  • BatchJobsParam()
  • DoparParam()
  • SerialParam()


Back-end control In the code below BPPARAM is a BiocParallelParam object.

bpworkers(x, ...), bpworkers(x, ...): integer(1) or character(). Gets the number or names of the back-end workers. The setter is supported for SnowParam and MulticoreParam only.
bptasks(x, ...), bptasks(x) <- value: integer(1). Get or set the number of tasks for a job. value must be a scalar integer >= 0L. This argument applies to SnowParam and MulticoreParam only; DoparParam and BatchJobsParam have their own approach to dividing a job among workers. We define a job as a single call to a function such as bplapply, bpmapply etc. A task is the division of the X argument into chunks. When tasks == 0 (default), X is divided by the number of workers. This approach distributes X in (approximately) equal chunks. A tasks value of > 0 dictates the total number of tasks. Values can range from 1 (all of X to a single worker) to the length of X (each element of X to a different worker). When the length of X is less than the number of workers each element of X is sent to a worker and tasks is ignored. Another case where the tasks value is ignored is when using the bpiterate function; the number of tasks are defined by the number of data chunks returned by the ITER function.
bpstart(x, ...): logical(1). Starts the back-end, if necessary.
bpstop(x, ...): logical(1). Stops the back-end, if necessary and possible.
bpisup(x, ...): logical(1). Tests whether the back-end is available for processing, returning a scalar logical value. bp* functions such as bplapply automatically start the back-end if necessary.
bpbackend(x, ...), bpbackend(x) <- value: Gets or sets the parallel bpbackend. Not all back-ends can be retrieved; see showMethods("backend").
bpprogressbar(x, ...), bpprogressbar(x) <- value: Get or set the value to enable text progress bar. value must be a logical(1).
bpjobname(x, ...), bpjobname(x) <- value: Get or set the job name.
Error Handling In the code below BPPARAM is a BiocParallelParam object.
bpcatchErrors(x, ...), bpCatchErrors(x) <- value: logical(). Controls if errors are caught and returned with completed results. catch.errors determines whether errors are caught and returned with other results. When TRUE, all computations are attempted and output contains both errors and successfully completed results. When FALSE, the job is terminated as soon as the first error is hit and only the error message is returned (no results); this is the default behavior of the parent packages, e.g., parallel, snow, foreach.
bpstopOnError(x, ...), bpstopOnError(x) <- value: logical(). Controls if the job stops when an error is hit. stop.on.error controls whether the job stops after an error is thrown. When TRUE, the output contains all successfully completed results up to and including the error. Unlike catch.errors == TRUE, when stop.on.error == TRUE all computations stop once the error is hit. When FALSE, the job runs to completion and successful results are returned along with any error messages.


Evaluation In the code below BPPARAM is a BiocParallelParam object. Full documentation for these functions are on separate man pages: see ?bpmapply, ?bplapply, ?bpvec, ?bpiterate and ?bpaggregate.

bpmapply(FUN, ..., MoreArgs=NULL, SIMPLIFY=TRUE, USE.NAMES=TRUE, BPPARAM=bpparam())
bplapply(X, FUN, ..., BPPARAM=bpparam())
bpvec(X, FUN, ..., AGGREGATE=c, BPPARAM=bpparam())
bpiterate(ITER, FUN, ..., BPPARAM=bpparam())
bpaggregate(x, data, FUN, ..., BPPARAM=bpparam())
Other In the code below BPPARAM is a BiocParallelParam object.

See Also

  • SnowParam for computing in distributed memory

  • MulticoreParam for computing in shared memory
  • BatchJobsParam for computing with cluster schedulers
  • DoparParam for computing with foreach
  • SerialParam for non-parallel execution
  • Aliases
    • BiocParallelParam-class
    • BiocParallelParam
    • bpbackend
    • bpbackend<-
    • bpbackend,missing-method
    • bpbackend<-,missing,ANY-method
    • bpisup
    • bpisup,ANY-method
    • bpisup,missing-method
    • bpstart
    • bpstart,ANY-method
    • bpstart,missing-method
    • bpstop
    • bpstop,ANY-method
    • bpstop,missing-method
    • bpworkers
    • bpworkers<-
    • bpworkers,missing-method
    • bpworkers,BiocParallelParam-method
    • bptasks
    • bptasks,BiocParallelParam-method
    • bptasks<-
    • bptasks<-,BiocParallelParam,numeric-method
    • bpcatchErrors
    • bpcatchErrors,BiocParallelParam-method
    • bpcatchErrors<-
    • bpcatchErrors<-,BiocParallelParam,logical-method
    • bpstopOnError
    • bpstopOnError,BiocParallelParam-method
    • bpstopOnError<-
    • bpstopOnError<-,BiocParallelParam,logical-method
    • bpstopOnError<-,DoparParam,logical-method
    • bpprogressbar
    • bpprogressbar,BiocParallelParam-method
    • bpprogressbar<-
    • bpprogressbar<-,BiocParallelParam,logical-method
    • bpjobname
    • bpjobname,BiocParallelParam-method
    • bpjobname<-
    • bpjobname<-,BiocParallelParam,character-method
    • show,BiocParallel-method
    • print.remote-error
    ## For examples see ?SnowParam, ?MulticoreParam, ?BatchJobsParam 
    ## and ?SerialParam.
    Documentation reproduced from package BiocParallel, version 1.2.22, License: GPL-2 | GPL-3

    Community examples

    Looks like there are no examples yet.