Wang

autoFragment(inchi, radius, dGPredictorPath, canonicalise, cacheName, printLevel)[source]

Automatically fragment one or more InChI into a set of SMILES substructures, each centred on an atom, with a radius specifying the number of bonds to neighbouring atoms

USAGE:

[fragmentedMol, decomposableBool, inchiExistBool] = autoFragment (inchi, radius, dGPredictorPath, canonicalise, cacheName, printLevel)

INPUT:

inchin x 1 cell array of molecules, each an InChI string, or a single InChI string as a char

OPTIONAL INPUTS:
  • radius – number of bonds around each central SMILES atom (default 1)

  • dGPredictorPath – full absolute path (without ~/) to a git clone of dGPredictor

  • canonicalise – boolean, consolidate duplicate canonical SMILES fragments (default 0)

  • cacheName – filename of a cache to load (if it exists) or save to (if not)

  • printLevel – verbosity level (default 0)

OUTPUTS:
  • fragmentedMoln x 1 structure with, for each InChI, the fields:

    • .inchi - the InChI string

    • .smilesCounts - containers.Map from each SMILES substructure to its incidence in the molecule

  • decomposableBooln x 1 logical vector, true where the InChI is decomposable

  • inchiExistBooln x 1 logical vector, true where an InChI is present

Note

External dependencies: Python (see initPythonEnvironment), rdkit (https://www.rdkit.org) and dGPredictor (https://github.com/maranasgroup/dGPredictor). Reference: Wang L, Upadhyay V, Maranas CD (2021) dGPredictor. PLoS Comput Biol 17(9): e1009448. https://doi.org/10.1371/journal.pcbi.1009448

createFragmentIncidenceMatrix(inchi, radius, dGPredictorPath, canonicalise)[source]

Build a fragment incidence matrix by automatically fragmenting each InChI and mapping metabolites to the consolidated set of SMILES fragments

USAGE:

model = createFragmentIncidenceMatrix (inchi, radius, dGPredictorPath, canonicalise)

INPUT:

inchik x 1 cell array of InChI strings (one per metabolite)

OPTIONAL INPUTS:
  • radius – number of bonds around each central SMILES atom (default 1)

  • dGPredictorPath – full absolute path (without ~/) to a git clone of dGPredictor

  • canonicalise – boolean, consolidate duplicate canonical SMILES fragments

OUTPUT:

model – structure with fields:

  • .inchi - the input k x 1 cell array of InChI strings

  • .frag - g x 1 cell array of unique SMILES fragments

  • .G - k x g fragment incidence matrix

test_autoFragment[source]

test autofragmentation using dGPredictor