Optcardthermo

checkThermoFeasibility(model, solution, thermoConsistencyMethod, param)[source]

Check which internal reactions of a flux vector solution.v are thermodynamically feasible

INPUT
  • model – (the following fields are required - others can be supplied)

    • .S - m x n Stoichiometric matrix

    • .SConsistentRxnBool - ‘n x 1’ Boolean vector of stoichiometrically consistent reactions

  • solution.v – n x nlt flux vectors

OPTIONAL INPUT thermoConsistencyMethod: {(‘cycleFreeFlux’),’signProduct’,’cardOpt’}

param.printLevel: param.eta: Minimum flux value that is considered nonzero. Default is feasTol.

Very sensitive to change in this parameter. Don’t change it unless you can debug it.

param.theta: Parameter to Capped-L1 (Approximate step function). Default 0.5 param.warmStartMethod: Method to warm start optimizeCardinality. Default is ‘random’

{(‘random’),’original’,’zero’,’l1’,’l2’};

param.thermoConsistency: {(‘biochemically’), ‘chemically’};

‘biochemically’ allows N’y ~=0 when v = 0, assumes a missing enzyme to catalyse the reaction. ‘chemically’ enforces the constraint v = 0 => N’y = 0

OUTPUT thermoConsistentFluxBool: ‘n x 1’ Boolean vector true for thermodynamically consistent fluxes and true for all non-zero external reactions solutionConsistency: solution structure returned by thermodynamic consistency check

*.vThermo: ‘n x 1’ repaired thermodynamically consistent flux

optCardThermo(model, param)[source]

Finds a thermodynamically feasible net flux biased toward presence/absence of metabolites and activity/inactivity of certain reactions by solving the following optimisation problem

min beta*g1.*(p + q) + g0.*|z|_0 + h0(-ve).*|s|_0 + h0(+ve).*|s|_0 + c*[z;w]

s.t. N*z + B*w = b
C*z + D*w <= d (optionally)

z - p + q = 0

A(p + q) - s = 0 Az - r = 0 lb <= [z;w] <= ub 0 <= p 0 <= q

where [N, B] := model.S;

A := F + R, F := -min(N,0) R : = max(N,0)

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 reaction rate

  • ub - n x 1 Upper bounds on reaction rate

OPTIONAL INPUTS

model – (optional fields) * .SConsistentRxnBool - ‘m x 1’ boolean vector indicating stoichiometrically consistent reactions * .b - m x 1 change in concentration with time * .csense - m x 1 character array with entries in {L,E,G} * .osenseStr - Maximize (‘max’)/minimize (‘min’)

(opt, default = ‘max’) only affects the interpretation of linear part of the objective (from model.c).

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

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

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

  • .h0 - m x 1, local weight on zero norm of rate of production of each metabolite by internal reactions.

  • .g0 - n x 1 , local weight on zero norm of the net flux of each reaction

  • .g1 - n x 1 , local weight on one norm of the net flux of each reaction

  • .presentMet - m x 1 boolean vector indicating metabolites

    that must be produced by internal reactions in the submodel

  • .absentMet - m x 1 boolean vector indicating metabolites

    that must be produced by internal reactions in the submodel

  • .activeRxn - n x 1 boolean vector indicating reactions that must be active in the submodel

  • .inactiveRxn - n x 1 boolean vector indicating reactions that must be active in the submodel

  • .lambda0 - trade-off parameter on minimise ||x||_0

  • .lambda1 - trade-off parameter on minimise ||x||_1

  • .delta0 - trade-off parameter on maximise ||y||_0

  • .delta1 - trade-off parameter on minimise `||y||_1’

  • .beta - trade-off parameter on minimise `||p||_1’ + `||q||_1’, increase to incentivise thermodynamic feasibility