Extract a thermodynamically consistent subnetwork from a given model

  1. Identify the largest subset of a model that admits a thermodynamically consistent flux
  2. Specify a random subset of active/inactive reactions and present/absent metabolites
  3. Remove absent metabolites and inactive reactions, then recalculate the largest subset of a model that admits a thermodynamically consistent flux
  4. Compute the smallest thermodynamically consistent subnetwork containing a list of present metabolites and active reactions
[solverOK,solverInstalled]=changeCobraSolver('ibm_cplex','all');
> changeCobraSolver: IBM ILOG CPLEX interface added to MATLAB path. > ibm_cplex (version 1210) is compatible and fully tested with MATLAB R2019a on your operating system. > changeCobraSolver: Solver for LP problems has been set to ibm_cplex. > changeCobraSolver: IBM ILOG CPLEX interface added to MATLAB path. > ibm_cplex (version 1210) is compatible and fully tested with MATLAB R2019a on your operating system. > changeCobraSolver: Solver for MILP problems has been set to ibm_cplex. > changeCobraSolver: IBM ILOG CPLEX interface added to MATLAB path. > ibm_cplex (version 1210) is compatible and fully tested with MATLAB R2019a on your operating system. > changeCobraSolver: Solver for QP problems has been set to ibm_cplex. > changeCobraSolver: IBM ILOG CPLEX interface added to MATLAB path. > ibm_cplex (version 1210) is compatible and fully tested with MATLAB R2019a on your operating system. > changeCobraSolver: Solver for MIQP problems has been set to ibm_cplex. > changeCobraSolver: Solver ibm_cplex not supported for problems of type NLP. Currently used: matlab
%[solverOK,solverInstalled]=changeCobraSolver('gurobi','all');
%[solverOK,solverInstalled]=changeCobraSolver('ibm_cplex','QP');

Load model

modelToLoad='circularToy';
modelToLoad='ecoli_core';
modelToLoad='modelRecon3MitoOpen';
modelToLoad='Recon3DModel';
%modelToLoad='iDopa';
Load a model
driver_thermoModelLoad
Model loaded: Recon3DModel lower bounds greater than zero Internal stochiometric nullspace computed in 1.5352 seconds.

Remove forced reaction rates

forcedRxnBool = model.lb>0 | model.ub<0;
nForcedRxn = nnz(forcedRxnBool)
nForcedRxn =
1
printConstraints(model,[],[],forcedRxnBool)
Forward_Reaction Name lb ub equation __________________ ________________________________ __ ____ ______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ 'biomass_reaction' 'Generic Human Biomass Reaction' 1 1000 '20.6508 h2o[c] + 20.7045 atp[c] + 0.385872 glu_L[c] + 0.352607 asp_L[c] + 0.036117 gtp[c] + 0.505626 ala_L[c] + 0.279425 asn_L[c] + 0.046571 cys_L[c] + 0.325996 gln_L[c] + 0.538891 gly[c] + 0.392525 ser_L[c] + 0.31269 thr_L[c] + 0.592114 lys_L[c] + 0.35926 arg_L[c] + 0.153018 met_L[c] + 0.023315 pail_hs[c] + 0.039036 ctp[c] + 0.154463 pchol_hs[c] + 0.055374 pe_hs[c] + 0.020401 chsterol[c] + 0.002914 pglyc_hs[c] + 0.011658 clpn_hs[c] + 0.009898 dgtp[n] + 0.009442 dctp[n] + 0.013183 datp[n] + 0.053446 utp[c] + 0.013091 dttp[n] + 0.275194 g6p[c] + 0.126406 his_L[c] + 0.159671 tyr_L[c] + 0.286078 ile_L[c] + 0.545544 leu_L[c] + 0.013306 trp_L[c] + 0.259466 phe_L[c] + 0.412484 pro_L[c] + 0.005829 ps_hs[c] + 0.017486 sphmyln_hs[c] + 0.352607 val_L[c] -> 20.6508 h[c] + 20.6508 adp[c] + 20.6508 pi[c] '
model.lb(strcmp(model.rxns,'biomass_reaction'))=0;

Stoichiometric consistency

if ~isfield(model,'SConsistentRxnBool') || ~isfield(model,'SConsistentMetBool')
massBalanceCheck=0;
%massBalanceCheck=1;
printLevel=2;
[SConsistentMetBool, SConsistentRxnBool, SInConsistentMetBool, SInConsistentRxnBool, unknownSConsistencyMetBool, unknownSConsistencyRxnBool, model,stoichConsistModel]...
= findStoichConsistentSubset(model, massBalanceCheck, printLevel);
else
%Extract stoich consistent submodel
if any(~model.SConsistentMetBool)
rxnRemoveMethod='inclusive';%maintains stoichiometric consistency
[stoichConsistModel, rxnRemoveList] = removeMetabolites(model, model.mets(~model.SConsistentMetBool),rxnRemoveMethod);
SConsistentRxnBool2=~ismember(model.rxns,rxnRemoveList);
if ~all(model.SConsistentRxnBool==SConsistentRxnBool2)
error('inconsistent reaction removal')
end
try
stoichConsistModel = removeUnusedGenes(stoichConsistModel);
catch ME
disp(ME.message)
end
else
stoichConsistModel = model;
end
end
 
[nMet,nRxn]=size(stoichConsistModel.S)
nMet =
5835
nRxn =
10600

Flux consistency

fluxConsistentParam.method='fastcc';%can handle additional constraints
fluxConsistentParam.printLevel=1;
[~,~,~,~,stoichConsistModel]= findFluxConsistentSubset(stoichConsistModel,fluxConsistentParam);
Extract flux consistent submodel
if any(~stoichConsistModel.fluxConsistentRxnBool)
rxnRemoveList = stoichConsistModel.rxns(~stoichConsistModel.fluxConsistentRxnBool);
stoichFluxConsistModel = removeRxns(stoichConsistModel, rxnRemoveList,'metRemoveMethod','exclusive','ctrsRemoveMethod','inclusive');
try
stoichFluxConsistModel = removeUnusedGenes(stoichFluxConsistModel);
catch ME
disp(ME.message)
end
else
stoichFluxConsistModel = stoichConsistModel;
end
[nMet,nRxn]=size(stoichFluxConsistModel.S)
nMet =
5835
nRxn =
10600

Thermodynamic consistency

