Learn R Programming

gQTLBase (version 1.4.2)

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

Description

apply a function over job results in a ciseStore instance

Usage

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; theseries 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

Value

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

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.

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

Run this code
if (require(geuvStore2)) {
 require(BatchJobs)
 store = makeGeuvStore2()
 storeApply(store, length)
 storeApply(store, length, ids=c(1:3,603))
 }

Run the code above in your browser using DataLab