Learn R Programming

sybil (version 2.0.0)

sysBiolAlg_fbaEasyConstraint-class: Class "sysBiolAlg_fbaEasyConstraint" and Class "sysBiolAlg_mtfEasyConstraint"

Description

The classes sysBiolAlg_fbaEasyConstraint sysBiolAlg_mtfEasyConstraint hold an object of class '>optObj which is generated to meet the requirements of the FBA/MTF algorithm. In Addition to this, it is very easy to add additional linear constraints to that linear problem. Each constraints is defined by the affected reaction, the coefficient, lower and upper bounds, and the constraint type.

Arguments

Objects from the Class

Objects can be created by calls of the form

sysBiolAlg(model, algorithm = "fbaEasyConstraint", ...).

Arguments to ... which are passed to method initialize of class sysBiolAlg_fba are described in the Details section.

Slots

Slots are the same as in the original MTF/FBA classes. In addition, this slot is implemented:

easyConstraint

Named list holding the information for the constraints (see details):

  • react List of numeric vectors. Values indicate, to which reaction the constraint applys.

  • x List of numeric vectors. Values indicate coefficients of the constraint. Lengths have to be equal to react-field.

  • lb Numeric vector of lower bounds for constraints. If not given, a default bound of 0 will be used.

  • ub Numeric vector of lower bounds for constraints. If not given, a default bound of 0 will be used. Only needed for constraints, that need two bounds.

  • rtype Character vector defining the type of constraint.

    "F": free constraint (GLPK only) \(-\infty < x < \infty\)
    "L": constraint with lower bound \(\mathrm{lb} \leq x < \infty\)
    "U": constraint with upper bound \(-\infty < x \leq \mathrm{ub}\)
    "D": double-bounded (ranged) constraint \(\mathrm{lb} \leq x \leq \mathrm{ub}\)
    "E": fixed (equality) constraint \(\mathrm{lb} = x = \mathrm{ub}\)
    If rtype[i] is not one of "F", "L", "U", "D" or "E", the value of rtype[i] will be set to "E". See Details of loadLPprob.

Extends

Class "'>sysBiolAlg", directly.

Methods

No methods defined with class "sysBiolAlg_fbaEasyConstraint" in the signature.

Details

The problem object is built to be capable to perform flux balance analysis (FBA) with a given model, which is basically the solution of a linear programming problem $$% \begin{array}{rll}% \max & \mbox{\boldmath$c$\unboldmath}^{\mathrm{T}} \mbox{\boldmath$v$\unboldmath} \\[1ex] \mathrm{s.\,t.} & \mbox{\boldmath$Sv$\unboldmath} = 0 \\[1ex] & \alpha_i \leq v_i \leq \beta_i & \quad \forall i \in \{1, \ldots, n\} \\[1ex] \end{array}% $$ with \(\bold{S}\) being the stoichiometric matrix, \(\alpha_i\) and \(\beta_i\) being the lower and upper bounds for flux (variable) \(i\) respectively. The total number of variables of the optimization problem is denoted by \(n\). The solution of the optimization is a flux distribution maximizing the objective function \( \mbox{\boldmath$c$\unboldmath}^{\mathrm{T}} \mbox{\boldmath$v$\unboldmath} \) under the a given environment and the assumption of steady state. The optimization can be executed by using optimizeProb.

The additional i-th EasyConstraint will be added as follows to the problem: to be checked. $$% \gamma_i \leq v_{r_i} * (x_i)^\mathrm{T} \leq \delta_i $$ Here \(r_i\) (= easyConstraint$react[[i]]) is a set of reaction indices and \(x_i\) (= easyConstraint$x[[i]]) is the corresponding set of coefficients. \(\gamma\) and \(\delta\) are the vectors of lower and upper bounds for the constraints, respectively. For the type of (in)equality (\(\leq\), ...) see the text above for parameter rtype.

References

Edwards, J. S., Covert, M and Palsson, B. <U+00D8>. (2002) Metabolic modelling of microbes: the flux-balance approach. Environ Microbiol 4, 133--140.

Edwards, J. S., Ibarra, R. U. and Palsson, B. <U+00D8>. (2001) In silico predictions of Escherichia coli metabolic capabilities are consistent with experimental data. Nat Biotechnol 19, 125--130.

See Also

Constructor function sysBiolAlg and superclass '>sysBiolAlg.

Examples

Run this code
# NOT RUN {
  showClass("sysBiolAlg_fbaEasyConstraint")
  
  # see package vignette for second example with more comments:
  #vignette("sybil")
  
  #load model
  data(Ec_core)
  
  # allow influx of Fumarate and restrict outflux of Fumarate and Glucose
  lowbnd(Ec_core)[react_id(Ec_core) %in% c("EX_fum(e)")] <- -1000
  uppbnd(Ec_core)[react_id(Ec_core) %in% c("EX_glc(e)", "EX_fum(e)")] <- 0
  
  # see result
  findExchReact(Ec_core)
  optimizeProb(Ec_core)
  
  # define easyConstraint to have the same influx for Glucose and Fumarate:
  # EX_glc(e) = EX_fum(e)
  # here we omit the upper and lower bound, hence they are set to zero.
  ec <- list(
  	react=list(which(react_id(Ec_core) %in% c("EX_glc(e)", "EX_fum(e)"))),
  	x=list(c(1, -1)),
  	rtype="E")
  
  # optimize
  opt <- optimizeProb(Ec_core, algorithm=("fbaEasyConstraint"), easyConstraint=ec)
  
  # check if fluxes are really the same:
  fluxes(opt)[react_id(Ec_core) %in% c("EX_glc(e)", "EX_fum(e)")]
  
  
  
  
  
  
  
# }

Run the code above in your browser using DataLab