addReact: Add/Change Reactions in a Model

Description Usage Arguments Details Value Methods Author(s) References See Also Examples

Description

The function addReact adds one reaction to a metabolic model, or changes one reaction in a metabolic model.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## S4 method for signature '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)

Arguments

model

An object of class modelorg.

id

A single character string containing a reaction id (see details below).

met

A vector of character strings containing the metabolite id's used in the reaction given in Scoef.

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].

reversible

A Boolean value, indicating if the reaction is reversible or not.
Default: FALSE.

lb

A single numeric value giving the lower bound of the reaction.
Default: 0.

ub

A single numeric value giving the upper bound of the reaction.
Default: SYBIL_SETTINGS("MAXIMUM").

obj

A single numeric value giving the objective coefficient of the reaction.
Default: 0.

subSystem

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.

gprAssoc

A single character string giving the gpr association for the reaction. If NA, no gpr association is created.
Default: NA.

reactName

A single character string giving the name for the reaction. If NA, the value of argument id is used.
Default: NA.

metName

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.

metComp

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.

Details

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 idis 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).

Value

An object of class modelorg, or modelorg_irrev, if model is of class modelorg_irrev.

Methods

addReact:

signature(object = "modelorg"): adds a new reaction to a modelorg object.

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

modelorg and rmReact

Examples

1
2
3
4
5
6
7
8
9
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")

Example output

Loading required package: Matrix
Loading required package: lattice
3 x 1 sparse Matrix of class "dgCMatrix"
  newReact
A       -1
B       -2
C        1

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