bplapply

Parallel lapply-like functionality

bplapply applies FUN to each element of X. Any type of object X is allowed, provided length, [, and [[ methods are available. The return value is a list of length equal to X, as with lapply.

Keywords
manip
Usage
bplapply(X, FUN, ..., BPREDO = list(), BPPARAM=bpparam())
Arguments
X
Any object for which methods length, [, and [[ are implemented.
FUN
The function to be applied to each element of X.
...
Additional arguments for FUN, as in lapply.
BPPARAM
An optional BiocParallelParam instance determining the parallel back-end to be used during evaluation, or a list of BiocParallelParam instances, to be applied in sequence for nested calls to BiocParallel functions.
BPREDO
A list of output from bplapply with one or more failed elements. When a list is given in BPREDO, bpok is used to identify errors, tasks are rerun and inserted into the original results.
Details

See showMethods{bplapply} for additional methods, e.g., method?bplapply("MulticoreParam").

Value

lapply.

See Also

  • bpvec for parallel, vectorized calculations.

  • BiocParallelParam for possible values of BPPARAM.
  • Aliases
    • bplapply
    • bplapply,ANY,list-method
    • bplapply,ANY,missing-method
    • bplapply,ANY,BiocParallelParam-method
    • bplapply,ANY,BatchJobsParam-method
    • bplapply,ANY,DoparParam-method
    • bplapply,ANY,SerialParam-method
    • bplapply,ANY,SnowParam-method
    Examples
    showMethods("bplapply")
    
    ## ten tasks (1:10) so ten calls to FUN default registered parallel
    ## back-end. Compare with bpvec.
    fun <- function(v) {
        message("working") ## 10 tasks
        sqrt(v)
    }
    bplapply(1:10, fun) 
    
    Documentation reproduced from package BiocParallel, version 1.6.2, License: GPL-2 | GPL-3

    Community examples

    Looks like there are no examples yet.