conservedMoieties

classifyMoieties(L, S)

Classifies conserved moieties for a metabolic network

USAGE:

types = classifyMoieties(L, S)

INPUTS:

L: The r x m moiety matrix with moiety vectors as columns. S: The m x n total stoichiometric matrix.

OUTPUT:
types: an r x 1 cell array of with one of the following moiety classifications

‘Internal’ moiety that is also conserved in the open network ‘Transitive’ moiety that is only found in primary metabolites ‘Integrative’ moiety that is not conserved in the open

network and found in both primary and secondary metabolites.

isSecondary m x 1 Boolean vector indicating secondary metabolites

(containing at least one internal conserved moiety’)

constructElementalMatrix(metFormulas, metCharges)

Constructs the elemental matrix for a set of metabolites

USAGE:

[E, elements] = constructElementalMatrix(metFormulas, metCharges)

INPUT:

metFormulas: m x 1 cell array of metabolite formulas, e.g., CHO2

OPTIONAL INPUT:
metCharges: m x 1 vector of metabolite charges. Used to compute the

electron vector.

OUTPUTS:
E: The m x p elemental matrix where p is the number of unique

elements in metFormulas (plus the electron if metCharges is included as input)

elements: 1 x p cell array of element symbols (e for electron)

decomposeMoietyVectors(L, N)

Decomposes moiety vectors for a metabolic network.

USAGE:

D = decomposeMoieties(L, N);

INPUTS:

L: The m x r moiety matrix with moiety vectors as columns. N: The m x u internal stoichiometric matrix such that \(N^T L = 0\).

OUTPUTS:

D: An m x t moiety matrix with decomposed moiety vectors as columns \((t \geq r)\).

estimateMoietyFormulas(L, E, elements)

Estimates the chemical formulas of conserved moieties in a metabolic network

USAGE:

moietyFormulas = estimateMoietyFormulas(L, E, elements)

INPUTS:
L: The m x r moiety matrix for a metabolic network. Each column is a

moiety vector.

E: The m x p elemental matrix for metabolites in the metabolic network. elements: A 1 x p cell array of element symbols.

OUTPUT:

M: An r x p estimated elemental matrix for moieties. moietyFormulas: An r x 1 cell array of estimated moiety formulas.

findElementaryMoietyVectors(model, varargin)

Enumerate all possible elementary conserved moiety vectors based on the left null space of the stoichiometric matrix S.

USAGE:

EMV = findElementaryMoietyVectors(model, method)

INPUT:

model: COBRA model

OPTIONAL INPUTS (in name-value pair):
‘method’: method for finding all conserved moiety vectors
  • ‘efmtool’: use EFMtool, ‘CalculateFluxModes.m’ must be in matlab path (default)

  • ‘null’: use matlab rational null basis.

‘deadCMs’: include dead end metabolites or not (default true)

(will have more conserved moieties found for dead end metabolites if true)

‘printLevel’: print messages or not (default 0).

Other COBRA LP solver parameters, see solveCobraLP.m

OUTPUT:

EMV: all minimal conserved moiety vectors

identifyConservedMoieties(model, dATM, options)

[arm, moietyFormulae] = identifyConservedMoieties(model, dATM, options)

Identifies conserved moieties in a metabolic network (model) by graph theoretical analysis of the corresponding directed atom transition network (dATM). Decomposes a stoichiometric matrix into a set of moiety transitions, that is

N = inv(M2M*M2M’)*M2M*M*M2R;

where

N = model.S(arm.MRH.metAtomMappedBool,arm.MRH.rxnAtomMappedBool) = arm.MRH.S(arm.MRH.metAtomMappedBool,arm.MRH.rxnAtomMappedBool); M2M = arm.M2M; M = incidence(arm.MTG); M2R = arm.M2R;

where M2M*M2M’ is a diagonal matrix and each diagonal entry is the number of moieties in a metabolite.

USAGE:

[arm, moietyFormulae] = identifyConservedMoieties(model, dATM, options)

INPUTS:

model: Structure with following fields:

  • .S - The m x n stoichiometric matrix for the metabolic network

  • .mets - An m x 1 array of metabolite identifiers. Should match metabolite identifiers in rxnfiles.

  • .rxns - An n x 1 array of reaction identifiers. Should match rxnfile names in rxnFileDir.

dATM: Directed atom transition multigraph, obtained from buildAtomTransitionMultigraph.m

A MATLAB digraph structure with the following tables and variables:

  • .Nodes — Table of node information, with p rows, one for each atom.

  • .Nodes.Atom - unique alphanumeric id for each atom by concatenation of the metabolite, atom and element

  • .Nodes.AtomIndex - unique numeric id for each atom in atom transition multigraph

  • .Nodes.mets - metabolite containing each atom

  • .Nodes.AtomNumber - unique numeric id for each atom in a metabolite

  • .Nodes.Element - atomic element of each atom

  • .Edges — Table of edge information, with q rows, one for each atom transition instance.

  • .Edges.EndNodes - two-column cell array of character vectors that defines the graph edges

  • .Edges.Trans - unique alphanumeric id for each atom transition instance by concatenation of the reaction, head and tail atoms

  • .Edges.TransIndex - unique numeric id for each atom transition instance

  • .Edges.rxns - reaction abbreviation corresponding to each atom transition instance

  • .Edges.HeadAtomIndex - head Nodes.AtomIndex

  • .Edges.TailAtomIndex - tail Nodes.AtomIndex