%save('debug_prior_to_findThermoConsistentFluxSubset.mat')
%return
param.printLevel = 1;
[thermoFluxConsistentMetBool,thermoFluxConsistentRxnBool,stoichFluxConsistModel,stoichFluxThermoConsistModel] = findThermoConsistentFluxSubset(stoichFluxConsistModel,param);
--- findThermoFluxConsistentSubset START ---- printLevel: 1 n: 200 normalizeZeroNormWeights: 0 epsilon: 1e-06 formulation: 'pqzw' iterationMethod: 'random' nMax: 20 relaxBounds: 1 acceptRepairedFlux: 1 warmStartMethod: 'random' thetaMultiplier: 1.5 theta: 0.5 regularizeOuter: 0 thermoConsistencyMethod: 'cycleFreeFlux' bigNum: 10000 debug: 0 optCardThermo objective data: 0.1 = beta, the global weight on one-norm of internal reaction rate. -5 = min(g0), the local weight on zero-norm of internal reaction rate. -0 = max(g0), the local weight on zero-norm of internal reaction rate. 0 = min(h0), the local weight on zero-norm of metabolite production rate. 0 = max(h0), the local weight on zero-norm of metabolite production rate. optimizeCardinality objective data: 0 min cardinality variables: NaN mean(c(p)) NaN min(c(p)) NaN max(c(p)) 1 lambda0 NaN min(k) NaN max(k) 1 lambda1 NaN min(o(p)) NaN max(o(p)) 5358 max cardinality variables: -0 mean(c(q)) -0 min(c(q)) -0 max(c(q)) 1 delta0 5 min(d) 5 max(d) 0 delta1 0 min(o(q)) 0 max(o(q)) 22824 cardinality free variables: 0.077 mean(c(r)) -0 min(c(r)) 0.1 max(c(r)) 0 alpha1 0 min(o(r)) 0 max(o(r)) itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec 1 0.50 7.6672e+05 -8.8e+06 -2.2e+04 1.6e+03 0 0 0 -23700 -2.3e+04 0 NaN 0 1.440420e+00 2 0.75 161.49 -7.9e+02 -2.3e+04 1.1e+03 0 0 0 -23840 -2.4e+04 0 NaN 0 1.824227e+00 3 1.12 90.057 -4.3e+02 -2.3e+04 7.3e+02 0 0 0 -23860 -2.4e+04 0 NaN 0 1.834830e+00 4 1.69 59.684 -2.6e+02 -2.3e+04 4.9e+02 0 0 0 -23860 -2.4e+04 0 NaN 0 1.717665e+00 5 2.53 38.202 -1.6e+02 -2.4e+04 3.2e+02 0 0 0 -23860 -2.4e+04 0 NaN 0 1.651197e+00 6 3.80 25.75 -1.1e+02 -2.4e+04 2.2e+02 0 0 0 -23860 -2.4e+04 0 NaN 0 1.933216e+00 7 5.70 17.391 -72 -2.4e+04 1.4e+02 0 0 0 -23860 -2.4e+04 0 NaN 0 1.681748e+00 8 8.54 12.147 -48 -2.4e+04 97 0 0 0 -23860 -2.4e+04 0 NaN 0 1.306944e+00 9 12.81 13.536 -53 -2.4e+04 67 0 0 0 -23880 -2.4e+04 0 NaN 0 2.171999e+00 10 19.22 7.1044 -23 -2.4e+04 45 0 0 0 -23880 -2.4e+04 0 NaN 0 1.281395e+00 11 28.83 5.0586 -15 -2.4e+04 30 0 0 0 -23880 -2.4e+04 0 NaN 0 1.600765e+00 12 43.25 3.3766 -10 -2.4e+04 20 0 0 0 -23880 -2.4e+04 0 NaN 0 1.541121e+00 13 64.87 2.2681 -17 -2.4e+04 13 0 0 0 -23890 -2.4e+04 0 NaN 0 1.575860e+00 14 97.31 1.59 -4.4 -2.4e+04 8.9 0 0 0 -23890 -2.4e+04 0 NaN 0 1.789986e+00 15 145.96 1.0555 -3 -2.4e+04 5.9 0 0 0 -23890 -2.4e+04 0 NaN 0 1.792624e+00 16 218.95 0.6324 -2 -2.4e+04 3.9 0 0 0 -23890 -2.4e+04 0 NaN 0 2.008501e+00 17 328.42 0.46083 -1.3 -2.4e+04 2.6 0 0 0 -23890 -2.4e+04 0 NaN 0 1.983804e+00 itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec Optimise cardinality reached the stopping criterion. Finished. 100.00% thermodynamically feasible internal fluxes (checked by cycleFreeFlux method). iter card(y) nz %feas int.nz. tot %feas int.nz. tot %feas ext.nz. iteration formulation 1 5358 7593 1.00 0.67 0.93 random pqzw 2 1467 5506 1.00 0.85 0.98 random pqzw 3 706 5006 1.00 0.92 0.99 random pqzw 4 352 3403 1.00 0.95 1.00 random pqzw 5 218 4480 1.00 0.97 1.00 random pqzw 6 126 2147 1.00 0.97 1.00 random pqzw 7 118 1301 1.00 0.98 1.00 random pqzw 8 110 1095 1.00 0.98 1.00 random pqzw 9 113 639 1.00 0.98 1.00 random pqzw 10 94 2 NaN 0.98 1.00 random pqzw 11 93 1739 1.00 0.98 1.00 greedyRandom pqzw 12 87 2 NaN 0.98 1.00 greedyRandom pqzw 13 92 7 1.00 0.98 1.00 greedyRandom pqzw 14 107 2 NaN 0.98 1.00 greedyRandom pqzw 15 101 2 NaN 0.98 1.00 greedyRandom pqzw 16 93 342 1.00 0.98 1.00 greedyRandom pqzw 17 91 1014 1.00 0.98 1.00 greedyRandom pqzw 18 76 2 NaN 0.98 1.00 greedyRandom pqzw iter card(y) nz %feas int.nz. tot %feas int.nz. tot %feas ext.nz. iteration formulation findThermoConsistentFluxSubset terminating early: no progress on % internal reactions thermodynamically flux consistent --- findThermoFluxConsistentSubset END ----
Size of the largest flux, stoich and thermo consistent submodel
[nMet,nRxn]=size(stoichFluxThermoConsistModel.S)
nMet =
5756
nRxn =
10447

Nullspace

Nullspace is necessary for backup check of thermodynamic consistency using thermoFlux2QNty
[stoichFluxThermoConsistModel,rankK,nnzK,timeTaken] = internalNullspace(stoichFluxThermoConsistModel);
rankK
rankK =
5522

Minimal thermodynamically consistent submodel

