modelBorgifier

TmodelFields()[source]

Returns the field names of the Tmodel structure. This is to help alleviate control between different scripts. Called by cleanTmodel, readCbTmodel, verifyModel, organizeModelCool, TmodelStats, orderModelFieldsBorg.

Usage

fields = TmodelFields()

Output

  • Fields – A column cell array that contains the following in order:
    • rxnFields
    • rNumField
    • metFields
    • mNumFields
    • allFields

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

TmodelStats(Tmodel, varargin)[source]

Provides information on Tmodel. Can also be used on a normal model. Called by mergeModelsBorg, calls TmodelFields.

Usage

Stats = TmodelStats(Tmodel, [Stats]) ;

Input

  • Tmodel – Model structure

Optional input

  • Stats – Will add information to current Stats structure.

Output

  • Stats – Stats array that contains weighting information from previous scoring work.

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

addMetInfo(varargin)[source]

Allows for the addition of information to metabolites during matching. Is called by metCompareGUI.

Usage

addMetInfo(nowMet)

Input

  • nowMet – Metabolite number of metabolite to be updated

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

addToTmodel(Cmodel, Tmodel, rxnList, metList, varargin)[source]

Adds reactions and info from a comparison model into the master template database, Tmodel. Called by mergeModelsBorg, calls cleanTmodel

Usage

[TmodelC, Cmodel] = addToTModel(Cmodel, Tmodel, rxnList, metList)

Inputs

  • Cmodel – Reaction model to draw new reactions from. Must be in the extended COBRA format.
  • Tmodel – Template database in which to add information and new reactions.
  • rxnList – Array the length of Cmodel.rxns with corresponding matching reaction numbers from Tmodel. If a rxn is unique in Cmodel, it has 0. rxnList is the output of reactionCompare GUI.
  • metList – Array the length of Cmodel.mets with corresponding matching met indexes from Tmodel. New mets should already have their correct index in Tmodel.

Optional inputs

  • ‘NoClean’ – Don’t call cleanTmodel at the end of this function
  • ‘Verbose’ – Ask when performing certain operations. Carries into cleanTmodel.

Output

  • Tmodel – The addended master reaction database.

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

autoMatchReactions(scoreTotal, rxnList, metList, varargin)[source]

Finds confident matches from CMODEL to TMODEL. reactions which can not be confidently assigned are reviewed with reactionCompare. To make a confident assignment a matched reaction must have a score above a supplied cutoff and not have competing matches with similar scores. Called by reactionCompareGUI, calls metCompare.

Usage

rxnList = autoMatchReactions(scoreTotal, rxnList, metList, [rxnHighCutoff, rxnMargin, rxnLowCutoff], [metHighCutoff, metMargin, metLowCutoff])

Inputs

  • scoreTotal – Optimized score matrix between CMODEL and TMODEL reactions.
  • rxnList – Only undeclared reactions will be automatched.
  • metList – Comparison array for metabolites

Optional inputs

  • rxnHighCutoff – Score value above which confident assignments can be made.
  • rxnMargin – Distance a best match has to be above a competitor match.
  • rxnLowCutoff – Score value below which reactions will be declared new.
  • metHighCutoff – The following three are the same but for mets.
  • metMargin
  • metLowCutoff
  • CMODEL – global input
  • TMODEL – global input

Output

  • rxnList – Array which correlates a reaction from CMODEL to the index of the best match in TMODEL. Rxns with 0 designation are new, ones with a -1 need manual review.

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

buildRxnEquations(Model)[source]

Takes a COBRA model and creates reaction equations based on the metabolites list, S matrix and bound information. Returns the model with the additinal field rxnEquations. Is called by cleanTmodel, compareCbModels, readCbTmodel, verifyModel, addSEEDInfo.

Usage

Model = buildRxnEquations(Model)

Input

  • Model – COBRA format model or Tmodel

Output

  • Model – Model with corrected rxnEquations field.

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