OPTIONAL INPUTS: options: Structure with following fields:

  • .sanityChecks {(0),1} true if additional sanity checks

on computations, but substantially more computation time

OUTPUTS: arm atomically resolved model as a matlab structure with the following fields:

arm.MRH: Directed metabolic reaction hypergraph, i.e. standard COBRA model, with additional fields: arm.MRH.metAtomMappedBool: m x 1 boolean vector indicating atom mapped metabolites arm.MRH.rxnAtomMappedBool: n x 1 boolean vector indicating atom mapped reactions

arm.dATM: Directed atom transition multigraph (dATM) obtained from buildAtomTransitionMultigraph.m

arm.M2Ai: m x a matrix mapping each mapped metabolite to one or more atoms in the directed atom transition multigraph arm.Ti2R: t x n matrix mapping one or more directed atom transition instances to each mapped reaction arm.Ti2I t x i matrix to map one or more directed atom transition instances to each isomorphism class

arm.ATG: Atom transition graph, as a MATLAB graph structure with the following tables and variables:

  • .Nodes — Table of node information, with a rows, one for each atom.

  • .Nodes.Atom - unique alphanumeric id for each atom by concatenation of the metabolite, atom and element

  • .Nodes.AtomIndex - unique numeric id for each atom in atom transition multigraph

  • .Nodes.mets - metabolite containing each atom

  • .Nodes.AtomNumber - unique numeric id for each atom in an atom mapping

  • .Nodes.Element - atomic element of each atom

  • .Nodes.MoietyIndex - numeric id of the corresponding moiety (arm.MTG.Nodes.MoietyIndex)

  • .Nodes.Component - numeric id of the corresponding connected component (rows of C2A)

  • .Nodes.IsomorphismClass - numeric id of the corresponding isomprphism class (rows of I2C)

  • .Nodes.IsCanonical - boolean, true if atom is within first component of an isomorphism class

  • .Edges — Table of edge information, with u rows, one for each atom transition instance.

  • .Edges.EndNodes - numeric id of head and tail atoms that defines the graph edges

  • .Edges.Trans - unique alphanumeric id for each atom transition by concatenation of head and tail atoms

  • .Edges.HeadAtomIndex - head Nodes.AtomIndex

  • .Edges.TailAtomIndex - tail Nodes.AtomIndex

  • .Edges.HeadAtom - head Nodes.Atom

  • .Edges.TailAtom - tail Nodes.Atom

  • .Edges.TransIndex - unique numeric id for each atom transition

  • .Edges.Component - numeric id of the corresponding connected component (columns of T2C)

  • .Edges.IsomorphismClass - numeric id of the corresponding isomprphism class (columns of T2I)

  • .Edges.IsCanonical - boolean, true if atom transition is within first component of an isomorphism class

arm.M2A: m x a matrix mapping each metabolite to one or more atoms in the (undirected) atom transition graph arm.A2R: u x n matrix that maps atom transitions to reactions. An atom transition can map to multiple reactions and a reaction can map to multiple atom transitions arm.A2Ti: u x t matrix to map each atom transition (in ATG) to one or more directed atom transition instance (in dATM) with reorientation if necessary.

arm.I2C i x c matrix to map each isomorphism class (I) to one or more components (C) of the atom transition graph (ATG) arm.C2A c x a matrix to map each connected component (C) of the atom transition graph to one or more atoms (A) arm.A2C u x c matrix to map one or more atom transitions (T) to connected components (C) of the atom transition graph (ATG)

arm.I2A i x a matrix to map each isomorphism class to one or more atoms of the atom transition graph (ATG) arm.A2I u x i matrix to map one or more atom transitions to each isomorphism class

arm.MTG = MTG; % (undirected) moiety transition graph

relateConservedMoietiesToConservationRelations(C, R)

Given a stoichiometric matrix N, a set of conserved moieties C, and a set of conservation relations R, such that C*N = 0 and R*N = 0, then compute a matrix X, such that C = X*R, and R’*x = C(j,:)’ with x’ =: X(j,:) of minimal cardinality.

representativeMoiety(MMN)

For each moiety, identify a set of representative molecules, based on various criteria

representativeMolecule(L, moietyFormulae, mets)

For each moiety, identify a set of representative molecules, based on various criteria

INPUT L Matrix to map isomorphism classes to metabolites. moietyFormulae Chemical formula of the moiety (Hill notation) mets Metabolite abbreviation

OUTPUT minimalMassMetabolite Abbreviation of metabolite with minimal mass relative to the moiety minimalMassFraction Fraction of moiety/metabolite mass numMinimalMassMetabolites Number of metabolites with minimal mass