Learn R Programming

sybil (version 1.1.2)

multiDel: Parallel (Multicore) Support for sybil

Description

Multicore support for the functions oneGeneDel, doubleGeneDel, oneFluxDel, doubleFluxDel and fluxVar.

Usage

multiDel(model, nProc = 2, todo = "oneGeneDel", del1 = NA, del2 = NA, ...)

Arguments

model
An object of class modelorg.
nProc
Number of cores (processes) to use.
todo
A single character value giving the function name, which should be parallelised. Can be one of "oneGeneDel", "doubleGeneDel", "oneFluxDel", "doubleFluxDel" or "fluxVar".
del1
Vector of genes/reactions to consider.
del2
Vector of genes/reactions to consider (for use with doubleGeneDel or doubleFluxDel).
...
Further arguments passed to oneGeneDel, doubleGeneDel, oneFluxDel,

Value

  • A list of length nProc (or less, depending of the numbers of available cores), each element containing the return value of the function called (on object of a class extending optsol).

Details

The function loads the package parallel if available, otherwise it tries to load multicore. The argument nProc should be the number of cores to use. This number is veryfied via a call to detectCores (of parallel or multicore) and is set to the return value of detectCores, if nProc > detectCores() evaluates to TRUE. The arguments del1 and del2 are split into lists, each list element containing nProc/del1 elements. These are passed to mclapply.

See Also

mclapply, optsol, oneGeneDel, doubleGeneDel, oneFluxDel, doubleFluxDel and fluxVar.

Examples

Run this code
## The examples here require the packages glpkAPI and parallel to be
## installed.

## perform single gene deletion analysis using the E. coli core
## metabolic model
data(Ec_core)
ad <- multiDel(Ec_core)
mapply(checkOptSol, ad)

Run the code above in your browser using DataLab