Compute the minimal thermodynamically consistent submodel
[minimalModel, modelThermoMetBool, modelThermoRxnBool] = thermoKernel(stoichFluxThermoConsistModel);
--- thermoKernel START ---- warmStartMethod: 'random' formulation: 'pqzwrs' thetaMultiplier: 1.5 theta: 0.5 regularizeOuter: 1 epsilon: 1e-06 printLevel: 3 relaxBounds: 0 acceptRepairedFlux: 1 thermoConsistencyMethod: 'cycleFreeFlux' bigNum: 10000 debug: 0 optCardThermo objective data: 1 = beta, the global weight on one-norm of internal reaction rate. 1 = min(g0), the local weight on zero-norm of internal reaction rate. 1 = max(g0), the local weight on zero-norm of internal reaction rate. 1 = min(h0), the local weight on zero-norm of metabolite production rate. 1 = max(h0), the local weight on zero-norm of metabolite production rate. optimizeCardinality objective data: 16203 min cardinality variables: 0 mean(c(p)) -0 min(c(p)) -0 max(c(p)) 1 lambda0 1 min(k) 1 max(k) 0 lambda1 0 min(o(p)) 0 max(o(p)) 0 max cardinality variables: NaN mean(c(q)) NaN min(c(q)) NaN max(c(q)) 1 delta0 NaN min(d) NaN max(d) 0 delta1 NaN min(o(q)) NaN max(o(q)) 23034 cardinality free variables: 0.75 mean(c(r)) 0 min(c(r)) 1 max(c(r)) 0 alpha1 0 min(o(r)) 0 max(o(r)) itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec 1 0.50 9.8642e+05 -8.7e+07 0 0 0 0 0 -0 -0 0 NaN 0 1.083430e+00 2 0.75 0 0 0 0 0 0 0 -0 -0 0 NaN 0 6.487970e-01 itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec Optimise cardinality reached the stopping criterion. Finished. 100.00% thermodynamically feasible internal fluxes (checked by cycleFreeFlux method). iter. nz.flux.%it.feas.int.flux. %feas.inc.flux. nz.prod. %it.feas.nz.prod. %feas.inc.prod. formulation 1 2 NaN NaN 0 NaN NaN greedyRandom warmStartMethod: 'random' formulation: 'pqzwrs' thetaMultiplier: 1.5 theta: 0.5 regularizeOuter: 1 epsilon: 1e-06 printLevel: 2 relaxBounds: 0 acceptRepairedFlux: 1 thermoConsistencyMethod: 'cycleFreeFlux' bigNum: 10000 debug: 0 optCardThermo objective data: 1 = beta, the global weight on one-norm of internal reaction rate. 1 = min(g0), the local weight on zero-norm of internal reaction rate. 1 = max(g0), the local weight on zero-norm of internal reaction rate. 1 = min(h0), the local weight on zero-norm of metabolite production rate. 1 = max(h0), the local weight on zero-norm of metabolite production rate. optimizeCardinality objective data: 16203 min cardinality variables: 0 mean(c(p)) -0 min(c(p)) -0 max(c(p)) 1 lambda0 1 min(k) 1 max(k) 0 lambda1 0 min(o(p)) 0 max(o(p)) 0 max cardinality variables: NaN mean(c(q)) NaN min(c(q)) NaN max(c(q)) 1 delta0 NaN min(d) NaN max(d) 0 delta1 NaN min(o(q)) NaN max(o(q)) 23034 cardinality free variables: 0.75 mean(c(r)) 0 min(c(r)) 1 max(c(r)) 0 alpha1 0 min(o(r)) 0 max(o(r)) itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec 1 0.50 9.8153e+05 -8.7e+07 0 0 0 0 0 -0 -0 0 NaN 0 1.224542e+00 2 0.75 0 0 0 0 0 0 0 -0 -0 0 NaN 0 7.411580e-01 itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec Optimise cardinality reached the stopping criterion. Finished. 100.00% thermodynamically feasible internal fluxes (checked by cycleFreeFlux method). 2 2 NaN NaN 0 NaN NaN greedyRandom warmStartMethod: 'random' formulation: 'pqzwrs' thetaMultiplier: 1.5 theta: 0.5 regularizeOuter: 1 epsilon: 1e-06 printLevel: 2 relaxBounds: 0 acceptRepairedFlux: 1 thermoConsistencyMethod: 'cycleFreeFlux' bigNum: 10000 debug: 0 optCardThermo objective data: 1 = beta, the global weight on one-norm of internal reaction rate. 1 = min(g0), the local weight on zero-norm of internal reaction rate. 1 = max(g0), the local weight on zero-norm of internal reaction rate. 1 = min(h0), the local weight on zero-norm of metabolite production rate. 1 = max(h0), the local weight on zero-norm of metabolite production rate. optimizeCardinality objective data: 16203 min cardinality variables: 0 mean(c(p)) -0 min(c(p)) -0 max(c(p)) 1 lambda0 1 min(k) 1 max(k) 0 lambda1 0 min(o(p)) 0 max(o(p)) 0 max cardinality variables: NaN mean(c(q)) NaN min(c(q)) NaN max(c(q)) 1 delta0 NaN min(d) NaN max(d) 0 delta1 NaN min(o(q)) NaN max(o(q)) 23034 cardinality free variables: 0.75 mean(c(r)) 0 min(c(r)) 1 max(c(r)) 0 alpha1 0 min(o(r)) 0 max(o(r)) itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec 1 0.50 9.8337e+05 -8.7e+07 0 0 0 0 0 -0 -0 0 NaN 0 1.037824e+00 2 0.75 0 0 0 0 0 0 0 -0 -0 0 NaN 0 7.700560e-01 itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec Optimise cardinality reached the stopping criterion. Finished. 100.00% thermodynamically feasible internal fluxes (checked by cycleFreeFlux method). 3 2 NaN NaN 0 NaN NaN greedyRandom warmStartMethod: 'random' formulation: 'pqzwrs' thetaMultiplier: 1.5 theta: 0.5 regularizeOuter: 1 epsilon: 1e-06 printLevel: 2 relaxBounds: 0 acceptRepairedFlux: 1 thermoConsistencyMethod: 'cycleFreeFlux' bigNum: 10000 debug: 0 optCardThermo objective data: 1 = beta, the global weight on one-norm of internal reaction rate. 1 = min(g0), the local weight on zero-norm of internal reaction rate. 1 = max(g0), the local weight on zero-norm of internal reaction rate. 1 = min(h0), the local weight on zero-norm of metabolite production rate. 1 = max(h0), the local weight on zero-norm of metabolite production rate. optimizeCardinality objective data: 16203 min cardinality variables: 0 mean(c(p)) -0 min(c(p)) -0 max(c(p)) 1 lambda0 1 min(k) 1 max(k) 0 lambda1 0 min(o(p)) 0 max(o(p)) 0 max cardinality variables: NaN mean(c(q)) NaN min(c(q)) NaN max(c(q)) 1 delta0 NaN min(d) NaN max(d) 0 delta1 NaN min(o(q)) NaN max(o(q)) 23034 cardinality free variables: 0.75 mean(c(r)) 0 min(c(r)) 1 max(c(r)) 0 alpha1 0 min(o(r)) 0 max(o(r)) itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec 1 0.50 9.7839e+05 -8.6e+07 0 0 0 0 0 -0 -0 0 NaN 0 9.420250e-01 2 0.75 0 0 0 0 0 0 0 -0 -0 0 NaN 0 6.316860e-01 itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec Optimise cardinality reached the stopping criterion. Finished. 100.00% thermodynamically feasible internal fluxes (checked by cycleFreeFlux method). 4 2 NaN NaN 0 NaN NaN greedyRandom warmStartMethod: 'random' formulation: 'pqzwrs' thetaMultiplier: 1.5 theta: 0.5 regularizeOuter: 1 epsilon: 1e-06 printLevel: 2 relaxBounds: 0 acceptRepairedFlux: 1 thermoConsistencyMethod: 'cycleFreeFlux' bigNum: 10000 debug: 0 optCardThermo objective data: 1 = beta, the global weight on one-norm of internal reaction rate. 1 = min(g0), the local weight on zero-norm of internal reaction rate. 1 = max(g0), the local weight on zero-norm of internal reaction rate. 1 = min(h0), the local weight on zero-norm of metabolite production rate. 1 = max(h0), the local weight on zero-norm of metabolite production rate. optimizeCardinality objective data: 16203 min cardinality variables: 0 mean(c(p)) -0 min(c(p)) -0 max(c(p)) 1 lambda0 1 min(k) 1 max(k) 0 lambda1 0 min(o(p)) 0 max(o(p)) 0 max cardinality variables: NaN mean(c(q)) NaN min(c(q)) NaN max(c(q)) 1 delta0 NaN min(d) NaN max(d) 0 delta1 NaN min(o(q)) NaN max(o(q)) 23034 cardinality free variables: 0.75 mean(c(r)) 0 min(c(r)) 1 max(c(r)) 0 alpha1 0 min(o(r)) 0 max(o(r)) itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec 1 0.50 9.8617e+05 -8.7e+07 0 0 0 0 0 -0 -0 0 NaN 0 9.423510e-01 2 0.75 0 0 0 0 0 0 0 -0 -0 0 NaN 0 6.316410e-01 itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec Optimise cardinality reached the stopping criterion. Finished. 100.00% thermodynamically feasible internal fluxes (checked by cycleFreeFlux method). 5 2 NaN NaN 0 NaN NaN greedyRandom warmStartMethod: 'random' formulation: 'pqzwrs' thetaMultiplier: 1.5 theta: 0.5 regularizeOuter: 1 epsilon: 1e-06 printLevel: 2 relaxBounds: 0 acceptRepairedFlux: 1 thermoConsistencyMethod: 'cycleFreeFlux' bigNum: 10000 debug: 0 optCardThermo objective data: 1 = beta, the global weight on one-norm of internal reaction rate. 1 = min(g0), the local weight on zero-norm of internal reaction rate. 1 = max(g0), the local weight on zero-norm of internal reaction rate. 1 = min(h0), the local weight on zero-norm of metabolite production rate. 1 = max(h0), the local weight on zero-norm of metabolite production rate. optimizeCardinality objective data: 16203 min cardinality variables: 0 mean(c(p)) -0 min(c(p)) -0 max(c(p)) 1 lambda0 1 min(k) 1 max(k) 0 lambda1 0 min(o(p)) 0 max(o(p)) 0 max cardinality variables: NaN mean(c(q)) NaN min(c(q)) NaN max(c(q)) 1 delta0 NaN min(d) NaN max(d) 0 delta1 NaN min(o(q)) NaN max(o(q)) 23034 cardinality free variables: 0.75 mean(c(r)) 0 min(c(r)) 1 max(c(r)) 0 alpha1 0 min(o(r)) 0 max(o(r)) itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec 1 0.50 9.8379e+05 -8.6e+07 0 0 0 0 0 -0 -0 0 NaN 0 7.050070e-01 2 0.75 0 0 0 0 0 0 0 -0 -0 0 NaN 0 7.202820e-01 itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec Optimise cardinality reached the stopping criterion. Finished. 100.00% thermodynamically feasible internal fluxes (checked by cycleFreeFlux method). 6 2 NaN NaN 0 NaN NaN greedyRandom warmStartMethod: 'random' formulation: 'pqzwrs' thetaMultiplier: 1.5 theta: 0.5 regularizeOuter: 1 epsilon: 1e-06 printLevel: 2 relaxBounds: 0 acceptRepairedFlux: 1 thermoConsistencyMethod: 'cycleFreeFlux' bigNum: 10000 debug: 0 optCardThermo objective data: 1 = beta, the global weight on one-norm of internal reaction rate. 1 = min(g0), the local weight on zero-norm of internal reaction rate. 1 = max(g0), the local weight on zero-norm of internal reaction rate. 1 = min(h0), the local weight on zero-norm of metabolite production rate. 1 = max(h0), the local weight on zero-norm of metabolite production rate. optimizeCardinality objective data: 16203 min cardinality variables: 0 mean(c(p)) -0 min(c(p)) -0 max(c(p)) 1 lambda0 1 min(k) 1 max(k) 0 lambda1 0 min(o(p)) 0 max(o(p)) 0 max cardinality variables: NaN mean(c(q)) NaN min(c(q)) NaN max(c(q)) 1 delta0 NaN min(d) NaN max(d) 0 delta1 NaN min(o(q)) NaN max(o(q)) 23034 cardinality free variables: 0.75 mean(c(r)) 0 min(c(r)) 1 max(c(r)) 0 alpha1 0 min(o(r)) 0 max(o(r)) itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec 1 0.50 9.8185e+05 -8.6e+07 0 0 0 0 0 -0 -0 0 NaN 0 1.130825e+00 2 0.75 0 0 0 0 0 0 0 -0 -0 0 NaN 0 7.554220e-01 itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec Optimise cardinality reached the stopping criterion. Finished. 100.00% thermodynamically feasible internal fluxes (checked by cycleFreeFlux method). 7 2 NaN NaN 0 NaN NaN greedyRandom warmStartMethod: 'random' formulation: 'pqzwrs' thetaMultiplier: 1.5 theta: 0.5 regularizeOuter: 1 epsilon: 1e-06 printLevel: 2 relaxBounds: 0 acceptRepairedFlux: 1 thermoConsistencyMethod: 'cycleFreeFlux' bigNum: 10000 debug: 0 optCardThermo objective data: 1 = beta, the global weight on one-norm of internal reaction rate. 1 = min(g0), the local weight on zero-norm of internal reaction rate. 1 = max(g0), the local weight on zero-norm of internal reaction rate. 1 = min(h0), the local weight on zero-norm of metabolite production rate. 1 = max(h0), the local weight on zero-norm of metabolite production rate. optimizeCardinality objective data: 16203 min cardinality variables: 0 mean(c(p)) -0 min(c(p)) -0 max(c(p)) 1 lambda0 1 min(k) 1 max(k) 0 lambda1 0 min(o(p)) 0 max(o(p)) 0 max cardinality variables: NaN mean(c(q)) NaN min(c(q)) NaN max(c(q)) 1 delta0 NaN min(d) NaN max(d) 0 delta1 NaN min(o(q)) NaN max(o(q)) 23034 cardinality free variables: 0.75 mean(c(r)) 0 min(c(r)) 1 max(c(r)) 0 alpha1 0 min(o(r)) 0 max(o(r)) itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec 1 0.50 9.8498e+05 -8.7e+07 0 0 0 0 0 -0 -0 0 NaN 0 1.062078e+00 2 0.75 0 0 0 0 0 0 0 -0 -0 0 NaN 0 7.890690e-01 itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec Optimise cardinality reached the stopping criterion. Finished. 100.00% thermodynamically feasible internal fluxes (checked by cycleFreeFlux method). 8 2 NaN NaN 0 NaN NaN greedyRandom warmStartMethod: 'random' formulation: 'pqzwrs' thetaMultiplier: 1.5 theta: 0.5 regularizeOuter: 1 epsilon: 1e-06 printLevel: 2 relaxBounds: 0 acceptRepairedFlux: 1 thermoConsistencyMethod: 'cycleFreeFlux' bigNum: 10000 debug: 0 optCardThermo objective data: 1 = beta, the global weight on one-norm of internal reaction rate. 1 = min(g0), the local weight on zero-norm of internal reaction rate. 1 = max(g0), the local weight on zero-norm of internal reaction rate. 1 = min(h0), the local weight on zero-norm of metabolite production rate. 1 = max(h0), the local weight on zero-norm of metabolite production rate. optimizeCardinality objective data: 16203 min cardinality variables: 0 mean(c(p)) -0 min(c(p)) -0 max(c(p)) 1 lambda0 1 min(k) 1 max(k) 0 lambda1 0 min(o(p)) 0 max(o(p)) 0 max cardinality variables: NaN mean(c(q)) NaN min(c(q)) NaN max(c(q)) 1 delta0 NaN min(d) NaN max(d) 0 delta1 NaN min(o(q)) NaN max(o(q)) 23034 cardinality free variables: 0.75 mean(c(r)) 0 min(c(r)) 1 max(c(r)) 0 alpha1 0 min(o(r)) 0 max(o(r)) itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec 1 0.50 9.8335e+05 -8.7e+07 0 0 0 0 0 -0 -0 0 NaN 0 8.963070e-01 2 0.75 0 0 0 0 0 0 0 -0 -0 0 NaN 0 1.134930e+00 itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec Optimise cardinality reached the stopping criterion. Finished. 100.00% thermodynamically feasible internal fluxes (checked by cycleFreeFlux method). 9 2 NaN NaN 0 NaN NaN greedyRandom warmStartMethod: 'random' formulation: 'pqzwrs' thetaMultiplier: 1.5 theta: 0.5 regularizeOuter: 1 epsilon: 1e-06 printLevel: 2 relaxBounds: 0 acceptRepairedFlux: 1 thermoConsistencyMethod: 'cycleFreeFlux' bigNum: 10000 debug: 0 optCardThermo objective data: 1 = beta, the global weight on one-norm of internal reaction rate. 1 = min(g0), the local weight on zero-norm of internal reaction rate. 1 = max(g0), the local weight on zero-norm of internal reaction rate. 1 = min(h0), the local weight on zero-norm of metabolite production rate. 1 = max(h0), the local weight on zero-norm of metabolite production rate. optimizeCardinality objective data: 16203 min cardinality variables: 0 mean(c(p)) -0 min(c(p)) -0 max(c(p)) 1 lambda0 1 min(k) 1 max(k) 0 lambda1 0 min(o(p)) 0 max(o(p)) 0 max cardinality variables: NaN mean(c(q)) NaN min(c(q)) NaN max(c(q)) 1 delta0 NaN min(d) NaN max(d) 0 delta1 NaN min(o(q)) NaN max(o(q)) 23034 cardinality free variables: 0.75 mean(c(r)) 0 min(c(r)) 1 max(c(r)) 0 alpha1 0 min(o(r)) 0 max(o(r)) itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec 1 0.50 9.8281e+05 -8.7e+07 0 0 0 0 0 -0 -0 0 NaN 0 1.066479e+00 2 0.75 0 0 0 0 0 0 0 -0 -0 0 NaN 0 7.394930e-01 itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec Optimise cardinality reached the stopping criterion. Finished. 100.00% thermodynamically feasible internal fluxes (checked by cycleFreeFlux method). 10 2 NaN NaN 0 NaN NaN greedyRandom warmStartMethod: 'random' formulation: 'pqzwrs' thetaMultiplier: 1.5 theta: 0.5 regularizeOuter: 1 epsilon: 1e-06 printLevel: 2 relaxBounds: 0 acceptRepairedFlux: 1 thermoConsistencyMethod: 'cycleFreeFlux' bigNum: 10000 debug: 0 optCardThermo objective data: 1 = beta, the global weight on one-norm of internal reaction rate. 1 = min(g0), the local weight on zero-norm of internal reaction rate. 1 = max(g0), the local weight on zero-norm of internal reaction rate. 1 = min(h0), the local weight on zero-norm of metabolite production rate. 1 = max(h0), the local weight on zero-norm of metabolite production rate. optimizeCardinality objective data: 16203 min cardinality variables: 0 mean(c(p)) -0 min(c(p)) -0 max(c(p)) 1 lambda0 1 min(k) 1 max(k) 0 lambda1 0 min(o(p)) 0 max(o(p)) 0 max cardinality variables: NaN mean(c(q)) NaN min(c(q)) NaN max(c(q)) 1 delta0 NaN min(d) NaN max(d) 0 delta1 NaN min(o(q)) NaN max(o(q)) 23034 cardinality free variables: 0.75 mean(c(r)) 0 min(c(r)) 1 max(c(r)) 0 alpha1 0 min(o(r)) 0 max(o(r)) itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec 1 0.50 9.7854e+05 -8.6e+07 0 0 0 0 0 -0 -0 0 NaN 0 1.086685e+00 2 0.75 0 0 0 0 0 0 0 -0 -0 0 NaN 0 1.222169e+00 itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec Optimise cardinality reached the stopping criterion. Finished. 100.00% thermodynamically feasible internal fluxes (checked by cycleFreeFlux method). 11 2 NaN NaN 0 NaN NaN greedyRandom warmStartMethod: 'random' formulation: 'pqzwrs' thetaMultiplier: 1.5 theta: 0.5 regularizeOuter: 1 epsilon: 1e-06 printLevel: 2 relaxBounds: 0 acceptRepairedFlux: 1 thermoConsistencyMethod: 'cycleFreeFlux' bigNum: 10000 debug: 0 optCardThermo objective data: 1 = beta, the global weight on one-norm of internal reaction rate. 1 = min(g0), the local weight on zero-norm of internal reaction rate. 1 = max(g0), the local weight on zero-norm of internal reaction rate. 1 = min(h0), the local weight on zero-norm of metabolite production rate. 1 = max(h0), the local weight on zero-norm of metabolite production rate. optimizeCardinality objective data: 16203 min cardinality variables: 0 mean(c(p)) -0 min(c(p)) -0 max(c(p)) 1 lambda0 1 min(k) 1 max(k) 0 lambda1 0 min(o(p)) 0 max(o(p)) 0 max cardinality variables: NaN mean(c(q)) NaN min(c(q)) NaN max(c(q)) 1 delta0 NaN min(d) NaN max(d) 0 delta1 NaN min(o(q)) NaN max(o(q)) 23034 cardinality free variables: 0.75 mean(c(r)) 0 min(c(r)) 1 max(c(r)) 0 alpha1 0 min(o(r)) 0 max(o(r)) itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec 1 0.50 9.8416e+05 -8.6e+07 0 0 0 0 0 -0 -0 0 NaN 0 1.185041e+00 2 0.75 0 0 0 0 0 0 0 -0 -0 0 NaN 0 6.988850e-01 itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec Optimise cardinality reached the stopping criterion. Finished. 100.00% thermodynamically feasible internal fluxes (checked by cycleFreeFlux method). 12 2 NaN NaN 0 NaN NaN greedyRandom warmStartMethod: 'random' formulation: 'pqzwrs' thetaMultiplier: 1.5 theta: 0.5 regularizeOuter: 1 epsilon: 1e-06 printLevel: 2 relaxBounds: 0 acceptRepairedFlux: 1 thermoConsistencyMethod: 'cycleFreeFlux' bigNum: 10000 debug: 0 optCardThermo objective data: 1 = beta, the global weight on one-norm of internal reaction rate. 1 = min(g0), the local weight on zero-norm of internal reaction rate. 1 = max(g0), the local weight on zero-norm of internal reaction rate. 1 = min(h0), the local weight on zero-norm of metabolite production rate. 1 = max(h0), the local weight on zero-norm of metabolite production rate. optimizeCardinality objective data: 16203 min cardinality variables: 0 mean(c(p)) -0 min(c(p)) -0 max(c(p)) 1 lambda0 1 min(k) 1 max(k) 0 lambda1 0 min(o(p)) 0 max(o(p)) 0 max cardinality variables: NaN mean(c(q)) NaN min(c(q)) NaN max(c(q)) 1 delta0 NaN min(d) NaN max(d) 0 delta1 NaN min(o(q)) NaN max(o(q)) 23034 cardinality free variables: 0.75 mean(c(r)) 0 min(c(r)) 1 max(c(r)) 0 alpha1 0 min(o(r)) 0 max(o(r)) itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec 1 0.50 9.8362e+05 -8.6e+07 0 0 0 0 0 -0 -0 0 NaN 0 9.284690e-01 2 0.75 0 0 0 0 0 0 0 -0 -0 0 NaN 0 8.145570e-01 itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec Optimise cardinality reached the stopping criterion. Finished. 100.00% thermodynamically feasible internal fluxes (checked by cycleFreeFlux method). 13 2 NaN NaN 0 NaN NaN greedyRandom warmStartMethod: 'random' formulation: 'pqzwrs' thetaMultiplier: 1.5 theta: 0.5 regularizeOuter: 1 epsilon: 1e-06 printLevel: 2 relaxBounds: 0 acceptRepairedFlux: 1 thermoConsistencyMethod: 'cycleFreeFlux' bigNum: 10000 debug: 0 optCardThermo objective data: 1 = beta, the global weight on one-norm of internal reaction rate. 1 = min(g0), the local weight on zero-norm of internal reaction rate. 1 = max(g0), the local weight on zero-norm of internal reaction rate. 1 = min(h0), the local weight on zero-norm of metabolite production rate. 1 = max(h0), the local weight on zero-norm of metabolite production rate. optimizeCardinality objective data: 16203 min cardinality variables: 0 mean(c(p)) -0 min(c(p)) -0 max(c(p)) 1 lambda0 1 min(k) 1 max(k) 0 lambda1 0 min(o(p)) 0 max(o(p)) 0 max cardinality variables: NaN mean(c(q)) NaN min(c(q)) NaN max(c(q)) 1 delta0 NaN min(d) NaN max(d) 0 delta1 NaN min(o(q)) NaN max(o(q)) 23034 cardinality free variables: 0.75 mean(c(r)) 0 min(c(r)) 1 max(c(r)) 0 alpha1 0 min(o(r)) 0 max(o(r)) itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec 1 0.50 9.8003e+05 -8.6e+07 0 0 0 0 0 -0 -0 0 NaN 0 1.046447e+00 2 0.75 0 0 0 0 0 0 0 -0 -0 0 NaN 0 1.198104e+00 itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec Optimise cardinality reached the stopping criterion. Finished. 100.00% thermodynamically feasible internal fluxes (checked by cycleFreeFlux method). 14 2 NaN NaN 0 NaN NaN greedyRandom warmStartMethod: 'random' formulation: 'pqzwrs' thetaMultiplier: 1.5 theta: 0.5 regularizeOuter: 1 epsilon: 1e-06 printLevel: 2 relaxBounds: 0 acceptRepairedFlux: 1 thermoConsistencyMethod: 'cycleFreeFlux' bigNum: 10000 debug: 0 optCardThermo objective data: 1 = beta, the global weight on one-norm of internal reaction rate. 1 = min(g0), the local weight on zero-norm of internal reaction rate. 1 = max(g0), the local weight on zero-norm of internal reaction rate. 1 = min(h0), the local weight on zero-norm of metabolite production rate. 1 = max(h0), the local weight on zero-norm of metabolite production rate. optimizeCardinality objective data: 16203 min cardinality variables: 0 mean(c(p)) -0 min(c(p)) -0 max(c(p)) 1 lambda0 1 min(k) 1 max(k) 0 lambda1 0 min(o(p)) 0 max(o(p)) 0 max cardinality variables: NaN mean(c(q)) NaN min(c(q)) NaN max(c(q)) 1 delta0 NaN min(d) NaN max(d) 0 delta1 NaN min(o(q)) NaN max(o(q)) 23034 cardinality free variables: 0.75 mean(c(r)) 0 min(c(r)) 1 max(c(r)) 0 alpha1 0 min(o(r)) 0 max(o(r)) itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec 1 0.50 9.8108e+05 -8.7e+07 0 0 0 0 0 -0 -0 0 NaN 0 9.277270e-01 2 0.75 0 0 0 0 0 0 0 -0 -0 0 NaN 0 6.602840e-01 itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec Optimise cardinality reached the stopping criterion. Finished. 100.00% thermodynamically feasible internal fluxes (checked by cycleFreeFlux method). 15 2 NaN NaN 0 NaN NaN greedyRandom warmStartMethod: 'random' formulation: 'pqzwrs' thetaMultiplier: 1.5 theta: 0.5 regularizeOuter: 1 epsilon: 1e-06 printLevel: 2 relaxBounds: 0 acceptRepairedFlux: 1 thermoConsistencyMethod: 'cycleFreeFlux' bigNum: 10000 debug: 0 optCardThermo objective data: 1 = beta, the global weight on one-norm of internal reaction rate. 1 = min(g0), the local weight on zero-norm of internal reaction rate. 1 = max(g0), the local weight on zero-norm of internal reaction rate. 1 = min(h0), the local weight on zero-norm of metabolite production rate. 1 = max(h0), the local weight on zero-norm of metabolite production rate. optimizeCardinality objective data: 16203 min cardinality variables: 0 mean(c(p)) -0 min(c(p)) -0 max(c(p)) 1 lambda0 1 min(k) 1 max(k) 0 lambda1 0 min(o(p)) 0 max(o(p)) 0 max cardinality variables: NaN mean(c(q)) NaN min(c(q)) NaN max(c(q)) 1 delta0 NaN min(d) NaN max(d) 0 delta1 NaN min(o(q)) NaN max(o(q)) 23034 cardinality free variables: 0.75 mean(c(r)) 0 min(c(r)) 1 max(c(r)) 0 alpha1 0 min(o(r)) 0 max(o(r)) itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec 1 0.50 9.8477e+05 -8.7e+07 0 0 0 0 0 -0 -0 0 NaN 0 7.697670e-01 2 0.75 0 0 0 0 0 0 0 -0 -0 0 NaN 0 7.325190e-01 itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec Optimise cardinality reached the stopping criterion. Finished. 100.00% thermodynamically feasible internal fluxes (checked by cycleFreeFlux method). 16 2 NaN NaN 0 NaN NaN greedyRandom warmStartMethod: 'random' formulation: 'pqzwrs' thetaMultiplier: 1.5 theta: 0.5 regularizeOuter: 1 epsilon: 1e-06 printLevel: 2 relaxBounds: 0 acceptRepairedFlux: 1 thermoConsistencyMethod: 'cycleFreeFlux' bigNum: 10000 debug: 0 optCardThermo objective data: 1 = beta, the global weight on one-norm of internal reaction rate. 1 = min(g0), the local weight on zero-norm of internal reaction rate. 1 = max(g0), the local weight on zero-norm of internal reaction rate. 1 = min(h0), the local weight on zero-norm of metabolite production rate. 1 = max(h0), the local weight on zero-norm of metabolite production rate. optimizeCardinality objective data: 16203 min cardinality variables: 0 mean(c(p)) -0 min(c(p)) -0 max(c(p)) 1 lambda0 1 min(k) 1 max(k) 0 lambda1 0 min(o(p)) 0 max(o(p)) 0 max cardinality variables: NaN mean(c(q)) NaN min(c(q)) NaN max(c(q)) 1 delta0 NaN min(d) NaN max(d) 0 delta1 NaN min(o(q)) NaN max(o(q)) 23034 cardinality free variables: 0.75 mean(c(r)) 0 min(c(r)) 1 max(c(r)) 0 alpha1 0 min(o(r)) 0 max(o(r)) itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec 1 0.50 9.7946e+05 -8.7e+07 0 0 0 0 0 -0 -0 0 NaN 0 7.680140e-01 2 0.75 0 0 0 0 0 0 0 -0 -0 0 NaN 0 9.386080e-01 itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec Optimise cardinality reached the stopping criterion. Finished. 100.00% thermodynamically feasible internal fluxes (checked by cycleFreeFlux method). 17 2 NaN NaN 0 NaN NaN greedyRandom warmStartMethod: 'random' formulation: 'pqzwrs' thetaMultiplier: 1.5 theta: 0.5 regularizeOuter: 1 epsilon: 1e-06 printLevel: 2 relaxBounds: 0 acceptRepairedFlux: 1 thermoConsistencyMethod: 'cycleFreeFlux' bigNum: 10000 debug: 0 optCardThermo objective data: 1 = beta, the global weight on one-norm of internal reaction rate. 1 = min(g0), the local weight on zero-norm of internal reaction rate. 1 = max(g0), the local weight on zero-norm of internal reaction rate. 1 = min(h0), the local weight on zero-norm of metabolite production rate. 1 = max(h0), the local weight on zero-norm of metabolite production rate. optimizeCardinality objective data: 16203 min cardinality variables: 0 mean(c(p)) -0 min(c(p)) -0 max(c(p)) 1 lambda0 1 min(k) 1 max(k) 0 lambda1 0 min(o(p)) 0 max(o(p)) 0 max cardinality variables: NaN mean(c(q)) NaN min(c(q)) NaN max(c(q)) 1 delta0 NaN min(d) NaN max(d) 0 delta1 NaN min(o(q)) NaN max(o(q)) 23034 cardinality free variables: 0.75 mean(c(r)) 0 min(c(r)) 1 max(c(r)) 0 alpha1 0 min(o(r)) 0 max(o(r)) itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec 1 0.50 9.7824e+05 -8.6e+07 0 0 0 0 0 -0 -0 0 NaN 0 6.921650e-01 2 0.75 0 0 0 0 0 0 0 -0 -0 0 NaN 0 1.261484e+00 itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec Optimise cardinality reached the stopping criterion. Finished. 100.00% thermodynamically feasible internal fluxes (checked by cycleFreeFlux method). 18 2 NaN NaN 0 NaN NaN greedyRandom warmStartMethod: 'random' formulation: 'pqzwrs' thetaMultiplier: 1.5 theta: 0.5 regularizeOuter: 1 epsilon: 1e-06 printLevel: 2 relaxBounds: 0 acceptRepairedFlux: 1 thermoConsistencyMethod: 'cycleFreeFlux' bigNum: 10000 debug: 0 optCardThermo objective data: 1 = beta, the global weight on one-norm of internal reaction rate. 1 = min(g0), the local weight on zero-norm of internal reaction rate. 1 = max(g0), the local weight on zero-norm of internal reaction rate. 1 = min(h0), the local weight on zero-norm of metabolite production rate. 1 = max(h0), the local weight on zero-norm of metabolite production rate. optimizeCardinality objective data: 16203 min cardinality variables: 0 mean(c(p)) -0 min(c(p)) -0 max(c(p)) 1 lambda0 1 min(k) 1 max(k) 0 lambda1 0 min(o(p)) 0 max(o(p)) 0 max cardinality variables: NaN mean(c(q)) NaN min(c(q)) NaN max(c(q)) 1 delta0 NaN min(d) NaN max(d) 0 delta1 NaN min(o(q)) NaN max(o(q)) 23034 cardinality free variables: 0.75 mean(c(r)) 0 min(c(r)) 1 max(c(r)) 0 alpha1 0 min(o(r)) 0 max(o(r)) itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec 1 0.50 9.8468e+05 -8.7e+07 0 0 0 0 0 -0 -0 0 NaN 0 1.149320e+00 2 0.75 0 0 0 0 0 0 0 -0 -0 0 NaN 0 6.471060e-01 itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec Optimise cardinality reached the stopping criterion. Finished. 100.00% thermodynamically feasible internal fluxes (checked by cycleFreeFlux method). 19 2 NaN NaN 0 NaN NaN greedyRandom warmStartMethod: 'random' formulation: 'pqzwrs' thetaMultiplier: 1.5 theta: 0.5 regularizeOuter: 1 epsilon: 1e-06 printLevel: 2 relaxBounds: 0 acceptRepairedFlux: 1 thermoConsistencyMethod: 'cycleFreeFlux' bigNum: 10000 debug: 0 optCardThermo objective data: 1 = beta, the global weight on one-norm of internal reaction rate. 1 = min(g0), the local weight on zero-norm of internal reaction rate. 1 = max(g0), the local weight on zero-norm of internal reaction rate. 1 = min(h0), the local weight on zero-norm of metabolite production rate. 1 = max(h0), the local weight on zero-norm of metabolite production rate. optimizeCardinality objective data: 16203 min cardinality variables: 0 mean(c(p)) -0 min(c(p)) -0 max(c(p)) 1 lambda0 1 min(k) 1 max(k) 0 lambda1 0 min(o(p)) 0 max(o(p)) 0 max cardinality variables: NaN mean(c(q)) NaN min(c(q)) NaN max(c(q)) 1 delta0 NaN min(d) NaN max(d) 0 delta1 NaN min(o(q)) NaN max(o(q)) 23034 cardinality free variables: 0.75 mean(c(r)) 0 min(c(r)) 1 max(c(r)) 0 alpha1 0 min(o(r)) 0 max(o(r)) itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec 1 0.50 9.8464e+05 -8.6e+07 0 0 0 0 0 -0 -0 0 NaN 0 1.127294e+00 2 0.75 0 0 0 0 0 0 0 -0 -0 0 NaN 0 6.528850e-01 itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec Optimise cardinality reached the stopping criterion. Finished. 100.00% thermodynamically feasible internal fluxes (checked by cycleFreeFlux method). 20 2 NaN NaN 0 NaN NaN greedyRandom iter. nz.flux.%it.feas.int.flux. %feas.inc.flux. nz.prod. %it.feas.nz.prod. %feas.inc.prod. formulation thermoKernel terminating early: n = nMax = 20 --- thermoKernel END ----
[nMet,nRxn]=size(minimalModel.S)
nMet =
41
nRxn =
2

