Sparsefba¶
- findSparsePathway(model, rxnPenalty, param)[source]¶
Find a sparse pathway in a COBRA model by penalising or incentivising the activity of individual reactions and minimising the resulting cardinality
Reactions with rxnPenalty(j) > 0 are penalised when active, reactions with rxnPenalty(j) < 0 are incentivised when active, and reactions with rxnPenalty(j) == 0 are indifferent to activity.
- USAGE:
[solution, sparseRxnBool] = findSparsePathway (model, rxnPenalty, param)
- INPUTS:
model – COBRA model structure passed to buildOptProblemFromModel
- OPTIONAL INPUTS:
rxnPenalty – n x 1 vector of per-reaction penalties (default ones(n, 1)); positive penalises activity, negative incentivises it, zero is neutral
param – parameter structure with fields:
.printLevel - verbosity level (default 1)
.theta - starting parameter of the Capped-L1 approximation
- OUTPUTS:
solution – solution structure with fields:
.v - n x 1 sparse flux vector
.stat - solver status of the cardinality optimisation
sparseRxnBool – n x 1 logical, true for reactions active in the sparse solution
- sparseFBA(model, osenseStr, checkMinimalSet, checkEssentialSet, zeroNormApprox, printLevel)[source]¶
Finds the minimal set of reactions subject to a LP objective
\[\begin{split}min ~&~ ||v||_0 \\ s.t ~&~ S v \leq, = or \geq b \\ ~&~ c^T v = f* \\ ~&~ l \leq v \leq u\end{split}\]where \(f*\) is the optimal value of objective (default is \(max c^T v\)).
- USAGE:
[vSparse, sparseRxnBool, essentialRxnBool] = sparseFBA (model, osenseStr, checkMinimalSet, checkEssentialSet, zeroNormApprox, printLevel)
- INPUT:
model – COBRA model structure. Required fields:
.S - m x n stoichiometric matrix
.b - m x 1 right hand side (dx/dt) of the mass balance
.c - n x 1 linear objective coefficients
.lb - n x 1 lower flux bounds
.ub - n x 1 upper flux bounds
- OPTIONAL INPUTS:
model – COBRA model structure. Optional fields:
.C - k x n matrix of additional coupling constraints (C v <= d)
.d - k x 1 right hand side of the coupling constraints
.dsense - k x 1 sense of the coupling constraints (‘L’, ‘G’, ‘E’)
.csense - m x 1 sense of the mass-balance constraints (‘L’, ‘G’, ‘E’)
.dxdt - m x 1 right hand side of the mass balance (defaults to .b)
.osenseStr - objective sense string used when the osenseStr argument is omitted
osenseStr – (default = ‘max’)
max: \(f* = argmax \{max\ c^T v: Sv \leq, = or \geq b, l \leq v \leq u\}\)
min: \(f* = argmin \{min\ c^T v: Sv \leq, = or \geq b, l \leq v \leq u\}\)
none: ignore the constraint \(c^T v = f*\)
checkMinimalSet – {0,(1)} Heuristically check if the selected set of reactions is minimal by removing one by one the predicted active reaction
true = check (default value)
false = do not check
checkEssentialSet – {0,(1)} Heuristically check if the selected set of reactions is essential
zeroNormApprox – appoximation type of zero-norm (only available when minNorm = ‘zero’) (default = ‘cappedL1’)
‘cappedL1’ : Capped-L1 norm
‘exp’ : Exponential function
‘log’ : Logarithmic function
‘SCAD’ : SCAD function
‘lp-’ : \(L_p\) norm with \(p < 0\)
‘lp+’ : \(L_p\) norm with \(0 < p < 1\)
‘l1’ : L1 norm
‘all’ : try all approximations and return the best result
printLevel – Printing level
0 - Silent (Default)
1 - Summary information
- OUTPUT:
vSparse – Depends on the set of reactions
sparseRxnBool – Returns a vector with 1 and 0’s, where 1 means sparse
essentialRxnBool – Returns a vector with 1 and 0’s, where 1 means essential