- modelMultipleObjectives(model, param)[source]¶
Solves multiple flux balance analysis problems, and variants thereof
- USAGE
solutions = modelMultipleObjectives (model, param)
- INPUT
model – A generic COBRA model
.S - Stoichiometric matrix
.mets - Metabolite ID vector
.rxns - Reaction ID vector
.lb - Lower bound vector
.ub - Upper bound vector
- OPTIONAL INPUTS
param –
a structure containing the parameters for the function:
.modelType - type of predictions {‘sec’, ‘upt’}.
.printLevel - Greater than zero to receive more output printed.
- .objectives -List of objective functions to be tested.
objectives supported: ‘unWeighted0norm’, ‘Weighted0normGE’,
‘Weighted0normBBF’, ‘unWeighted1norm’, ‘Weighted1normGE’, ‘Weighted1normBBF’, ‘unWeighted2norm’, ‘Weighted2normGE’, ‘Weighted2normBBF’, ‘unWeightedTCBMflux’, ‘unWeightedTCBMfluxConc’.
entropicFluxBalanceAnalysis ‘unWeightedTCBMflux’ unweighted thermodynamic constraint based modelling for fluxes. ‘unWeightedTCBMfluxConc’ unweighted thermodynamic constraint based modelling for fluxes and concentrations.
minimize g.*vf’*(log(vf) -1) + (cf + ci)’*vf + g.*vr’*(log(vr) -1) + (cr - ci)’*vr vf,vr,x,x0 + f.*x’ *(log(x) -1) + u0’*x0 + f.*x0’*(log(x0) -1) + u0’*x0
subject to N*(vf - vr) - x + x0 <=> b : y_N C*(vf - vr) <=> d : y_C
vl <= vf - vr <= vu : z_v dxl <= x - x0 <= dxu : z_dx 0 <= vf <= ub : z_vf 0 <= vr <= -lb : z_vr xl <= x <= xu : z_x x0l <= x0 <= x0u : z_x0
A mosek solver is required.
zero-norm ‘unWeighted0norm’ min 0-norm unweighted. and formed.
Minimize the cardinality (zero-norm) of v
\[\begin{split}min ~& d.*||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.
European Journal of Operational Research, 2014” http://dx.doi.org/10.1016/j.ejor.2014.11.031 A LP solver is required.
1-norm ‘unWeighted1norm’ min 1-norm unweighted. ‘Weighted1normGE’ min 1-norm weighted by the gene expression. ‘Weighted1normBBF’ min 1-norm weighted by number of bonds broken and formed.
Minimise the Taxicab Norm using LP.
\[\begin{split}min ~& d.*|v| \\ s.t. ~& S v = b \\ ~& c^T v = f \\ ~& lb \leq v \leq ub\end{split}\]A LP solver is required.
2-norm ‘unWeighted2norm’ min 2-norm unweighted. ‘Weighted2normGE’ min 2-norm weighted by the gene expression. ‘Weighted2normBBF’ min 2-norm weighted by the number of bonds broken and formed.
unweighted; minimises the squared Euclidean Norm of internal fluxes.
\[\begin{split}min ~& 1/2 v'*v \\ s.t. ~& S v = b \\ ~& c^T v = f \\ ~& lb \leq v \leq ub\end{split}\]weighted; n x 1 Forms the diagonal of positive definite 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}\]A QP solver is required.
- OUTPUTS
solutions – The solution for each objective defined in param.objectives * .unWeighted0norm: min 0-norm unweighted * .unWeighted1norm: min 1-norm unweighted. * .Weighted1normGE: min 1-norm weighted by the gene expression. * .Weighted1normBBF: min 1-norm weighted by number of bonds broken * .unWeighted2norm: min 2-norm unweighted. * .Weighted2normGE: min 2-norm weighted by the gene expression. * .Weighted2normBBF: min 2-norm weighted by the number of bonds * .weightedTCBMt * .weightedTCBM * .unWeightedTCBMfluxConcNorm * .unWeightedTCBMfluxConc: unweighted thermodynamic constraint based modelling for fluxes and concentrations * .weightedTCBMflux: * .unWeightedTCBMflux: unweighted thermodynamic constraint based
modelling for fluxes
- modelPredictiveCapacity(model, param)[source]¶
Test the model’s predictive capacity in terms of its ability to predict uptake and secretions, as well as the consistency of flux in reactions and metabolites.
- USAGE
[accuracySummary, fullReport, comparisonStats] = modelPredictiveCapacity (model, param)
- INPUT
model – A Cobra model to be tested
.S - Stoichiometric matrix
.mets - Metabolite ID vector
.rxns - Reaction ID vector
.lb - Lower bound vector
.ub - Upper bound vector
param: Parameters used to test the model
.tests - Array with the tests run on the model (Default: ‘flux’).
- ‘fluxConsistent’: Flux consistency
‘thermoConsistentFlux’: Thermodynamic flux consistency ‘flux’: Objective function comparison based on a training set ‘all’: Do all tests
- .activeInactiveRxn - nx1 with entries {1,-1,0} depending on whether a
reaction must be active, inactive, or unspecified respectively (Required for tests ‘fluxConsistent’ and ‘thermoFluxConsistent’).
- .presentAbsentMet - nx1 with entries {1,-1,0} depending on whether a
metabolite must be present, absent, or unspecified respectively (Required for tests ‘fluxConsistent’ and ‘thermoFluxConsistent’).
- .trainingSet - Table with the training set. It includes the reaction
identifier, the reaction name, the measured mean flux, standard deviation of the flux, the flux units, and the platform used to measure it (Required for test ‘flux’).
- .objectives - List of objective functions to be tested (Required for
test ‘flux’; Default: ‘all’); supported objectives:
‘unWeighted0norm’ min 0-norm unweighted.
‘Weighted0normGE’ min 0-norm weighted by the gene expression.
‘unWeighted1norm’ min 1-norm unweighted
‘Weighted1normGE’ min 1-norm weighted by the gene expression
‘unWeighted2norm’ min 2-norm unweighted
‘Weighted2normGE’ min 2-norm weighted by the gene expression
{‘unWeightedTCBMflux’} unweighted thermodynamic constraint based modelling for fluxes
.printLevel - Greater than zero to receive more output printed.
- OUTPUT
comparisonData – A struct array with two tables in it. * .fullReport - A table comparing each tested reactions with columns:
.fullReport.model - the name of the model
.fullReport.objective - objective function
.fullReport.rxns - reaction identifier
.fullReport.mean - experimental mean flux
.fullReport.SD - experimental standard deviation in flux
.fullReport.target - sign of the exchange flux
.fullReport.v - predicted exchange flux
.fullReport.predict - sign of the predicted flux
.fullReport.agree - true if sign of measured and predicted flux agree
.fullReport.dv - difference between measured and estimated fluxes
.fullReport.messages - error message in the case that there was a problem
.comparisonStats: - A table containing predictive capacity statistics for each objective function tested.
.comparisonStats.objective - objective function
.comparisonStats.model - model compared (both, modelUpt or modelSec)
.comparisonStats.qualAccuracy - qualitative predictive capacity
.comparisonStats.Spearman - Spearman rank
.comparisonStats.SpearmanPval - P value
.comparisonStats.wEuclidNorm - Euclidean norm
summary – The average of the objective function accuracies and the average
of the euclidean distances.