FBA

changeObjective(model, rxns, objectiveCoeff)

Changes the objective function of a constraint-based model

USAGE:

model = changeObjective(model, rxns, objectiveCoeff)

INPUTS:

model: COBRA model structure rxns: a string or a cell array of strings matching some model.rxns{i}

OPTIONAL INPUT:

objectiveCoeff: Value of objective coefficient for each reaction (Default = 1)

OUTPUT:

model: COBRA model structure with new objective

changeRxnBounds(model, rxnNameList, value, boundType)

Changes upper or lower bounds of a reaction or a set of reactions

USAGE:

model = changeRxnBounds(model, rxnNameList, value, boundType)

INPUTS:

model: COBRA model structure rxnNameList: List of reactions (cell array or string) value: Bound values.

Can either be a vector or a single scalar value if the same bound value is to be assinged to all reactions

OPTIONAL INPUT:
boundType: ‘u’ - upper, ‘l’ - lower, ‘b’ - both (Default = ‘b’)

Bound type can either be a cell array of strings or a string with as many letters as there are reactions in rxnNameList

OUTPUT:

model: COBRA model structure with modified reaction bounds

enumerateOptimalSolutions(model)

Returns a set of optimal flux distributions spanning the optimal set

USAGE:

[solution] = enumerateOptimalSolution(model)

INPUT:

model: COBRA model structure

OUTPUT:

solution: solution structure

  • fluxes - Flux distribution for each iteration

  • nonzero - Boolean matrix denoting which fluxes are nonzero for each iteration

minimizeModelFlux(model, osenseStr, minNorm)

This function finds the minimum flux through the network and returns the minimized flux and an irreversible model

USAGE:

[MinimizedFlux modelIrrev]= minimizeModelFlux(model)

INPUT:

model: COBRA model structure

OPTIONAL INPUTS:

osenseStr: Maximize (‘max’)/minimize (‘min’) (opt, default = ‘max’) minNorm: {(0), ‘one’, ‘zero’, > 0 , n x 1 vector}, where [m,n]=size(S);

0 - Default, normal LP, ‘one’ Minimise the Taxicab Norm using LP.

\[\begin{split}min ~&~ |v| \\ s.t. ~&~ S v = b \\ ~&~ c^T v = f \\ ~&~ lb \leq v \leq ub\end{split}\]

A LP solver is required. ‘zero’ Minimize the cardinality (zero-norm) of v

\[\begin{split}min ~&~ ||v||_0 \\ s.t. ~&~ S v = b \\ ~&~ c^T v = f \\ ~&~ lb \leq v \leq ub\end{split}\]

The zero-norm is approximated by a non-convex approximation Six approximations are available: capped-L1 norm, exponential function logarithmic function, SCAD function, L_p norm with p<0, L_p norm with 0<p<1 Note : capped-L1, exponential and logarithmic function often give the best result in term of sparsity.

The remaining options work only with a valid QP solver:

> 0 Minimises the Euclidean Norm of internal fluxes. Typically 1e-6 works well.

\[\begin{split}min ~&~ ||v|| \\ s.t. ~&~ S v = b \\ ~&~ c^T v = f \\ ~&~ lb \leq v \leq ub\end{split}\]

n x 1 Forms the diagonal of positive definiate matrix F in the quadratic program

\[\begin{split}min ~&~ 0.5 v^T F v \\ s.t. ~&~ S v = b \\ ~&~ c^T v = f \\ ~&~ lb \leq v \leq ub\end{split}\]
OUTPUTS:

MinimizedFlux: minimum flux possible through the netwok modelIrrev: irreversible version of ‘model’

optimizeCbModel(model, osenseStr, minNorm, allowLoops, param)

Solves flux balance analysis problems, and variants thereof

Solves LP problems of the form

\[\begin{split}max/min ~& c^T v \\ s.t. ~& S v = b ~~~~~~~~~~~:y \\ ~& C v \leq d~~~~~~~~:y \\ ~& lb \leq v \leq ub~~~~:w\end{split}\]

Optionally, it also solves a second problem

max/min ~& g0.*|v|_0 + g1.*|v|_1 + g2.*|v|_2 + 0.5 v^T*F*v\ s.t. ~& S v = b ~~~~~~~~~~~:y \

~& C v leq d~~~~~~~~:y \ ~& lb leq v leq ub~~~~:w ~& c^T*v == c^T*vStar

where vStar is the optimal solution to the first LP problem.

USAGE:

solution = optimizeCbModel(model, osenseStr, minNorm, allowLoops, param)

INPUT:

model: (the following fields are required - others can be supplied)

  • S - m x n Stoichiometric matrix

  • c - n x 1 Linear objective coefficients

  • lb - n x 1 Lower bounds on net flux

  • ub - n x 1 Upper bounds on net flux

OPTIONAL INPUTS:
model:
  • b - m x 1 change in concentration with time

  • csense - m x 1 character array with entries in {L,E,G} (The code is backward compatible with an m + k x 1 csense vector, where k is the number of coupling constraints)

  • mets m x 1 metabolite abbreviations

  • C - k x n Left hand side of C*v <= d

  • d - k x 1 Right hand side of C*v <= d

  • ctrs k x 1 Cell Array of Strings giving IDs of the coupling constraints

  • dsense - k x 1 character array with entries in {L,E,G}

  • g0 - n x 1 weights on zero norm, where positive is minimisation, negative is maximisation, zero is neither.

  • g1 - n x 1 weights on one norm, where positive is minimisation, negative is maximisation, zero is neither.

  • g2 - n x 1 weights on two norm

osenseStr: Maximize (‘max’)/minimize (‘min’) (opt, default =

‘max’) linear part of the objective. Nonlinear parts of the objective are always assumed to be minimised.

minNorm: {(0), ‘one’, ‘zero’, > 0 , n x 1 vector, ‘optimizeCardinality’}, where [m,n]=size(S);

0 - Default, normal LP ‘one’ Minimise the Taxicab Norm using LP.

\[\begin{split}min ~& g0.*|v| \\ s.t. ~& S v = b \\ ~& c^T v = f \\ ~& lb \leq v \leq ub\end{split}\]

A LP solver is required.

randomObjFBASol(model, initArgs)

Solves an FBA problem with a random objective function

USAGE:

x0 = randomObjSol(model, initArgs)

INPUTS:

model: COBRA model structure initArgs: Cell array containing the following data:

  1. osenseStr - Maximize (‘max’) / minimize (‘min’)

  2. minObjFrac - Minimum initial objective fraction

  3. minObjValue - Minimum initial objective value (opt) (Default = minObjFrac*sol.f)

OUTPUT:

x0: solution of FBA problem