Buildmetstruct

addField2MetStructure(metabolite_structure, metField)[source]

This function adds fields to the metabolite_structure as defined in metaboliteStructureFieldNames.m. Please note that this function does not populate the fields with new data.

INPUT metabolite_structure Metabolite structure metField specify metabolite (optional)

OUTPUT metabolite_structure Updated metabolite structure

Ines Thiele 2020/2021

cleanUpMetabolite_structure(metabolite_structure, startSearch, endSearch)[source]

This function aims at removing the most commonly occuring issues with the data obtained from different resources.

INPUT metabolite_structure Metabolite structure

OUTPUT metabolite_structure Updated metabolite structure

IT Oct 2020

convertModel2Metstructure(model)[source]

This function converts the metabolite information present in a metabolic reconstruction (contained in a model structure) into a metabolite structure to make the reconstruction amenable to the metaboAnnotator extension.

INPUT model model structure

OUTPUT metabolite_structure metabolite structure

Ines Thiele, 2020/2021

createNewMetEntryFromArray(metInput, source, populate, molFileDirectory, metab_rBioNet_online, rxn_rBioNet_online, metabolite_structure_rBioNet)[source]

[metabolite_structure, VMH_existance,rBioNet_existance] = createNewMetEntryFromArray(metInput,source,populate,molFileDirectory) This function takes a list of metabolites (as specified below) and 1. checks whether the metabolite abbr are new to VMH and/or rBioNet (both as in the online versions). Then, it obtained the inchi string from the provided HMDB as well as the mol file. Using, ChemAxonn it determine the most abundant pseudoisomer at ph 7. Then, it uses BridgeDB to obtain further ID’s.

INPUT metInput Cell array containing the metabolites

The information provided must be as follows: metList={ ‘VMH ID’ ‘metabolite_name’ ‘HMDB’ ‘inchistring’ ‘neutral_formula’ ‘charged_formula’ ‘charge’ ‘cot’ ‘Cotinine’ ‘HMDB0001046’ ‘’ ‘’ ‘’ ‘’ ‘coto’ ‘Cotinine n-oxide’ ‘HMDB0001411’ ‘’ ‘’ ‘’ ‘’

source source of the information contained in metArray

(e.g., ‘Manually assembled by IT’)

populate Populate new metabolite information based on the

provided HMDB Id’s. If no HMDB Id’s are provided, please use other functions in the metaboAnnotator for population. (Default:true; false).

molFileDirectory Specify directory where the mol files should be

deposited. (Default: ‘current path’/molFiles).

OUTPUT updatedMetList updated metList VMH_existance Lists whether the abbreviation exists in VMH (online),

as a reaction (2nd entry) or as a metabolite (3rd entry)

rBioNet_existance Lists whether the abbreviation exists in rBioNet (as deposited in cobra toolbox online),

as a reaction (2nd entry) or as a metabolite (3rd entry)

Ines Thiele, 09/2021

createNewMetaboliteStructure(input, source, metabolite_structure_rBioNet, metab, rxnDB)[source]
This function creates a metabolite structure using the provided input. If

no VMHId is provided in the header of the input, then VMHId are generated.

USAGE:

[metabolite_structure] = createNewMetaboliteStructure(input,source,metabolite_structure_rBioNet,metab,rxnDB)

INPUT:
Input: Cell array containing the metabolites

The information provided must be as follows: metList={ ‘VMH ID’ ‘metabolite_name’ ‘HMDB’ ‘inchistring’ ‘neutral_formula’ ‘charged_formula’ ‘charge’ ‘cot’ ‘Cotinine’ ‘HMDB0001046’ ‘’ ‘’ ‘’ ‘’ ‘coto’ ‘Cotinine n-oxide’ ‘HMDB0001411’ ‘’ ‘’ ‘’ ‘’

source: source of the information contained in metArray

(e.g., ‘Manually assembled by IT’)

metabolite_structure_rBioNet: (optional and only necessary if the

input has no VMHId)

metab: rxnDB:

OUTPUT:

metabolite_structure: metabolite structure

createrBioNetStructure(metabolite_structure_rBioNet, start, stop)[source]

for the moment rBioNet will serve as universal database, but I will update this

generateVMHMetAbbr(met, metabolite_structure_rBioNet, metab, rxnDB, customMetAbbrList)[source]

This function generates VMH ID’s based on a metabolites based on predefined rules, as we would generally do it manually

INPUT met Metabolite name or list of names metabolite_structure_rBioNet To save time provide rBioNet either as

  1. string to mat file to load, e.g.,: /path/to/metabolite_structure_rBioNet.mat

  2. structure already in memory: metabolite_structure_rBioNet

metab To save time provide rBioNet (as

metab.mat file)

rxnDB To save time provide rBioNet (as

rxn.mat file)

customMetaboliteList List of metabolite abbr against which

uniqueness should also be checked

OUTPUT VMHId New VMH ID or list of IDs

Ines Thiele, 09/2021

metaboliteStructureFieldNames[source]

This m file contains the list of allowable fields in the metabolite_structure

Ines Thiele, 2020/2021

model2MetStructure(filename, filetype, outputFileName, metabolite_structure_rBioNet)[source]

This function populates metabolites present in a model structure with metabolite identifiers, using the MetaboAnnotator.

INPUT filename Name of the metabolic reconstruction filetype Filetype of the metabolic reconstruction to be loaded. Valid

input arguments are:’SBML’, ‘SimPheny’,’SimPhenyPlus’, ‘SimPhenyText’, ‘Matlab’, ‘BiGG’, ‘BiGGSBML’ or ‘Excel’ (Default = ‘Matlab’), see readCbModel.m for more details.

outputFileName File name under which the metabolite structure

and any other information will be saved.

metabolite_structure_rBioNet

OUTPUT metabolite_structure metabolite structure containing retrieved metabolite

identifiers for each metabolite in the metabolic reconstruction

tableMappingOverview Table listing the IDs and their count

before and after running the function

TableIDs Table containing the individual IDs. Same

content as in metabolite_structure

Ines Thiele, 2020/2021

populateModelMetStr(model, metabolite_structure, replaceAllHits)[source]

This function populates the model structure with information contained in the metabolite structure

INPUT model model structure metabolite_structure metabolite structure replaceAllHits replace existing entries (defaul: false)

OUTPUT model updated model structure

Ines Thiele 10/2021

removeSmilesInchiKey(metabolite_structure, removeInchiKey, removeSmiles, generateSmiles, generateInchiKey, generateMolFile)[source]

this function removes all smiles and InchiKeys from fields if InchiString exists. This is done to reduce cummulative errors. The next step will be to compute smiles and InchiKeys from InchiString - for this use [result] = convertInchiString2format(inchiString,format)

replaceVMHIds(metabolite_structure, reaction_structure)[source]

add, remove, or replace errors present in the metabolite annotation all mentions in this file are manually done and will result in the removal or replacement of the entries.

INPUT metabolite_structure metabolite structure reaction_structure reaction structure (not done yet)

OUTPUT metabolite_structure updated metabolite structure reaction_structure updated reaction structure (not done yet)

Ines Thiele 2020/2021

sanityCheckMetIds(metabolite_structure, removeErrors)[source]

perform basic sanity checks

translateMetStr2COBRAmodel[source]
allowed COBRA fields can be found here

fileName = which(‘COBRA_structure_fields.tab’); [raw] = descFileRead(fileName);

raw.Model_Field this table translates metabolite structure fields and COBRA model fields