optimizer: Performs Series of Optimizations

Description Usage Arguments Value Author(s) References See Also

View source: R/optimizer.R

Description

The function optimizer is a wrapper to the sysBiolAlg-method optimizeProb. While optimizeProb runs one optimization, optimizer is designed to run a series of optimization by re-optimizing a given problem object (successive calls to optimizeProb.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
optimizer(model, react, lb, ub, obj_coef, lpdir,
          algorithm = SYBIL_SETTINGS("ALGORITHM"),
          mtfobj = NULL,
          setToZero = FALSE,
          rebuildModel = FALSE,
          fld = "none",
          prCmd = NA, poCmd = NA,
          prDIR = NULL, poDIR = NULL,
          verboseMode = 2,
          ...)

Arguments

model

An object of class modelorg.

react

A list of numeric vectors. Each value must point to a reaction id present in model. The length of the list in react determines the number of optimizations to run. Each list element can be used in conjunction with arguments lb and ub or obj_coef and lpdir. The parameters given in this arguments will be set temporarily for each optimization.

lb

A numeric vector or list of the same length as react or a matrix with the number of rows equal to the length of react containing the lower bounds for the reaction rates of reactions (variables) given in argument react. If set to NULL, no lower bounds will be changed. If lb is a vector, lb[k] is used as lower bound for all reactions given in react[k]. If lb is a list, lb[k] must have the same length as react[k]. If lb is a matrix, each row serves as lower bound for the reactions given in each element of react (all elements in react must have the same length).
Default: NULL.

ub

A numeric vector or list of the same length as react or a matrix with the number of rows equal to the length of react containing the upper bounds for the reaction rates of reactions (variables) given in argument react. If set to NULL, no upper bounds will be changed. If ub is a vector, ub[k] is used as upper bound for all reactions given in react[k]. If ub is a list, ub[k] must have the same length as react[k]. If ub is a matrix, each row serves as upper bound for the reactions given in each element of react (all elements in react must have the same length).
Default: NULL.

obj_coef

A numeric vector or list of the same length as react or a matrix with the number of rows equal to the length of react containing the objective coefficients for the reactions (variables) given in argument react. If set to NULL, no objective coefficients will be changed. If obj_coef is a vector, obj_coef[k] is used as objective coefficients for all reactions given in react[k]. If obj_coef is a list, obj_coef[k] must have the same length as react[k]. If obj_coef is a matrix, each row serves as objective coefficient for the reactions given in each element of react (all elements in react must have the same length).
Default: NULL.

lpdir

A character vector of the same length as react containing the direction of optimization for each optimization. Possible values are "min" for minimization, or "max" for maximization. If set to NULL, optimization direction will not change.
Default: NULL.

algorithm

A single character value giving the algorithm to compute genetic perturbations. Can be "fba": flux-balance analysis, "mtf": minimization of absolute total flux (see Details below), "moma": minimization of metabolic adjustment (MOMA), "lmoma": linear version of MOMA, "room": regulatory on/off minimization (ROOM) or "fv": flux variability analysis.
Default: SYBIL_SETTINGS("ALGORITHM").

mtfobj

Only used, if argument algorithm is set to "mtf". A numeric vector of the same length as react containing previously calculated optimized values of the objective function given in the model. The objective function of the model will be fixed to this values in each optimization. If set to NULL, they will be computed by means of the "fba" algorithm. If additionally arguments solver and method are set, they will be used here too.
Default: NULL.

setToZero

Logical: If the mathematical programming software returns a solution status which is not optimal, set the corresponding objective value to zero.
Default: FALSE.

rebuildModel

Logical. If set to TRUE, the problem object will be rebuilt prior each round of optimization. Default: FALSE.

fld

Type of flux distribution to return. If set to "none", no flux distribution will be returned. If set to "fluxes", only the real flux distribution is returned, meaning all variable values after optimization representing a flux (reaction) in the model. If set to "all", all variable values are returned. If algorithm is set to "mtf" and fld equals "none", argument fld will be changed to "fluxes".
Default: "none".

prCmd

A list of preprocessing commands passed to optimizeProb. See there for details.
Default: NA.

poCmd

A list of postprocessing commands passed to optimizeProb. See there for details.
Default: NA.

prDIR

A numeric or character vector, indicating in which round of optimization the preprocessing command(s) will be executed. prDIR = c(2, 5, 10) executes the commands in prCmd before the second, 5th and 10th optimization.

If prDIR is a character vector, for example prDIR = c("10"), the preprocessing commands given in prCmd will pe executed every 10th round of optimization.

If prDIR is character and has length 2, the first element is an offset to the following elements. prDIR = c("-2", "10") will do the preprocessing on every 10th round of optimization, beginning in round number 10 - 2 = 8.
Default: NULL.

poDIR

The same as prDIR, but for postprocessing. Default: NULL.

verboseMode

Single integer value, giving the amount of output to the console. Use sink to redirect output to a file. If verboseMode == 1 status messages will be printed, if verboseMode == 2 additionally a progress bar will be produced. If verboseMode > 2, intermediate results will be printed. Use suppressMessages to disable any output to the console.
Default: 2.

...

Further arguments passed to sysBiolAlg.

Value

A list containing the results of the optimization:

solver

A single character string indicating the used mathematical programming software.

method

A single character string indicating the used optimization method by the mathematical programming software.

algorithm

A single character string indicating the used algorithm.

lp_num_cols

Number of columns (variables) in the problem object.

lp_num_rows

Number of rows (constraints) in the problem object.

obj

A numeric vector containing the values of the objective function after optimization.

ok

A numeric vector containing the return values of the optimizer (e.g. “solution process was successful” or “time limit exceeded”).

stat

A numeric vector containing the status value of the optimization (e.g. “solution is optimal” or “no feasible solution exists”).

lp_dir

A factor variable indicating the direction of optimization for each optimization.

fldind

Pointers to columns (variables) representing a flux (reaction) in the original network. The variable fldind[i] in the solution object represents reaction i in the original network.

fluxdist

The resulting flux distribution.

prAna

An object of class ppProc if a preprocessing command was given.

poAna

An object of class ppProc if a postprocessing command was given.

alg_par

A named list of algorithm specific parameters.

Author(s)

Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de>

Maintainer: Mayo Roettger <mayo.roettger@hhu.de>

References

Becker, S. A., Feist, A. M., Mo, M. L., Hannum, G., Palsson, B. Ø. and Herrgard, M. J. (2007) Quantitative prediction of cellular metabolism with constraint-based models: the COBRA Toolbox. Nat Protoc 2, 727–738.

Schellenberger, J., Que, R., Fleming, R. M. T., Thiele, I., Orth, J. D., Feist, A. M., Zielinski, D. C., Bordbar, A., Lewis, N. E., Rahmanian, S., Kang, J., Hyduke, D. R. and Palsson, B. Ø. (2011) Quantitative prediction of cellular metabolism with constraint-based models: the COBRA Toolbox v2.0. Nat Protoc 6, 1290–1307.

See Also

Class sysBiolAlg, and constructor function sysBiolAlg, optimizeProb and SYBIL_SETTINGS.


sybil documentation built on May 31, 2021, 5:08 p.m.