buildRxnEquationsFromName(Model)[source]

Takes a COBRA model and creates reaction equations based on the metabolite long names, S matrix and bound information. Returns the model with the additioanl field rxnEquations.

Usage

Model = buildRxnEquations(Model)

Input

  • Model – COBRA format model or Tmodel

Output

  • Model – Model with corrected rxnEquations field.

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

buildTmodel(Model)[source]

Initiates the template model (Tmodel). It adds model designations before some of the cell arrays add creates indenty arrays that indicate which reactions and metabolties are contained in which models. This function should be used after verifyModel.

Usage

Tmodel = buildTmodel(Model)

Input

  • Model – Cobra model.

Output

  • Model – Template model which to which another model can be compared. Known as Tmodel in other scripts

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

charpos(instr)[source]

Finds the letter characters (as opposed to numeric characters) in a string and returns a logical array. Called by cleanTmodel.

Usage

letterpos = charpos(instr)

Input

  • instr – String input.

Output

  • letterpos – Logical array with 1’s where the letters are in input.

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

cleanTmodel(Tmodel, varargin)[source]

Reorganizes and checks Tmodel for completeness. To be used immediately after addToTmodel. Called by addToTmodel, mergeModelsBorg, mergeTrxns, calls TmodelFields, buildRxnEquations, removeDuplicateNames, makeNamesUnique, charpos, removeProblematicCharacters.

Usage

Tmodel = cleanTmodel(Tmodel)

Input

  • Tmodel – Template model.

Optional input

  • ‘Verbose’ – Ask when performing certain operations.

Output

  • Tmodel – Cleaned template model

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

colText(inText, inColor)[source]

Returns a HTML string with colored font. Used for GUIs. Called by metCompareGUI, reactionCompareGUI.

Usage

outHtml = colText(inText, inColor)

Inputs

  • inText – String
  • inColor Color to make string.

Output

  • outHtml – Text with formatting

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

compareAllMets(Cmodel, Tmodel)[source]

Compares and scores similarity between all pairwise combinations of metabolites between two models. It is not however used by the main workflow.

Usage