Data to define a thermodynamically consistent subnetwork

Setup random data to select a random subset
param.n=200;
[rankMetConnectivity,rankMetInd,rankConnectivity] = rankMetabolicConnectivity(stoichFluxThermoConsistModel,param);
[nMet,nRxn]=size(stoichFluxThermoConsistModel.S);
rxnWeights=rand(nRxn,1)-0.5;
rxnWeights(stoichFluxThermoConsistModel.SConsistentRxnBool)=0;
 
coreRxnBool=rxnWeights<0.45;
removeRxnBool=rxnWeights>0.48;
rxnWeights(rxnWeights>0.4)=1;
rxnWeights(rxnWeights<-0.4)=-1;
rxnWeights(rxnWeights>=-0.4 & rxnWeights<=0.4)=0;
hist(rxnWeights)
metWeights=rand(nMet,1)-0.5;
metWeights(rankMetInd(1:200))=0;
coreMetBool=metWeights<0.45;
removeMetBool=metWeights>0.5;
metWeights(metWeights>0.4)=1;
metWeights(metWeights<-0.4)=-1;
metWeights(metWeights>=-0.4 & metWeights<=0.4)=0;
hist(metWeights)

Remove inactive reactions and absent metabolites

param.printLevel = 1;
[solverOK,solverInstalled]=changeCobraSolver('gurobi','QP');
> changeCobraSolver: Gurobi interface added to MATLAB path. > gurobi (version 811) is compatible and fully tested with MATLAB R2019a on your operating system.
[thermoFluxConsistentMetBool,thermoFluxConsistentRxnBool,stoichFluxThermoConsistModel,stoichFluxThermoConsistModelRed] = findThermoConsistentFluxSubset(stoichFluxThermoConsistModel, param, removeMetBool, removeRxnBool);
--- findThermoFluxConsistentSubset START ---- 46 flux inconsistent metabolites 48 flux inconsistent reactions printLevel: 1 n: 200 normalizeZeroNormWeights: 0 epsilon: 1e-06 formulation: 'pqzw' iterationMethod: 'random' nMax: 20 relaxBounds: 1 acceptRepairedFlux: 1 warmStartMethod: 'random' thetaMultiplier: 1.5 theta: 0.5 regularizeOuter: 0 thermoConsistencyMethod: 'cycleFreeFlux' bigNum: 10000 debug: 0 optCardThermo objective data: 0.1 = beta, the global weight on one-norm of internal reaction rate. -5 = min(g0), the local weight on zero-norm of internal reaction rate. -0 = max(g0), the local weight on zero-norm of internal reaction rate. 0 = min(h0), the local weight on zero-norm of metabolite production rate. 0 = max(h0), the local weight on zero-norm of metabolite production rate. optimizeCardinality objective data: 0 min cardinality variables: NaN mean(c(p)) NaN min(c(p)) NaN max(c(p)) 1 lambda0 NaN min(k) NaN max(k) 1 lambda1 NaN min(o(p)) NaN max(o(p)) 5046 max cardinality variables: -0 mean(c(q)) -0 min(c(q)) -0 max(c(q)) 1 delta0 5 min(d) 5 max(d) 0 delta1 0 min(o(q)) 0 max(o(q)) 22498 cardinality free variables: 0.076 mean(c(r)) -0 min(c(r)) 0.1 max(c(r)) 0 alpha1 0 min(o(r)) 0 max(o(r)) itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec 1 0.50 7.5581e+05 -8.5e+06 -2e+04 1.5e+03 0 0 0 -22185 -2.2e+04 0 NaN 0 1.031110e+00 2 0.75 159.51 -9.2e+02 -2.1e+04 1e+03 0 0 0 -22390 -2.2e+04 0 NaN 0 9.043600e-01 3 1.12 105.52 -4.4e+02 -2.2e+04 7e+02 0 0 0 -22465 -2.2e+04 0 NaN 0 9.512640e-01 4 1.69 65.094 -2.5e+02 -2.2e+04 4.7e+02 0 0 0 -22480 -2.2e+04 0 NaN 0 1.014490e+00 5 2.53 39.738 -1.7e+02 -2.2e+04 3.1e+02 0 0 0 -22490 -2.2e+04 0 NaN 0 1.046736e+00 6 3.80 26.358 -1.1e+02 -2.2e+04 2.1e+02 0 0 0 -22490 -2.2e+04 0 NaN 0 1.038342e+00 7 5.70 17.391 -69 -2.2e+04 1.4e+02 0 0 0 -22490 -2.2e+04 0 NaN 0 1.045558e+00 8 8.54 38.487 -73 -2.2e+04 1e+02 0 0 0 -22520 -2.3e+04 0 NaN 0 1.151007e+00 9 12.81 15.112 -48 -2.2e+04 67 0 0 0 -22530 -2.3e+04 0 NaN 0 1.126022e+00 10 19.22 10.09 -32 -2.2e+04 44 0 0 0 -22540 -2.3e+04 0 NaN 0 1.178262e+00 11 28.83 6.7343 -15 -2.3e+04 30 0 0 0 -22540 -2.3e+04 0 NaN 0 1.279967e+00 12 43.25 4.4555 -9.9 -2.3e+04 20 0 0 0 -22540 -2.3e+04 0 NaN 0 1.082459e+00 13 64.87 2.9919 -6.6 -2.3e+04 13 0 0 0 -22540 -2.3e+04 0 NaN 0 1.123578e+00 14 97.31 1.9934 -4.4 -2.3e+04 8.8 0 0 0 -22540 -2.3e+04 0 NaN 0 1.203622e+00 15 145.96 1.3302 -2.9 -2.3e+04 5.8 0 0 0 -22540 -2.3e+04 0 NaN 0 1.212170e+00 16 218.95 0.89203 -1.9 -2.3e+04 3.9 0 0 0 -22540 -2.3e+04 0 NaN 0 1.343248e+00 17 328.42 0.59077 -1.3 -2.3e+04 2.6 0 0 0 -22540 -2.3e+04 0 NaN 0 1.239851e+00 itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec Optimise cardinality reached the stopping criterion. Finished. 100.00% thermodynamically feasible internal fluxes (checked by cycleFreeFlux method). iter card(y) nz %feas int.nz. tot %feas int.nz. tot %feas ext.nz. iteration formulation 1 5046 7439 1.00 0.68 0.90 random pqzw 2 1459 5243 1.00 0.84 0.98 random pqzw 3 677 5398 1.00 0.93 1.00 random pqzw 4 310 3769 1.00 0.96 1.00 random pqzw 5 190 1675 1.00 0.97 1.00 random pqzw 6 150 2816 1.00 0.97 1.00 random pqzw 7 118 2522 1.00 0.98 1.00 greedyRandom pqzw 8 81 3234 1.00 0.98 1.00 greedyRandom pqzw 9 75 153 1.00 0.98 1.00 greedyRandom pqzw 10 77 275 1.00 0.98 1.00 greedyRandom pqzw 11 71 135 1.00 0.98 1.00 greedyRandom pqzw 12 68 1 NaN 0.98 1.00 greedyRandom pqzw 13 69 1162 1.00 0.98 1.00 greedyRandom pqzw 14 85 1537 1.00 0.98 1.00 greedyRandom pqzw 15 81 2 NaN 0.98 1.00 greedyRandom pqzw 16 66 2 NaN 0.98 1.00 greedyRandom pqzw 17 72 2 NaN 0.98 1.00 greedyRandom pqzw 18 63 2 NaN 0.98 1.00 greedyRandom pqzw iter card(y) nz %feas int.nz. tot %feas int.nz. tot %feas ext.nz. iteration formulation findThermoConsistentFluxSubset terminating early: no progress on % internal reactions thermodynamically flux consistent --- findThermoFluxConsistentSubset END ----
[nMet,nRxn]=size(stoichFluxThermoConsistModelRed.S)
nMet =
5633
nRxn =
10225
Remove the corresponding entries from the weights
bool = coreRxnBool & ~thermoFluxConsistentRxnBool;
if any(bool)
fprintf('%u%s\n',nnz(bool), ' core reactions inconsistent due to removed reactions')
if nnz(bool)<0
stoichFluxThermoConsistModel.rxns{bool}
end
end
183 core reactions inconsistent due to removed reactions
bool = coreMetBool & ~thermoFluxConsistentMetBool;
if any(bool)
fprintf('%u%s\n',nnz(bool),' core metabolties inconsistent due to removed metabolites')
if nnz(bool)<10
stoichFluxThermoConsistModel.mets{bool}
end
end
117 core metabolties inconsistent due to removed metabolites
rxnWeightsRed = rxnWeights(thermoFluxConsistentRxnBool);
metWeightsRed = metWeights(thermoFluxConsistentMetBool);
coreRxnBoolRed = coreRxnBool(thermoFluxConsistentRxnBool);
coreMetBoolRed = coreMetBool(thermoFluxConsistentMetBool);

