New¶
- kegg2mol(cid, molfileDir, mets, takeMajorMS, pH, takeMajorTaut, forceReplacement)[source]¶
Retrieve molfiles from the KEGG Compound database.
- USAGE:
kegg2mol (cid, molfileDir, mets, takeMajorMS, pH, takeMajorTaut)
- INPUT:
cid – m x 1 array of KEGG Compound identifiers.
- OPTIONAL INPUTS:
molfileDir – Path to directory where molfiles will be saved. Default is molfilesFromKegg.
mets – m x 1 array of metabolite identifiers. Used to name molfiles. KEGG Compound ID will be used if mets is omitted.
takeMajorMS – {(0), 1}. If 0 (default), molfiles will be downloaded directly from KEGG. If 1, they will save as the major microspecies at the pH specified in input variable pH. Computing major microspecies requires ChemAxon’s calculator plugins (cxcalc).
pH – pH for computing major microspecies.
takeMajorTaut – {0, (1)}. If 1 (default), molfiles will be saved as the major tautomers of the major microspecies at the specified pH.
forceReplacement – {(0),1} if true then the mol file is regenerated regardless of whether it is already in the molfileDir or not
- 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:
InChI – m 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]¶
Concatenates molfiles in molfileDir into one SDF file.
- USAGE:
[metList, noMolMetList] = mol2sdf (mets, molfileDir, sdfFileName, includeRs)
- INPUTS:
mets – m x 1 cell array of metabolite identifiers (e.g., BiGG abbreviations)
molfileDir – Path to directory containing molfiles for metabolites in mets. Molfile names should match the metabolite identifiers in mets without compartment assignments.
- OPTIONAL INPUTS:
sdfFileName – Name of SDF file. Default is MetStructures.sdf.
includeRs – {0, (1)}. If 0, variable structures such as R groups and repeat units will not be included in SDF.
- OUTPUTS:
metList – Cell array listing metabolites in SDF.
noMolMetList – Cell array listing metabolites without mol file.
Written output is sdfFileName.sdf - SDF with metabolite structures in same order as in metList. Metabolite identifiers in the SDF are the same as in MetList.