metScores = compareAllMets(Cmodel,Tmodel

Inputs

  • Cmodel – Comparison model.
  • Tmodel – Template model.

Output

  • metScore – Matrix of scores of all pairwise comparisons.

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

compareCbModels(Cmodel, Tmodel, varargin)[source]

Calculate similarity of two Cb models. These models must be in a COBRA-like format. Called by driveModelBorgifier, calls addComparisonInfo, compareMetInfo, optimalScores, mapMatch, buildRxnEquations, fixNames.

Usage

[Cmodel, Tmodel, score, Stats] = compareCbModels(Cmodel, Tmodel)

Inputs

  • Cmodel – Model to be compared to the template. In COBRA format.
  • Tmodel – Template model. In COBRA format.

Optional input

  • ‘Verbose’ – Print progress information. Also controls plotting.

Outputs

  • Cmodel – Appended Cb comparison model with additional information to facilitate comparison.
  • Tmodel – Appended Cb template model with additional information to facilitate comparision.
  • score – Every individual score, split by number of comparison factors. Size = M x N x F
  • Stats – Structure of statistics. Including:
    • scoreTotal - M x N matrix of normalized (0 to 1) scores with M equal to the number of reactions in Cmodel and N equal to the number of reactions in Tmodel.

Note

Use readCbModel to create a COBRA model from a SBML formatted .xml or an appropriate scipt to create the model from an .xls or other format. Run script through verifyModel to make sure that is has all the correct information for compareCbModels.

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

compareMatricies(CMODEL, Cspawn)[source]

Creates a structure with the matrices before and after merging. Useful for comparing how successful merging was. Called by mergeModelsBorg.

Usage

FluxCompare = compareMatricies(CMODEL, Cspawn)

Inputs

  • CMODEL – model in cobra standard
  • CspawnCmodel after it has been removed from the` TmodelC

Output

  • FluxCompare – structure with matrices

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

countC(nowFormula)[source]

Finds number of carbons in a formula, if any. Called by reactionCompareGUI.

Usage

cNum = countC(nowFormula)

Input

  • nowFormula – Current chemical formula

Output

  • cNum – Integer with number of carbons

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

findMetMatch(cMet, varargin)[source]

Finds find possible matches for a given metabolite. Called by metCompare, metCompareGUI, calls stringSimilarityForward.

Usage

[matchScores, matchIndex, [hit]] = findMetMatch(cMet, [tRxn])

Input

  • cMet – Metabolite number (relative to CMODEL) metabolite to be compared.

Optional inputs

  • tRxn – The reaction from TMODEL that this metabolite’s reaction is matched.
  • CMODEL – global input
  • TMODEL – global input

Outputs

  • matchScores – Array of sorted, normalized scores for each met in TMODEL.
  • matchIndex – Index of match in TMODEL.mets.

Optional output

  • hit – Flag for if a match was found.

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

findRxnMatch(cRxn, nMatch, scoreTotal)[source]

Finds the highest scoring matches for a given reaction. Called by reactionCompareGUI.

Usage

Data = findRxnMatch(cRxn, nMatch, scoreTotal)

Inputs

  • cRxn – Number of the compared rxn.
  • nMatch – Number of matches to return.
  • scoreTotal – summed SCORE of reactions vs reactions.
  • CMODEL – global input
  • TMODEL – global input

Output

  • Data – Structure containing comparison information.

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

fixChemFormulas(formulaList)[source]

Formats chemical formulas such that they do not include a ‘1’ after elements that only occur once in the molecule. Only operates on C, H, N, O, P, S. Called by verifyModel, addSEEDInfo.

Usage

formulaList = fixChemFormulas(formulaList)

Input

  • formulaList – Cell array of chemical formulas.

Output

  • formulaList – Same cell array, formated.

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

fixNames(nameList)[source]

Standardizes names, ie, met, rxn and long names for them as well. fixNames makes the names lowercase, removes obtuse characters and whitespace and replaces them with underscores, and then removes starting and trailing underscores. Called by compareCbModels, verifyModel, addSEEDInfo.

Usage

nameList = fixNames(nameList)

Input

  • nameList – Cell array of names.

Output

  • nameList – Same cell array but with fixed names.

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

ismatlab()[source]

Simply tests if Matlab is being used (as opposed to Octave). Called by readCbTmodel.

Usage

out = ismatlab

Output

  • out – Boolean is true if this is Matlab.

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

makeNamesUnique(nameList, varargin)[source]

Identifies duplicate names in a list of names (cell array) and prompts the user to input new names. Called by cleanTmodel, verifyModel, addSEEDInfo, calls countUnique.

Usage

nameList = makeNamesUnique(nameList, [nameInfo])

Input

  • nameList – Cell array of entires that contains duplicates.

Optional input

  • nameInfo – Cell array the same length as nameList that contains information pertaining to the matching entry in nameList. This array can help the renaming process.

Output

  • nameList – Version of nameList with all unique entires.

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

mapMatch(Cmodel, Tmodel, seedMets)[source]

Compares the local network topology between the metabolites and reactions of two models. Called by compareCbModels.

Usage

[rmatch, mmatch] = mapMatch(Cmodel, Tmodel, seedMets)

Inputs

  • Cmodel – model to be compared
  • Tmodel – reference model
  • seedMats – two column cell array with pairs of metabolite names in the two models that are the same

Outputs

  • rmatch – pairwise match score between reactions
  • mmatch – pairwise match score between metabolites

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

mergeModelsBorg(CmodelIn, TmodelIn, rxnList, metList, Stats, varargin)[source]

Checks Tmodel for duplicate reactions and other mistakes, that may have occured during reaction and metabolite matching. It resolves these problems and merges the models, and confirms that Cmodel is the same after being removed from the merged model. It also provides some statistics on the merging process and resulting combined model. Called by driveModelBorgifier, calls addToTmodel, compareMatricies, reactionCompare, cleanTmodel, organizeModelCool`, TmodelStats, readCbTmodel.

Usage

[TmodelC, Cspawn, Stats, CMODEL] = mergeModelsBorg(CmodelIn, TmodelIn, rxnList, metList, Stats, score)

Inputs

  • CmodelIn – Comparison model
  • TmodelIn – Template model
  • rxnList – Array which designates matched and new reactions.
  • metList – Array which desginates matched and new metabolites.
  • Stats – Structure that comes from reactionCompare. Weighting information can be used and additional information addended.
  • score – The original scoring matrix, which may be used to correct problematic reaction upon recomparison.

Optional input

  • ‘Verbose’ – Print statements on progress.

Outputs

  • TmodelC – Combined C and Tmodel.
  • Cspawn – Cmodel after it has been removed from the TmodelC
  • Stats – Structure of information regarding the merging and also stats on the combined model.

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

mergeTrxns(Tmodel, mergerxns, mergerxnsratio)[source]

Merges identical reactions within Tmodel that were accidently kept separate during the model matching process. Calls charpos.

Usage

Tmodel = mergeTrxns(Tmodel, mergerxns, mergerxnsratio)

Inputs

  • Tmodel – Template model
  • mergerxns – Cell array of reactions to be merged
  • mergerxnsratio – Ratio of reactions to be merged

Output

  • TmodelTmodel with reduced number of reactions.

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

metCompare(RxnInfo)[source]

Launches the metCompareGUI, first preparing information for the GUI and automatching some metabolites. If all metabolites are matched, based on certain criteria, then the GUI is bypassed. metCompare then adjusts metList to reflect the new pairings. Called by reactionCompareGUI, autoMatchReactions, calls findMetMatch, metCompareGUI, fillRxnInfo, autoMatchMets.

Usage

[metList, stopFlag] = metCompare(RxnInfo)

Inputs

  • RxnInfo – Structure which contains relevent info, including.
  • rxnIndex – Index of reaction being compared. If metCompare is being run to compare mets irregardless of reactions, this is 0.
  • rxnMatch – The index of that reaction’s match, if any.
  • rxnList – list of reactions
  • metList – list of metabolites
  • CMODEL – global input
  • TMODEL – globl input

Outputs

  • metList – list of metabolites
  • stopFlag – Flag indicates that metabolite matching has been aborted.

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

metCompareGUI(varargin)[source]

Creates a comparison GUI for deciding which metabolite are in a new or existing reaction. Called by metCompare, calls findMetMatch, colText, addMetInfo.

Usage

[RxnInfo, stopFlag] = metCompareGUI(RxnInfo)

Input

  • RxnInfo – Structure containing relevent info. See metCompare function fillRxnInfo.

Optional outputs

  • RxnInfo – Update structure.
  • stopFlag – Indicates if more metabolites need to be reviewed
  • CMODEL – global input
  • TMODEL – global input

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

newCompsNewMets(metList, Cmodel, Tmodel)[source]

Declares all metabolites in Cmodel that come from compartments NOT in Tmodel as new. Called by driveModelBorgifier.

Usage

metList = newCompsNewMets(metList, Cmodel, Tmodel)

Inputs

  • metList – list of metabolites
  • CmodelCmodel structure
  • TmodelTmodel structure

Output

  • metList – list of metabolites

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

optWeightExp(weight, highscoreVectors, lowscoreVectors, hitnum, missnum)[source]

This is a optimization weighting function used for weighting the scores comparing reactions. Called by optimalScores.

Usage

obj = optWeightExp(weight, highscoreVectors, lowscoreVectors, hitnum, missnum)

Inputs

  • weight – Weights
  • highscoreVectors – Logical array of hits
  • lowscoreVectors – Loggical array of misses
  • hitVec – Number of hits.
  • missVec – Number of misses

Output

  • obj – New weights

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

optWeightLin(weight, highscoreVectors, lowscoreVectors)[source]

This is the objective function for the linear optimization of the weighting of the individual scores. It maximizes the difference between the weighted sum of scores of the correctly assigned reactions and the incorrect matches in the training data set. Called by optimalScores.

Usage

obj = optWeightLin(weight, highscoreVectors, lowscoreVectors)

Inputs

  • weight – Weights
  • highscoreVectors – Logical array of hits
  • lowscoreVectors – Loggical array of misses

Output

  • obj – New weights

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

optimalScores(rxnList, optimizer)[source]

Takes the 3D SCORE matrix produced from compareCbModels and weights the scores based on a given training set using either SVM or linear optimization. Colapses SCORE into a cRxnN x tRxnN matrix and also produced the structure Stats, which include the best matches for each reaction in CMODEL and the corresponding index in TMODEL. rxnList is the training set. If rxnList is not provided, then optimalScores just colapses the 3D SCORE matrix to scoreTotal. Called by reactionCompare, reactionCompareGUI, compareCbModels, calls optWeightLin, opnWeightExp, colapseScore.

Usage

Stats = optimalScore(rxnList, optimizer)

Inputs

  • rxnList – reactions` list
  • optimizer – Either ‘svm’, ‘RF’, ‘linear’, or ‘exp’; the latter two are custom functions contained within the functions optWeightLin and optWeightExp.
  • CMODEL – global input
  • TMODEL – global input
  • SCORE – global input

Outputs

  • Stats – Structure containing:
  • bestMatch – Array of the best matching reactions
  • bestMatchIndex – Indicies of the best matching reactions.
  • weightArray
  • scoreTotal – Readjusted scoreTotal based on training set.

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

orderModelFieldsBorg(Model)[source]

Puts the fields in the correct order in the structure. Called by verifyModel, readCbTModel, calls TmodelFields.

Usage

Model = orderModelFieldsBorg(Model)

Input

  • Model – model structure with unsorted fiels

Output

  • Model – model strucutre with sorted fields

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

organizeModelCool(Model)[source]

Reorders a COBRA model such that the most promiscuous mets are listed first, with sister mets grouped together. Reactions are then organized so that the S matrix appoximates a rank order matrix, with exchange reactions at the end. Called by mergeModelsBorg, readCbTmodel, readCbTModel, verifyModel, calls TmodelFields.

Usage

Model = organizeModelCool(Model)

Input

  • Model – Model in COBRA format. Also accept a Tmodel.

Output

  • Model – Organized model.

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

reactionCompare(CmodelIn, TmodelIn, scoreIn, varargin)[source]

This is the function front end for autoMatchReactions and the reactionCompareGUI. Loads CMODEL, TMODEL, Score and ScoreTotal from globals if they are not provided. If rxnList is not provided then it is generated with autoMatchReactions. If you are continuing comparison, include the optional inputs. Called by optimalScores, autoMatchReactions, reactionCompareGUI, calls mergeModelsBorg, driveModelBorgifier.

Usage

[rxnList, metList, Stats] = reactionCompare(CmodelIn, TmodelIn, scoreIn, [rxnList, metList, Stats])

Inputs

  • CmodelIn – Comparison model
  • TmodelIn – Template model
  • scoreIn – Score

Optional inputs

  • rxnList – Array pairs reactions in CMODEL with matches from TMODEL or declares them as new.
  • metList – Array pairs metabolites in CMODEL with matches from TMODEL, new metabolites are given their new met number in TMODEL.
  • Stats – Stats array that contains weighting information from previous scoring work.

Outputs

  • rxnList – reactions’ list
  • metList – metabolites’ list
  • Stats – Structure of information regarding the merging and also stats on the combined model.

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

reactionCompareGUI(varargin)[source]

Lauches a GUI compare reactions visually. After each reaction is declared, metabolites for that reaction are are also matched. reactionCompareGUI should be accessed exclusively through the function reactionCompare. Called by reactionCompare, calls optimalScores, autoMatchReactions, findRxnMatch, metCompare, countC, compareCbModels.

Usage

[rxnList, metList, Stats] = reactionCompareGUI(InfoBall) ;

Inputs

  • InfoBall – Structure which contains relevent information, including:
  • rxnList – Array which links reactions in Cmodel to Tmodel
  • metList – Array which links metabolites in Cmodel to Tmodel.
  • cModelName – Name of the model
  • Stats – Contains weighting parameters.

Outputs

  • rxnList – Array pairs reactions in CMODEL with matches from TMODEL or declares them as new.
  • metList – Array pairs metabolites in CMODEL with matches from TMODEL, new metabolites are given their new met number in TMODEL.
  • Stats – Stats array that contains weighting information from previous scoring work.
  • CMODEL – global input
  • TMODEL – global input
  • SCORE – global input

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

readCbTmodel(modelName, Tmodel, varargin)[source]

Creates COBRA format of a specific model from Tmodel. (composite database). Called by mergeModelsBorg, driveModelBorgifier, calls TmodelFields, orderModelFieldsBorg, organizeModelCool, buildRxnEquations, ismatlab, parseBoolean.

Usage

Model = readCbTmodel(modelName, Tmodel)

Inputs

  • modelName – Name of an available model (i.e. iAF1260). Available names can be found by looking in Tmodel.Models
  • Tmodel – Otherwise Tmodel will be loaded from path below.

Optional inputs

  • emptyArrayChoice – “y” or “n” to remove empty arrays or not
  • ‘Verbose’ – Print progress stamps.

Output

  • Model – Model in COBRA format.

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

removeDuplicateNames(infoList)[source]

Accepts a cell array of strings, with info seperated by a ‘|’ within each cell, and removes the duplicate names in each cell. Also orders the names by size from smallest to largest. Best used after fixNames. Called by cleanTmodel, verifyModel, addSEEDInfo.

Usage

infoList = removeDuplicateNames(infoList)

Input

  • infoList – Cell array of strings.

Output

  • infoList – After removal

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

removeProblematicCharacters(in, varargin)[source]

Replaces all problematic characters in input string in with substitute. Called by cleanTmodel.

Usage

out = removeProblematicCharacters(in, varargin)

Inputs

  • in – String.
  • sub – Character which to subtitute with. Default is ‘_’

Output

  • out – Newly formatted string

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

rowvector(in)[source]

Transposes the input vector to a row vector if it is not already a row vector. Called by verifyModel.

Usage

out = columnvector(in)

Input

  • in – Vector

Output

  • out – Column vector

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747

verifyModelBorg(Model, varargin)[source]

Ensures that a model is in the correct format to be analyzed by any of the scripts in the Tmodel suite. It will add fields that are missing and expected for comparison. It will remove fields not in this list. Called by driveModelBorgifier, calls TmodelFields, fixNames, removeDuplicateNames, makeNamesUnique, buildRxnEquations, fixChemFormulas, orderModelFieldsBorg, organizeModelCool.

Usage

Model = verifyModelBorg(Model)

Input

  • Vmodel – Model from readCbModel or any of the readModel functions.

Optional inputs

  • ‘keepName’ – Don’t ask for verification of model name
  • ‘Verbose’ – Print steps.

Output

  • Model – Model with additional fields and correct format.

Please cite: Sauls, J. T., & Buescher, J. M. (2014). Assimilating genome-scale metabolic reconstructions with modelBorgifier. Bioinformatics (Oxford, England), 30(7), 1036?8. http://doi.org/10.1093/bioinformatics/btt747