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()

OUTPUTS

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])

INPUTS

Tmodel – Model structure

OPTIONAL INPUTS

Stats – Will add information to current Stats structure.

OUTPUTS

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)

INPUTS

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.

OUTPUTS

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

OUTPUTS

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)

INPUTS

Model – COBRA format model or Tmodel

OUTPUTS

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)

INPUTS

Model – COBRA format model or Tmodel

OUTPUTS

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)

INPUTS

Model – Cobra model.

OUTPUTS

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)

INPUTS

instr – String input.

OUTPUTS

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)

INPUTS

Tmodel – Template model.

OPTIONAL INPUTS

‘Verbose’ – Ask when performing certain operations.

OUTPUTS

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.

OUTPUTS

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.

OUTPUTS

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 INPUTS

‘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

OUTPUTS

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)

INPUTS

nowFormula – Current chemical formula

OUTPUTS

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])

INPUTS

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 OUTPUTS:

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

OUTPUTS

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)

INPUTS

formulaList – Cell array of chemical formulas.

OUTPUTS

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)

INPUTS

nameList – Cell array of names.

OUTPUTS

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

OUTPUTS

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])

INPUTS

nameList – Cell array of entires that contains duplicates.

OPTIONAL INPUTS

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.

OUTPUTS

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, score, mode, 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.

OPTIONAL INPUTS

score – The originalPress the any key to continue.

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

OUTPUTS

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)

INPUTS
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

OUTPUTS

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

OUTPUTS

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

OUTPUTS

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)

INPUTS

Model – model structure with unsorted fiels

OUTPUTS

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)

INPUTS

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

OUTPUTS

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.

OUTPUTS

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)

INPUTS

infoList – Cell array of strings.

OUTPUTS

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 ‘_’

OUTPUTS

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)

INPUTS

in – Vector

OUTPUTS

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)

INPUTS

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

OPTIONAL INPUTS
  • ‘keepName’ – Don’t ask for verification of model name

  • ‘Verbose’ – Print steps.

OUTPUTS

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