Learn R Programming

gQTLBase (version 1.4.2)

storeMapResults: use batchMapResults infrastructure to process results in a ciseStore instance

Description

use batchMapResults infrastructure to process results in a ciseStore instance

Usage

storeMapResults(store, reg2, fun, ..., 
    ids = NULL, part = NA_character_, more.args = list())
loadAndFilterResult(reg, 
 id, filter=force, part = NA_character_, missing.ok = FALSE)

Arguments

store
an instance of ciseStore-class
reg
instance of BatchJobs Registry class
reg2
an empty instance of the Registry class (see makeRegistry)
fun
A function to map over results in store, with formals (job, res, ...).
filter
a function that accepts and returns a GRanges instance, to be applied just after loading a result from the store
...
additional arguments to vectorize over (should be same length as length(findDone(store@reg))
ids
ids of job results to be mapped; if missing, map all job results
id
a single job id
missing.ok
more.args
a list of other arguments to be passed to fun; default is empty list.

Value

  • integer vector with job ids. Main purpose is to prepare the registry for submitJobs.

Examples

Run this code
if (require(geuvStore2)) {
 require(BatchJobs)
 store = makeGeuvStore2()
 fd = tempfile()
 tempreg = makeRegistry("tempSMR", file.dir=fd)
 storeMapResults( store, tempreg, fun=function(job, res, ...) length(res) )
 showStatus(tempreg)
 submitJobs(tempreg, 1:2)
 loadResults(tempreg)
 unlink(fd)
 }

Run the code above in your browser using DataLab