Compute the smallest thermodynamically consistent subnetwork containing a list of present metabolites and active reactions

activeInactiveRxn=coreRxnBoolRed;
presentAbsentMet=coreMetBoolRed;
activeInactiveRxn(:)=0;
presentAbsentMet(:)=0;
activeInactiveRxn(~stoichFluxThermoConsistModelRed.SConsistentRxnBool)=0;
param.normalizeZeroNormWeights=0;
[tissueModel, thermoModelMetBool, thermoModelRxnBool] = thermoKernel(stoichFluxThermoConsistModelRed, activeInactiveRxn, rxnWeightsRed, presentAbsentMet, metWeightsRed,param);
--- thermoKernel START ---- warmStartMethod: 'random' formulation: 'pqzwrs' thetaMultiplier: 1.5 theta: 0.5 regularizeOuter: 1 epsilon: 1e-06 printLevel: 1 relaxBounds: 0 acceptRepairedFlux: 1 thermoConsistencyMethod: 'cycleFreeFlux' bigNum: 10000 debug: 0 optCardThermo objective data: 1 = beta, the global weight on one-norm of internal reaction rate. -1 = min(g0), the local weight on zero-norm of internal reaction rate. 1 = max(g0), the local weight on zero-norm of internal reaction rate. -1 = min(h0), the local weight on zero-norm of metabolite production rate. 1 = max(h0), the local weight on zero-norm of metabolite production rate. optimizeCardinality objective data: 649 min cardinality variables: 0 mean(c(p)) -0 min(c(p)) -0 max(c(p)) 1 lambda0 1 min(k) 1 max(k) 0 lambda1 0 min(o(p)) 0 max(o(p)) 1188 max cardinality variables: 0 mean(c(q)) -0 min(c(q)) -0 max(c(q)) 1 delta0 1 min(d) 1 max(d) 0 delta1 0 min(o(q)) 0 max(o(q)) 36568 cardinality free variables: 0.46 mean(c(r)) -0 min(c(r)) 1 max(c(r)) 0 alpha1 0 min(o(r)) 0 max(o(r)) itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec 1 0.50 9.6816e+05 -8.5e+07 -18 67 14 9.1 0 -113 -94 0 NaN 0 6.291660e-01 2 0.75 20.361 -25 -43 52 13 9.2 0 -111 -1e+02 0 NaN 0 5.968950e-01 3 1.12 16.927 -19 -63 38 11 7.9 0 -111 -1.1e+02 0 NaN 0 7.031470e-01 4 1.69 11.532 -13 -76 26 11 7.8 0 -112 -1.1e+02 0 NaN 0 8.008960e-01 5 2.53 8.2997 -9.9 -86 19 10 7.3 0 -114 -1.1e+02 0 NaN 0 1.117453e+00 6 3.80 5.7142 -7.1 -93 14 9 6.9 0 -114 -1.1e+02 0 NaN 0 8.566990e-01 7 5.70 3.85 -4.5 -97 9.1 9 6.9 0 -114 -1.1e+02 0 NaN 0 7.289480e-01 8 8.54 2.2986 -3 -1e+02 6.1 9 6.9 0 -114 -1.1e+02 0 NaN 0 9.516900e-01 9 12.81 1.7613 -2 -1e+02 4 9 6.9 0 -114 -1.1e+02 0 NaN 0 7.543920e-01 10 19.22 1.3692 -1.3 -1e+02 2.7 9 6.9 0 -114 -1.1e+02 0 NaN 0 7.822110e-01 11 28.83 0.86665 -0.9 -1e+02 1.8 9 6.9 0 -114 -1.1e+02 0 NaN 0 7.096120e-01 12 43.25 0.49273 -0.6 -1.1e+02 1.2 9 6.9 0 -114 -1.1e+02 0 NaN 0 7.672310e-01 13 64.87 0.41444 -0.4 -1.1e+02 0.8 9 6.9 0 -114 -1.1e+02 0 NaN 0 6.730040e-01 14 97.31 0.21692 -0.27 -1.1e+02 0.53 9 6.9 0 -114 -1.1e+02 0 NaN 0 9.164190e-01 15 145.96 0.14927 -0.18 -1.1e+02 0.35 9 6.9 0 -114 -1.1e+02 0 NaN 0 9.181590e-01 16 218.95 0.097833 -0.12 -1.1e+02 0.24 9 6.9 0 -114 -1.1e+02 0 NaN 0 9.957260e-01 17 328.42 0.065178 -0.079 -1.1e+02 0.16 9 6.9 0 -114 -1.1e+02 0 NaN 0 9.557260e-01 itn theta ||dx|| del_obj obj linear ||x||0 a(x) ||x||1 ||y||0 a(y) ||y||1 c(x,y) ||z||1 sec Optimise cardinality reached the stopping criterion. Finished. 100.00% thermodynamically feasible internal fluxes (checked by cycleFreeFlux method). iter. nz.flux.%it.feas.int.flux. %feas.inc.flux. nz.prod. %it.feas.nz.prod. %feas.inc.prod. formulation 1 1578 1.00 0.23 893 1.38 0.22 greedyRandom 2 3929 1.00 0.47 1936 1.32 0.58 greedyRandom 3 1162 1.00 0.55 814 1.20 0.68 greedyRandom 4 1108 1.00 0.69 810 1.18 0.75 greedyRandom 5 879 1.00 0.79 538 1.42 0.79
[nMet,nRxn]=size(tissueModel.S)
Compare the target versus predicted model
plotThermoKernelExtractStats(stoichFluxThermoConsistModelRed, activeInactiveRxn, rxnWeightsRed, presentAbsentMet, metWeightsRed, thermoModelMetBool, thermoModelRxnBool);

