Optimalrays¶
- findExtremePathway(fbaModel, obj)[source]¶
Finds an extreme ray
- USAGE:
[x, output] = findExtremePathway (fbaModel, obj)
- INPUT:
fbaModel – FBA type model with fields:
.S - m x n stoichiometric matrix
.lb - n x 1 lower flux bounds (used to detect reversible reactions)
.ub - n x 1 upper flux bounds (used to detect reversible reactions)
- OPTIONAL INPUT:
obj – default = random vector with size depending on fbaModel.S
- OUTPUTS:
x – vector from result, where result is an output of solveCobraLP function
output – output.objval contains result.obj
- findExtremePool(model, obj, printLevel, positive, internal)[source]¶
Finds an extreme ray, x, in the left nullspace of the stoichiometric matrix
- USAGE:
[x, sol] = findExtremePool (model, obj, printLevel, positive, internal)
- INPUT:
model – COBRA model structure with fields:
.S - m x n stoichiometric matrix
.SConsistentRxnBool - n x 1 boolean of stoichiometrically consistent reactions (used when internal is true)
- OPTIONAL INPUTS:
obj – objective coefficient vector (default = random vector sized on model.S)
printLevel – verbosity passed to solveCobraLP (default = 0)
positive – if true, restrict the ray to non-negative coefficients (default = 0)
internal – if true, restrict model.S to model.SConsistentRxnBool (default = 0)
- OUTPUTS:
x – extreme ray from the left nullspace (x = sol.full, entries below epsilon set to zero)
sol – solution structure returned by solveCobraLP(LPProblem)
- greedyExtremeRayBasis(model, param)[source]¶
Computes a non-negative basis for the left nullspace of the stoichiometric matrix using optimization to pick random extreme rays, then test a posteriori if each is linearly independent from the existing stored extreme rays.
- USAGE:
[L, Zt] = greedyExtremeRayBasis (model) <=> [B, L] = greedyExtremeRayBasis(model,’left’)
Gives Zpos*N = 0 or Zpos*S = 0
Gives Z*N = 0 or Z*S = 0
[B, L] = greedyExtremeRayBasis (model,’right’)
Gives N*Zpos = 0 or S*Zpos = 0
Gives N*Z = 0 or S*Z = 0
- INPUT:
model – COBRA model structure with fields:
.S - m x (n + k) stoichiometric matrix, where n are internal reactions and k are exchange reactions
.SConsistentRxnBool - n x 1 boolean of stoichiometrically consistent reactions (used when param.internalStoichiometriMatrixLeftNullspace is true)
- OPTIONAL INPUT:
param – structure of optional parameters:
.printLevel - verbosity level (default = 1)
.leftRight - ‘left’ or ‘right’ nullspace to compute (default = ‘left’)
.internalStoichiometriMatrixLeftNullspace - if true, restrict model.S to model.SConsistentRxnBool (default = 0)
.maxTime - time budget in seconds (default = 100)
.maxNewBasisTime - time budget in seconds before timing out the basis search (default = 10000)
.feasTol - feasibility tolerance for accepting a computed ray (default = 1e-6)
- OUTPUTS:
Zpos – non-negative linear basis for the left (right) nullspace of N (internal = 1) or S (internal = 0)
Z – linear basis for the left (right) nullspace of N (internal = 1) or S (internal = 0)