ChemoInformatics¶
-
acsendingAtomMaps
(rxnFile)[source]¶ Reassign the atom mapping numbers to be ascending in the RXN file V2000
Usage
balanced = acsendingAtomMaps(rxnFile)Input
- rxnFile – Name and path of the RXN file to asign ascending atom mappings.
Outputs
- balanced – Logical value indicating if the RXN file is balanced or not (true, or false).
- A RXN file with ascending atom mappings.
Example
rxnFile = ['rxnFileDir' filesep 'DOPACNNL.rxn']; balanced = acsendingAtomMaps(rxnFile);
-
canonicalRxn
(rxnFile, mappedDir, standardDir)[source]¶ Standarize atom mapped RXNS files into a canonical format. ChemAxon installed is required (needed to compute the atom transition network)
Usage
standardised = canonicalRxn(rxnFile, mappedDir, standardDir)Inputs
- rxnFile – Name of the RXN file to standarize.
- mappedDir – Path to directory containg the RXN files with atom mappings.
- standardDir – Path to directory containg the standard RXN files (generated by obtainAtomMappingsRDT function).
Outputs
- standardised – Logical value indicating if the RXN file is balanced or not (true, or false).
- A standarised RXN file in – ‘mappedDir/rxnFile.rxn’
Example
rxnFile = 'DOPACCL.rxn'; mappedDir = ['mapped' filesep]; standardDir = ['standard' filesep]; standardised = canonicalRxn(rxnFile, mappedDir, standardDir)
-
deleteProtons
(model)[source]¶ Function to delete the protons in the metabolic network
Usage
newModel = deleteProtons(model)Input
- model – COBRA model.
Output
- newModel – COBRA model without protons nor protons trasport reactions.
Example
newModel = deleteProtons(model)
-
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.
-
obtainAtomMappingsRDT
(model, molFileDir, outputDir, maxTime, standariseRxn)[source]¶ Compute atom mappings for reactions with implicit hydrogens in a metabolic network using RDT algorithm
Usage
unmappedRxns = obtainAtomMappingsRDT(model, molFileDir, rxnDir, maxTime, standariseRxn)Inputs
- model –
COBRA model with following fields:
- .S - The m x n stoichiometric matrix for the
- metabolic network.
- .mets - An m x 1 array of metabolite identifiers.
- Should match metabolite identifiers in RXN.
- .metFormulas - An m x 1 array of metabolite
- identifiers. Should match metabolite identifiers in RXN.
- .rxns - An n x 1 array of reaction identifiers.
- Should match rxnfile names in rxnFileDir.
- molFileDir – Path to the directory containing MOL files for metabolites in S. File names should correspond to reaction identifiers in input mets.
Optional inputs
- rxnDir – Path to directory that will contain the RXN files with atom mappings (default current directory).
- maxTime – Maximum time assigned to compute atom mapping (default 1800s).
- standariseRxn – Logic value for standardising the atom mapped RXN file. ChemAxon license is required (default TRUE).
Outputs
- balancedRxns – List of standadised atom mapped reactions.
- A directory with standardised RXN files.
- A directory with atom mapped RXN files.
- A directory images for atom mapped reactions.
- A directory with txt files with data of the atom mappings (SMILES,
- REACTANT INPUT ATOM INDEX, PRODUCT INPUT ATOM INDEX).
Example
example 1: molFileDir = ['data' filesep] standariseRxn = true; unmappedRxns = obtainAtomMappingsRDT(model, molFileDir, pwd, 1800, standariseRxn) example 2: molFileDir = ['data' filesep] standariseRxn = false; standardisedRxns = obtainAtomMappingsRDT(model, molFileDir, pwd, 1800, standariseRxn)
- model –
COBRA model with following fields:
-
readAtomMappingFromRxnFile
(rxnfileName, rxnfileDirectory)[source]¶ Read atom mappings from a rxnfile (Accelrys, San Diego, CA), written with writeRxnfile.m.
Usage
[mets, elements, metNrs, rxnNrs, isSubstrate, instances] = readAtomMappingFromRxnFile(rxnfileName, rxnfileDirectory)Input
- rxnfileName – The file name.
Optional input
- rxnfileDirectory – Path to directory containing the rxnfile. Defaults to current directory.
Outputs
- mets – A p x 1 cell array of metabolite identifiers for atoms.
- elements – A p x 1 cell array of element symbols for atoms.
- metNrs – A p x 1 vector containing the numbering of atoms within each metabolite molfile.
- rxnNrs – A p x 1 vector of atom mappings, i.e., the numbering of atoms within the reaction.
- isSubstrate – A p x 1 logical array. True for substrates, false for products in the reaction.
- instances – A p x 1 vector indicating which instance of a repeated metabolite atom i belongs to.
-
sortRDTfiles
(rxnFile)[source]¶ Sort the molecules in the RXN file acording to the chemical formula in the 4th line of the RXN file.
Usage
sortRDTfiles(rxnFile)Input
- rxnFile – Name and path of the RXN file to sort.
Output
- A RXN file with sorted molecules.
Example
rxnFile = ['rxnFileDir' filesep 'DOPACNNL.rxn']; sortRDTfiles(rxnFile)
-
writeRxnfile
(s, mets, molfileNames, molfileDirectory, rxnfileName, rxnfileDirectory)[source]¶ Writes a rxnfile (Accelrys, San Diego, CA) for a metabolic reaction.
Usage
writeRxnfile(s, mets, molfileNames, molfileDirectory, rxnfileName, rxnfileDirectory)Inputs
- s – An m x 1 vector of stoichiometric coefficients.
- mets – An m x 1 cell array of metabolite identifiers.
Optional inputs
- molfileNames – An m x 1 cell array of molfile names for metabolites in mets. Defaults to mets.
- molfileDirectory – Path to directory containing input molfiles. Defaults to current directory.
- rxnfileName – A name for the output rxnfile. Defaults to ‘rxn.rxn’.
- rxnfileDirectory – Path to directory where the output rxnfile should be saved. Defaults to current directory.
Produces the file ‘rxnfileDirectory/rxnfileName.rxn’