Old

componentContribution(model, trainingData)[source]

Perform the component contribution method

USAGE:

[model, params] = componentContribution (model, trainingData)

INPUTS:
  • model – COBRA model structure with fields:

    • .S - m x n stoichiometric matrix

    • .SIntRxnBool - n x 1 boolean, true for internal reactions

  • trainingData – structure from prepareTrainingData with fields:

    • .S - stoichiometric matrix of measured reactions

    • .G - group incidence matrix

    • .dG0 - observation vector (standard Gibbs energy of reactions)

    • .weights - weight vector for each reaction in .S

    • .Model2TrainingMap - mapping of model metabolites to training metabolites

OUTPUTS:
  • model – COBRA model structure with added fields:

    • .DfG0 - m x 1 component contribution standard Gibbs energies of formation

    • .covf - m x m estimated covariance matrix for standard Gibbs energies of formation

    • .DfG0_Uncertainty - m x 1 uncertainty in .DfG0; large for uncovered metabolites

    • .DrGt0_Uncertainty - n x 1 uncertainty in standard transformed reaction Gibbs energies

    • .DrG0_Uncertainty - n x 1 uncertainty in standard reaction Gibbs energy estimates

  • params – structure of intermediate quantities for debugging, with fields:

    • .contributions - reactant and group contribution vectors

    • .covariances - reactant, group and infinite covariance matrices

    • .MSEs - reactant, group and infinite mean squared errors

    • .projections - projection matrices used in the estimate

invertProjection(A, epsilon)[source]

invert a general matrix A using the pseudoinverse

USAGE:

[inv_A, r, P_R, P_N] = invertProjection (A, epsilon)

INPUT:

A – matrix to be inverted

OPTIONAL INPUT:

epsilon – singular-value tolerance for the numerical rank (default 1e-10)

OUTPUTS:
  • inv_A – the pseudoinverse of A

  • r – the rank of A

  • P_R – the projection matrix onto the range(A)

  • P_N – the projection matrix onto the null(A’)