Save weights

rxnWeightsRedTmp=rxnWeightsRed;
metWeightsRedTmp=metWeightsRed;
return

Submodel with just metabolites specified

metWeightsRed=metWeightsRedTmp;
rxnWeightsRed(:)=0;
[tissueModel, thermoModelMetBool, thermoModelRxnBool] = thermoKernel(stoichFluxThermoConsistModelRed, activeInactiveRxn, rxnWeightsRed, presentAbsentMet, metWeightsRed,param);
[nMet,nRxn]=size(tissueModel.S)
Compare the target versus predicted model
plotThermoKernelExtractStats(stoichFluxThermoConsistModelRed, activeInactiveRxn, rxnWeightsRed, presentAbsentMet, metWeightsRed, thermoModelMetBool, thermoModelRxnBool)

Submodel with just reactions specified

rxnWeightsRed=rxnWeightsRedTmp;
metWeightsRed(:)=0;
[tissueModel, thermoModelMetBool, thermoModelRxnBool] = thermoKernel(stoichFluxThermoConsistModelRed, activeInactiveRxn, rxnWeightsRed, presentAbsentMet, metWeightsRed,param);
 
[nMet,nRxn]=size(tissueModel.S)
Compare the target versus predicted model
plotThermoKernelExtractStats(stoichFluxThermoConsistModelRed, activeInactiveRxn, rxnWeightsRed, presentAbsentMet, metWeightsRed, thermoModelMetBool, thermoModelRxnBool)
 

