Old

kegg2mol(cid, molfileDir, mets, takeMajorMS, pH, takeMajorTaut)[source]

Retrieve molfiles from the KEGG Compound database

USAGE:

kegg2mol (cid, molfileDir, mets, takeMajorMS, pH, takeMajorTaut)

INPUT:

cidm x 1 array of KEGG Compound identifiers

OPTIONAL INPUTS:
  • molfileDir – path to the directory where molfiles are saved (default molfilesFromKegg)

  • metsm x 1 array of metabolite identifiers used to name the molfiles (the KEGG Compound ID is used if mets is omitted)

  • takeMajorMS – 0 (default) to download molfiles directly from KEGG, or 1 to save the major microspecies at pH pH (requires ChemAxon’s cxcalc)

  • pH – pH for computing the major microspecies (default 7)

  • takeMajorTaut – 1 (default) to save the major tautomers of the major microspecies at the specified pH, otherwise 0

Note

Writes one molfile per metabolite with a KEGG Compound ID. Approximately 2 s per KEGG id when takeMajorMS = 1, 0.3 s when takeMajorMS = 0.

modelMetabolitesToSDF(model, InChI)[source]

Write out an SDF which is effectively a set of mol files concatenated in a flat file with extra data headers

SDF format spec http://www.symyx.com/downloads/public/ctfile/ctfile.jsp

USAGE:

model = modelMetabolitesToSDF (model, InChI)

INPUT:

model – COBRA model structure with fields:

  • .S - m x n stoichiometric matrix

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

  • .met - struct array of per-metabolite data with subfields .InChI, .formula, .formulaInChI and .charge

  • .metNames - m x 1 cell array of metabolite names

  • .description - model description, used to name the output SDF file

OPTIONAL INPUT:

InChIm x 2 cell array of InChI strings for each metabolite; InChI{i, 1} is a metabolite abbreviation (no compartment) and InChI{i, 2} is the metabolite InChI string

OUTPUT:

model – the input model with, for each metabolite, the added subfields .met(m).InChI (InChI mapped to the model, NaN if none) and .met(m).formulaInChI (chemical formula parsed from the InChI)

mol2sdf(mets, molfileDir, sdfFileName, includeRs)[source]

Concatenate the molfiles in a directory into a single SDF file

USAGE:

[metList, noMolMetList] = mol2sdf (mets, molfileDir, sdfFileName, includeRs)

INPUTS:
  • metsm x 1 cell array of metabolite identifiers (e.g. BiGG abbreviations)

  • molfileDir – path to the directory containing the molfiles; molfile names should match the metabolite identifiers in mets (without compartment assignments)

OPTIONAL INPUTS:
  • sdfFileName – name of the output SDF file (default MetStructures.sdf)

  • includeRs – 1 (default) to include variable structures (R groups, repeat units); 0 to exclude them from the SDF

OUTPUTS:
  • metList – cell array of the metabolites written to the SDF

  • noMolMetList – cell array of metabolites without a mol file

Note

Writes sdfFileName, an SDF of the metabolite structures in the same order as metList, with the same metabolite identifiers.