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
.
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,
...)
An object of class modelorg
.
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.
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
.
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
.
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
.
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
.
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")
.
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
.
Logical: If the mathematical programming software returns a solution status
which is not optimal, set the corresponding objective value to zero.
Default: FALSE
.
Logical. If set to TRUE
, the problem object will be rebuilt prior
each round of optimization.
Default: FALSE
.
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"
.
A list of preprocessing commands passed to optimizeProb
.
See there for details.
Default: NA
.
A list of postprocessing commands passed to optimizeProb
.
See there for details.
Default: NA
.
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
.
The same as prDIR
, but for postprocessing.
Default: NULL
.
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
.
A list containing the results of the optimization:
A single character string indicating the used mathematical programming software.
A single character string indicating the used optimization method by the mathematical programming software.
A single character string indicating the used algorithm.
Number of columns (variables) in the problem object.
Number of rows (constraints) in the problem object.
A numeric vector containing the values of the objective function after optimization.
A numeric vector containing the return values of the optimizer (e.g. “solution process was successful” or “time limit exceeded”).
A numeric vector containing the status value of the optimization (e.g. “solution is optimal” or “no feasible solution exists”).
A factor variable indicating the direction of optimization for each optimization.
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.
The resulting flux distribution.
An object of class ppProc
if a preprocessing command
was given.
An object of class ppProc
if a postprocessing command
was given.
A named list of algorithm specific parameters.
Becker, S. A., Feist, A. M., Mo, M. L., Hannum, G., Palsson, B. <U+00D8>. 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. <U+00D8>. (2011) Quantitative prediction of cellular metabolism with constraint-based models: the COBRA Toolbox v2.0. Nat Protoc 6, 1290--1307.
Class '>sysBiolAlg
, and constructor function
sysBiolAlg
, optimizeProb
and SYBIL_SETTINGS
.