New¶
- createInChIStruct(mets, sdfFileName, molFileDir)[source]¶
Converts metabolite structures in SDF to InChI strings with OpenBabel, and maps InChIs to mets.
- USAGE:
[inchiStruct, molBool] = createInChIStruct (mets, sdfFileName, molFileDir)
- INPUTS:
mets – m x 1 cell array of metabolite identifiers (e.g. BiGG abbreviations)
sdfFileName – SDF file with structures of the metabolites in mets; the metabolite identifiers in the SDF are assumed to match mets. If empty, InChIs are built from individual mol files instead
- OPTIONAL INPUT:
molFileDir – directory of individual mol files (named <met>.mol), used when sdfFileName is empty
- OUTPUTS:
inchiStruct – structure with fields:
.standard - standard InChIs with no isotope, stereo or charge layers
.standardWithStereo - standard InChIs with stereo layers
.standardWithStereoAndCharge - standard InChIs with stereo and charge layers
.nonstandard - nonstandard InChIs with all layers
molBool – m x 1 logical, true where a structure was found for the metabolite
- getFormulaAndChargeFromInChI(inchi)[source]¶
Get the chemical formula, number of protons and charge of a pseudoisomer from its InChI
- USAGE:
[formula, nH, charge] = getFormulaAndChargeFromInChI (inchi)
- INPUT:
inchi – Nonstandard IUPAC InChI for a particular pseudoisomer of a metabolite
- OUTPUTS:
formula – The chemical formula for the input pseudoisomer
nH – The number of total Hydrogen in the actual protonation form
charge – The charge on the input pseudoisomer (excluding the protonation state)
- sdf2inchi(sdfFileName, options)[source]¶
Converts metabolite structures in an SDF to a cell array of InChI strings with OpenBabel.
- USAGE:
[inchi, metList] = sdf2inchi (sdfFileName, options)
- INPUT:
sdfFileName – Path to SDF file.
- OPTIONAL INPUTS:
options – Write options for InChI strings. See InChI documentation for details. If no options are specified the function will output standard InChI.
- OUTPUTS:
inchi – Cell array of InChI strings for metabolites in the SDF file.
metList – Cell array of metabolite identifiers (first line of each molfile in SDF). Will be empty unless write option t is used (i.e., options >= ‘-xt’).