storeMapResults: use batchMapResults infrastructure to process results in a...

Description Usage Arguments Value Note Author(s) Examples

View source: R/storeFuncs.R

Description

use batchMapResults infrastructure to process results in a ciseStore instance

Usage

1
2
3
4
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

part

see batchMapResults

missing.ok

see loadResult

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.

Note

loadAndFilterResult is not intended to be exported and may be removed in future versions.

Author(s)

VJ Carey <stvjc@channing.harvard.edu>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
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)
 }

## End(Not run)

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