Old

createGroupIncidenceMatrix(model, training_data)[source]

Initialise the group incidence matrix G, then decompose each compound with an InChI into a group-contribution vector using the python script “inchi2gv.py”

USAGE:

[training_data, mappingScore] = createGroupIncidenceMatrix (model, training_data)

INPUTS:
  • model – test COBRA model structure with fields:

    • .mets - m x 1 cell array of metabolite identifiers

    • .inchi - structure whose .nonstandard field is an m x 1 cell array of nonstandard InChI

  • training_data – training data structure with fields:

    • .cids - compound identifiers of the training data

    • .nstd_inchi - cell array of nonstandard InChI for the training compounds

    • .cids_that_dont_decompose - compound IDs that cannot be group-decomposed

    • .groups - cell array of group definitions (written)

    • .G - group incidence matrix (written)

    • .has_gv - boolean flagging compounds with a group vector (written)

    • .S - stoichiometric matrix (a zero row is appended per test-only metabolite)

    • .Model2TrainingMap - mapping of model.mets to training compounds (written)

OUTPUTS:
  • training_data – the input structure updated with the fields above

  • mappingScorenMet x nTrainingMet sparse matrix of mapping scores between model and training compounds

getGroupVectorFromInchi(inchi, silent)[source]

Decompose an InChI into a group-contribution vector using the inchi2gv.py python script

USAGE:

group_def = getGroupVectorFromInchi (inchi, silent)

INPUT:

inchi – InChI string of the metabolite to decompose

OPTIONAL INPUT:

silent – boolean, suppress python script warnings (default true)

OUTPUT:

group_def – row vector of group counts (the group-contribution vector), empty if the InChI cannot be decomposed

Note

Depends on the python script inchi2gv.py

getMappingScores(model, training_data)[source]

Find the best mapping between the model compounds and the training data (KEGG) compounds

USAGE:

mappingScore = getMappingScores (model, training_data)

INPUTS:
  • model – test COBRA model structure with fields:

    • .mets - m x 1 cell array of metabolite identifiers

    • .inchi - structure of InChI strings, with fields .standard, .standardWithStereo and .standardWithStereoAndCharge

  • training_data – training data structure with fields:

    • .cids - compound identifiers of the training data

    • .std_inchi - standard InChI of the training compounds

    • .std_inchi_stereo - standard InChI with stereochemistry

    • .std_inchi_stereo_charge - standard InChI with stereochemistry and charge

OUTPUT:

mappingScorenMet x nTrainingMet sparse matrix of mapping scores between model and training compounds