Thermokernel

plotThermoKernelStats(activeInactiveRxn, rxnWeights, thermoModelRxnBool, presentAbsentMet, metWeights, thermoModelMetBool)[source]

plots confusion matrices for active/inactive reactions and present/absent metabolites

INPUTS

activeInactiveRxn: - n x 1 with entries {1,-1, 0} depending on whether a reaction must be active, inactive, or unspecified respectively. rxnWeights: - n x 1 real valued penalties on zero norm of reaction flux, negative to promote a reaction to be active, positive

to promote a reaction to be inactive and zero to be indifferent to activity or inactivity

thermoModelMetBool: m x 1 boolean vector of thermodynamically consistent mets in input model

presentAbsentMet: - m x 1 with entries {1,-1, 0} depending on whether a metabolite must be present, absent, or unspecified respectively. metWeights: - m x 1 real valued penalties on zero norm of metabolite “activity”, negative to promote a metabolite to be present, positive

to promote a metabolite to be absent and zero to be indifferent to presence or absence

thermoModelRxnBool: - n x 1 boolean vector of thermodynamically consistent rxns in input model

plotThermoKernelWeights(metWeights, rxnWeights, thermoModelMetBool, thermoModelRxnBool)[source]

plots weights on metabolites and reactions used by thermokernel -ve weight = incentive

0 weight =

+ve weight = disincentive

If thermoModelMetBool and thermoModelRxnBool are also provided, it also plots the weigths for the incentivised metabolites and reactions that were omitted from the output model

IPUTS

metWeights: - m x 1 real valued vector weight on metabolites rxnWeights: - n x 1 real valued vector weight on reactions

OPTIONAL INPUTS

thermoModelMetBool: m x 1 boolean vector of thermodynamically consistent mets in input model thermoModelRxnBool: n x 1 boolean vector of thermodynamically consistent rxns in input model

Ronan Fleming

thermoKernel(model, activeInactiveRxn, rxnWeights, presentAbsentMet, metWeights, param)[source]

From a cobra model, extract a thermodynamically flux consistent submodel (thermoModel), of minimal size, optionally given: a set of active and inactive reactions (activeInactiveRxn), a set of penalties on activity/inactivity of reactions (rxnWeights), a set of present and absent metabolites (presentAbsentMet), and a set of penalties on presence/absence of metabolites (metWeights).

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

  • ub - n x 1 Upper bounds

OPTIONAL INPUTS
  • model – (optional fields) * .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’) linear part of the objective. * .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} * .beta - A scalar weight on minimisation of one-norm of internal fluxes. Default 1e-4.

    Larger values increase the incentive to find a flux vector to be thermodynamically feasibile in each iteration of optCardThermo and decrease the incentive to search the steady state solution space for a flux vector that results in certain reactions and metabolites to be active and present, respectively.

  • activeInactiveRxn

    • n x 1 with entries {1,-1, 0} depending on whether a reaction must be active, inactive, or unspecified respectively.

  • rxnWeights

    • n x 1 real valued penalties on zero norm of reaction flux, negative to promote a reaction to be active, positive

    to promote a reaction to be inactive and zero to be indifferent to activity or inactivity

  • presentAbsentMet

    • m x 1 with entries {1,-1, 0} depending on whether a metabolite must be present, absent, or unspecified respectively.

  • metWeights

    • m x 1 real valued penalties on zero norm of metabolite “activity”, negative to promote a metabolite to be present, positive

    to promote a metabolite to be absent and zero to be indifferent to presence or absence

  • param – Parameters structure: * .printLevel - greater than zero to recieve more output * .bigNum - definition of a large positive number (Default value = 1e6) * .nbMaxIteration - maximal number of outer iterations (Default value = 30) * .epsilon - smallest non-zero flux - (Default value = feasTol = 1e-6) * .theta - parameter of the approximation (Default value = 2)

    For a sufficiently large parameter , the Capped-L1 approximate problem and the original cardinality optimisation problem are have the same set of optimal solutions

    • .normalizeZeroNormWeights - {(0),1}, normalises zero norm weights

      rxnWeights = rxnWeights./sum(abs(rxnWeights)); metWeights = metWeights./sum(abs(metWeights));

    • .rxnWeightsConsistentWithMetWeights {(0),1} If true and metWeights are provided, make the corresponding reaction weights consistent

    • .metWeightsConsistentWithRxnWeights {(0),1} If true and rxnWeights are provided, make the corresponding metabolite weights consistent

    • .acceptRepairedFlux {(1),0} If true, a post processing step after each inner iteration minimises the absolute value of internal reaction flux,

      while (a) all exchange fluxes are kept constant, and (b) no internal flux is allowed to change direction or increase in size.

    • .relaxBounds {(0),1} If true, allow internal bounds forcing non-zero flux to be relaxed as minimising absolute value of internal

      fluxes is only guarunteed to return a thermodynamically feasible flux if such bounds can be relaxed.

    • .removeOrphanGenes - {(1),0}, removes orphan genes from thermoModel

    • .formulation - mathematical formulation of thermoKernel algorithm (Default is ‘pqzwrs’. Do not change unless expert user.)

    • .plotThermoKernelStats {(0),1} generates a figure with confusion matrices comparing anticipated vs actual metabolites and reactions in the extracted model

    • .plotThermoKernelWeights {(0),1} generates a figure displaying the weights given to actual and anticipated but omitted metabolites and reactions in the extracted model