storeApply: apply a function over job results in a ciseStore instance

Description Usage Arguments Details Value Note See Also Examples

View source: R/storeFuncs.R

Description

apply a function over job results in a ciseStore instance

Usage

1
storeApply(store, f, n.chunks, ids=NULL, ..., verbose = FALSE, flatten1=TRUE)

Arguments

store

instance of ciseStore-class

f

function on GRanges stored in ciseStore

n.chunks

Number of chunks into which the jobs are to be broken; the series of chunks is handed to foreach to extract results and apply f to them.

If missing, the value of getDoParWorkers() used.

ids

defaults to NULL; if non-null, the jobs to be processed are limited to those identified in this vector.

...

additional arguments to foreach

verbose

if TRUE will allow progressbars and other messages to display

flatten1

if TRUE will execute unlist(...,recursive=FALSE) on output, defaulted to FALSE in previous version

Details

The chunking of job identifiers will determine the degree of parallelization of application, and the form of the list that is returned. flatten1 will eventually default to TRUE.

Value

A list whose structure depends on the chunking of job identifiers. See the examples.

Note

eqtlStore imports BiocParallel's bpparam function, and this determines in real time the number of workers to be employed by storeApply.

See Also

storeMapResults will apply over the store using the batch jobs submission infrastructure and can target specific results via ids; storeApply uses bplapply over the entire store

Examples

1
2
3
4
5
6
if (require(geuvStore2)) {
 require(BatchJobs)
 store = makeGeuvStore2()
 storeApply(store, length)
 storeApply(store, length, ids=c(1:3,603))
 }

gQTLBase documentation built on Nov. 8, 2020, 7:07 p.m.