Learn R Programming

sybil (version 2.0.0)

multiDel: Parallel Support for sybil

Description

Parallel computation 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, doubleFluxDel or fluxVar.

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. Argument nProc should be the number of cores to use. This number is veryfied via a call to detectCores (of parallel) and is set to the return value of detectCores, if nProc > detectCores() evaluates to TRUE. 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
# NOT RUN {
## 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