The function addReact
adds one reaction to a metabolic model, or
changes one reaction in a metabolic model.
# S4 method for modelorg
addReact(model,
id,
met,
Scoef,
reversible = FALSE,
lb = 0,
ub = SYBIL_SETTINGS("MAXIMUM"),
obj = 0,
subSystem = NA,
gprAssoc = NA,
reactName = NA,
metName = NA,
metComp = NA)
An object of class modelorg
.
A single character string containing a reaction id (see details below).
A vector of character strings containing the metabolite id's used in the
reaction given in Scoef
.
A numeric vector of the same length as met
of stoichiometric
coefficients for the metabolites in met
. The value in Scoef[i]
is the stoichiometric coefficient of the metabolite in met[i]
.
A Boolean value, indicating if the reaction is reversible or not.
Default: FALSE
.
A single numeric value giving the lower bound of the reaction.
Default: 0
.
A single numeric value giving the upper bound of the reaction.
Default: SYBIL_SETTINGS("MAXIMUM")
.
A single numeric value giving the objective coefficient of the reaction.
Default: 0
.
A vector of character strings containing the sub systems to which the
reaction belongs. All values must be available in
subSys(model)
. If NA
, the reaction will not be
associated to any sub system.
Default: NA
.
A single character string giving the gpr association for the reaction. If
NA
, no gpr association is created.
Default: NA
.
A single character string giving the name for the reaction. If NA
,
the value of argument id
is used.
Default: NA
.
A vector of character strings of the same length as met
containing
the the metabolites names for the metabolites given in argument met
.
If set to NA
, the metabolite id's are used.
Default: NA
.
A vector of character strings or integers of the same length as met
containing a compartment name (as in mod_compart(model)
) or an
index pointing to a value in mod_compart(model)
(as in
met_comp(model)
). If NA
, the metabolites will not be
associated to any compartment.
Default: NA
.
An object of class '>modelorg
, or
'>modelorg_irrev
, if model
is of class
'>modelorg_irrev
.
addReact
:signature(object = "modelorg")
: adds a new reaction to a modelorg
object.
The function addReact
can be used to add reactions and/or metabolites
to a given metabolic model, or to change parameters of a reaction already
present in a given metabolic model.
If the reaction id in argument id
is already present in the given model,
this reaction will be changed, no new column will be added to the
stoichiometric matrix. If any of the metabolite id's of argument met
are not present in the model, they will be added (new rows in the
stoichiometric matrix will be added).
Arguments subSystem
, gprAssoc
and reactName
are only
used, if a new reaction is added to the model (if id
is not in
react_id(model)
, exact matching is used).
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.
'>modelorg
and rmReact
# NOT RUN {
data(Ec_core)
# add reaction A + 2 B <-> C to the model
modelNew <- addReact(Ec_core, id="newReact", met=c("A", "B", "C"),
Scoef=c(-1, -2, 1), reversible=TRUE,
lb=-1000, ub=1000, obj=0)
# view the new reaction
shrinkMatrix(modelNew, j="newReact")
# }
Run the code above in your browser using DataLab