Submodel with just active metabolites specified

metWeightsRed=metWeightsRedTmp;
rxnWeightsRed(:)=0;
metWeightsRed(metWeightsRed>=0)=0;
[tissueModel, thermoModelMetBool, thermoModelRxnBool] = thermoKernel(stoichFluxThermoConsistModelRed, activeInactiveRxn, rxnWeightsRed, presentAbsentMet, metWeightsRed,param);
[nMet,nRxn]=size(tissueModel.S)
Compare the target versus predicted model
plotThermoKernelExtractStats(stoichFluxThermoConsistModelRed, activeInactiveRxn, rxnWeightsRed, presentAbsentMet, metWeightsRed, thermoModelMetBool, thermoModelRxnBool)

Submodel with just active reactions specified

rxnWeightsRed=rxnWeightsRedTmp;
metWeightsRed(:)=0;
rxnWeightsRed(rxnWeightsRed>=0)=0;
[tissueModel, thermoModelMetBool, thermoModelRxnBool] = thermoKernel(stoichFluxThermoConsistModelRed, activeInactiveRxn, rxnWeightsRed, presentAbsentMet, metWeightsRed,param);
 
[nMet,nRxn]=size(tissueModel.S)
Compare the target versus predicted model
plotThermoKernelExtractStats(stoichFluxThermoConsistModelRed, activeInactiveRxn, rxnWeightsRed, presentAbsentMet, metWeightsRed, thermoModelMetBool, thermoModelRxnBool)