Tests

batchTestAllReconstructionFunctions(modelFolder, testResultsFolder, inputDataFolder, reconVersion, numWorkers)[source]

Part of the DEMETER pipeline. This function performs all quality control/quality assurance tests on a batch of reconstructions and saves the results for each reconstruction in the input folder.

USAGE

batchTestAllReconstructionFunctions (modelFolder,testResultsFolder,inputDataFolder,reconVersion, numWorkers)

INPUTS modelFolder Folder with COBRA models (draft or refined

reconstructions) to analyze

testResultsFolder Folder where the test results should be saved inputDataFolder Folder with experimental data and database files

to load

reconVersion Name of the refined reconstruction resource numWorkers Number of workers in parallel pool

plotATPTestResults(refinedFolder, reconVersion, varargin)[source]

This function plots the maximal ATP yield by refined reconstructions and reports whether ATP production is feasible. Optionally, draft reconstructions can be included.

USAGE

[tooHighATP,ATP_fluxes] = plotATPTestResults (refinedFolder, reconVersion, varargin)

REQUIRED INPUTS refinedFolder Folder with refined COBRA models generated by

the refinement pipeline

reconVersion Name of the refined reconstruction resource

OPTIONAL INPUTS testResultsFolder Folder where the test results should be saved numWorkers Number of workers in parallel pool (default: 0) translatedDraftsFolder Folder with translated draft COBRA models

generated by KBase pipeline to analyze (will only be analyzed if folder is provided)

OUTPUT tooHighATP List of IDs for refined reconstructions that

produce too much ATP on complex medium

ATP_fluxes Computed ATP production fluxes for each model

plotBiomassTestResults(refinedFolder, reconVersion, varargin)[source]

This function plots the growth of refined reconstructions and reports whether any reconstructions are incapable of biomass production. Optionally, draft reconstructions can be included.

USAGE

[notGrowing,Biomass_fluxes] = plotBiomassTestResults (refinedFolder, reconVersion, varargin)

REQUIRED INPUTS refinedFolder Folder with refined COBRA models generated by

the refinement pipeline

reconVersion Name of the refined reconstruction resource

OPTIONAL INPUTS testResultsFolder Folder where the test results should be saved numWorkers Number of workers in parallel pool (default: 0) translatedDraftsFolder Folder with translated draft COBRA models

generated by KBase pipeline to analyze (will only be analyzed if folder is provided)

OUTPUT notGrowing List of IDs for refined reconstructions that

cannot produce biomass on at least one condition

Biomass_fluxes Computed biomass production fluxes for each model

plotTestSuiteResults(testResultsFolder, reconVersion)[source]

This function prints and summarizes the results of testAllReconstructionFunctions.

runTestSuiteTools(refinedFolder, infoFilePath, inputDataFolder, reconVersion, varargin)[source]

This function initialzes the test suite on all reconstructions in that should be refined through DEMETER.

USAGE

[testResultsFolder,curationReport] = runTestSuiteTools (refinedFolder, infoFilePath, inputDataFolder, reconVersion, varargin)

REQUIRED INPUTS refinedFolder Folder with refined COBRA models generated by the

refinement pipeline

infoFilePath File with information on reconstructions to refine inputDataFolder Folder with experimental data and database files to reconVersion Name of the refined reconstruction resource

OPTIONAL INPUTS testResultsFolder Folder where the test results are saved numWorkers Number of workers in parallel pool (default: 2) createReports Boolean defining if a report for each

reconstruction should be created (default: false).

reportsFolder Folder where reports should be saved translatedDraftsFolder Folder with translated draft COBRA models generated by KBase

pipeline to analyze (will only be analyzed if folder is provided)

OUTPUTS testResultsFolder Folder where the test results are saved curationReport Summary of results of QA/QC tests

runTestsOnModel(model, microbeID, inputDataFolder)[source]

Part of the DEMETER pipeline. This function performs all quality control/quality assurance tests on a model.

USAGE

testResults = runTestsOnModel (model, microbeID, inputDataFolder)

INPUTS modelFolder Folder with COBRA models (draft or refined

reconstructions) to analyze

inputDataFolder Folder with experimental data and database files

to load

OUTPUT testResults Structure with results of the test run

testATP(model)[source]

Tests flux through the ATP demand reaction (DM_atp_c_) on a complex medium-constrained model, both aerobic and anaerobic. USAGE

[atpFluxAerobic, atpFluxAnaerobic] = testATP(model)

INPUT model COBRA model structure

OUTPUT atpFluxAerobic Numeric vector showing the flux through the ATP demand

reaction under aerobic conditions (mmol/gDW/h).

atpFluxAnaerobic Numeric vector showing the flux through the ATP demand

reaction under anaerobic conditions (mmol/gDW/h)

Stefania Magnusdottir, Nov 2017

testAromaticAADegradation(model, microbeID, biomassReaction, database)[source]

Performs an FVA and reports those AromaticAA pathway end reactions (exchange reactions) that can carry flux in the model and should carry flux according to data (true positives) and those AromaticAA pathway end reactions that cannot carry flux in the model but should be secreted according to in vitro data (false negatives).

INPUT model COBRA model structure microbeID Microbe ID in carbon source data file biomassReaction Biomass objective functions (low flux through BOF

required in analysis)

database Structure containing rBioNet reaction and metabolite

database

OUTPUT TruePositives Cell array of strings listing all aromatic amino acid degradation products that can be secreted by the model and in comnparative genomic data. FalseNegatives Cell array of strings listing all aromatic amino acid degradation products that cannot be secreted by the model but should be secreted according to comparative genomic data.

testBileAcidBiosynthesis(model, microbeID, biomassReaction, database)[source]

Performs an FVA and reports those bile acid metabolites (exchange reactions) that can be secreted by the model and should be secreted according to data (true positives) and those bile acid metabolites that cannot be secreted by the model but should be secreted according to in vitro data (false negatives).

INPUT model COBRA model structure microbeID Microbe ID in data file biomassReaction Biomass objective functions (low flux through BOF

required in analysis)

database Structure containing rBioNet reaction and metabolite

database

OUTPUT TruePositives Cell array of strings listing all bile acid products

(exchange reactions) that can be secreted by the model and in in vitro data.

FalseNegatives Cell array of strings listing all bile acid products

(exchange reactions) that cannot be secreted by the model but should be secreted according to in vitro data.

testCarbonSources(model, microbeID, biomassReaction, database, inputDataFolder)[source]

Performs an FVA and reports those carbon sources (exchange reactions) that can be taken up by the model and should be taken up according to data (true positives) and those carbon sources that cannot be taken up by the model but should be taken up according to in vitro data (false negatives).

INPUT model COBRA model structure microbeID Microbe ID in carbon source data file biomassReaction Biomass objective functions (low flux through BOF

required in analysis)

database Structure containing rBioNet reaction and metabolite

database

inputDataFolder Folder with experimental data and database files

to load

OUTPUT TruePositives Cell array of strings listing all carbon sources

(exchange reactions) that can be taken up by the model and in in vitro data.

FalseNegatives Cell array of strings listing all carbon sources

(exchange reactions) that cannot be taken up by the model but should be taken up according to in vitro data.

testDrugMetabolism(model, microbeID, biomassReaction, database)[source]

Performs an FVA and reports those drug metabolites (exchange reactions) that can be taken up and/or secreted by the model and should be secreted according to data (true positives) and those bile acid metabolites that cannot be secreted by the model but should be secreted according to in vitro data (false negatives).

INPUT model COBRA model structure microbeID Microbe ID in carbon source data file biomassReaction Biomass objective functions (low flux through BOF

required in analysis)

database Structure containing rBioNet reaction and metabolite

database

OUTPUT TruePositives Cell array of strings listing all drug metabolites

(exchange reactions) that can be taken up and/or secreted by the model and in in vitro data.

FalseNegatives Cell array of strings listing all drug metabolites

(exchange reactions) that cannot be taken up and/or secreted by the model but should be secreted according to in vitro data.

testFermentationProducts(model, microbeID, biomassReaction, database, inputDataFolder)[source]

Performs an FVA and reports those fermentation products (exchange reactions) that can be secreted by the model and should be secreted according to data (true positives) and those fermentation products that cannot be secreted by the model but should be secreted according to in vitro data (false negatives).

INPUT model COBRA model structure microbeID Microbe ID in carbon source data file biomassReaction Biomass objective functions (low flux through BOF

required in analysis)

database Structure containing rBioNet reaction and metabolite

database

inputDataFolder Folder with experimental data and database files

to load

OUTPUT TruePositives Cell array of strings listing all fermentation products

(exchange reactions) that can be secreted by the model and in in vitro data.

FalseNegatives Cell array of strings listing all fermentation products

(exchange reactions) that cannot be secreted by the model but should be secreted according to in vitro data.

testGeneRules(model)[source]

Finds gene rules that have an incorrect nomenclature.

INPUT model COBRA model structure

OUTPUT incorrectGeneRules Cell array listing entries in model.rules that

have incorrect nomenclature.

Almut Heinken, Oct 2019

testGrowth(model, biomassReaction)[source]

Tests growth, both on unlimited media and complex medium, both aerobic and anaerobic conditions. In anaerobic conditions, both oxygen uptake (exchange reaction) and cytosolic oxygen-utilizing reactions are blocked.

USAGE

[AerobicGrowth, AnaerobicGrowth] = testGrowth(model, biomassReaction)

INPUT model COBRA model structure biomassReaction String listing the biomass reaction

OUTPUT AerobicGrowth Numeric vector showing the flux through the biomass

reaction (aerobic conditions): Column 1: “unlimited” media (all exchanges to -1000 mmol/gDW/h) Column 2: complex medium as defined in InputFilesComplexMedium.txt

AnaerobicGrowth Numeric vector showing the flux through the biomass

reaction (anaerobic conditions): Column 1: “unlimited” media (all exchanges to -1000 mmol/gDW/h) Column 2: complex medium as defined in InputFilesComplexMedium.txt

Stefania Magnusdottir, Nov 2017

testGrowthOnDefinedMedia(model, microbeID, biomassReaction, inputDataFolder)[source]

Tests growth on a minimal medium retrieved from the experimental data on growth requirements. The output is the calculated growth rates. If the model can grow on the defined medium, a minimal medium is also computed and the list of essential exchanges as well as a model constrained with these exchanges are returned.

INPUT model COBRA model structure microbeID Microbe ID in data file biomassReaction String listing the biomass reaction inputDataFolder Folder with experimental data and database files

to load

OUTPUT growsOnDefinedMedium Bool if growth on defined medium yes or no constrainedModel Model constrained with essential exchanges (anaerobic) growthOnKnownCarbonSources Aerobic and anaerobic growth on known

carbon sources for the organism

Almut Heinken, November 2018

testInputFiles()[source]

Tests if the names of all reconstructed microbes are present in the input files for the AGORA2 pipeline.

OUTPUT modelIDsMissingInTable AGORA2 reconstruction IDs missing in the table incorrectIDsInTable Reconstruction IDs in the table not

corresponding to any reconstruction

Almut Heinken, 09/2019

testLeakingMetabolites(model)[source]

Finds metabolites that can be produced when no metabolites enter the model (produced from nothing).

INPUT model COBRA model structure

OUTPUT leakingMets Cell array listing any metabolites that can be be

produced from nothing.

Stefania Magnusdottir, Nov 2017

testMetaboliteUptake(model, microbeID, biomassReaction, database, inputDataFolder)[source]

Performs an FVA and reports those metabolites (exchange reactions) that can be taken up by the model and should be taken up according to data (true positives) and those metabolites that cannot be taken up by the model but should be taken up according to in vitro data (false negatives). Based on literature search of reported vitamin-secreting probiotics performed 11/2017, and a compendium of uptake and uptake products (PMID:28585563)

INPUT model COBRA model structure microbeID Microbe ID in uptake product data file biomassReaction Biomass objective functions (low flux through BOF

required in analysis)

database Structure containing rBioNet reaction and metabolite

database

inputDataFolder Folder with experimental data and database files

to load

OUTPUT TruePositives Cell array of strings listing all metabolites

(exchange reactions) that can be taken up by the model and in in vitro data.

FalseNegatives Cell array of strings listing all metabolites

(exchange reactions) that cannot be taken up by the model but should be taken up according to in vitro data.

testModelMassChargeBalance(model, excludeExchanges, biomassReaction)[source]

Uses the COBRA Toolbox function checkMassChargeBalance to test for mass and charge imbalanced reactions. Reports the mass and/or charge imblanced reactions along with reaction formulas and imblanced elements. Reports metabolites involved in mass or charge imblanced reactions along with their formulas and charges.

INPUT model COBRA model structure excludeExchanges Exclude exchange reactions when reporting imbalanced

reactions (default: true).

OPTIONAL INPUT biomassReaction Model biomass reaction (will be excluded from

report if provided)

OUTPUT massImbalancedRxns Cell array listing (col 1) all mass imbalanced

reactions in the model, (col 2) the reaction formulas, and (col 3) the imbalanced elements.

chargeImbalancedRxns Cell array listing (col 1) all charge imbalanced

reactions in the model, (col 2) the reaction formulas, and (col 3) the imblanced elements.

imbalancedRxnMets Cell array listing (col 1) all metabolites involved

in any mass or charge imblanced reaction, (col 2) the metabolite name, (col 3) the metabolite formula, and (col 4) the metabolite charge.

metsMissingFormulas Cell array listing (col 1) all metabolites that do

not have metabolite formulas and (col 2) the metabolite names.

Stefania Magnusdottir, Oct 2017

testPutrefactionPathways(model, microbeID, biomassReaction, database)[source]

Performs an FVA and reports those putrefaction pathway end reactions (exchange reactions) that can carry flux in the model and should carry flux according to data (true positives) and those putrefaction pathway end reactions that cannot carry flux in the model but should be secreted according to in vitro data (false negatives).

INPUT model COBRA model structure microbeID Microbe ID in carbon source data file biomassReaction Biomass objective functions (low flux through BOF

required in analysis)

database Structure containing rBioNet reaction and metabolite

database

OUTPUT TruePositives Cell array of strings listing all putrefaction reactions that can carry flux in the model and in in vitro data. FalseNegatives Cell array of strings listing all putrefaction reactions that cannot carry flux in the model but should carry flux according to in vitro data.

testRefinedReactions(microbeID, BlockedRxns)[source]

Tests if reactions that were added through the refinement of gene annotations in the reconstructed organism can carry flux.

INPUT microbeID Microbe ID in data file with refined genome annotations BlockedRxns Reactions in the COBRA model that cannot carry flux:

output of identifyBlockedRxns function

OUTPUT RefinedReactionsCarryingFlux Reactions that were added through

refinement of the genome annotations and can carry flux

BlockedRefinedReactions Reactions that were added through

refinement of the genome annotations and cannot carry flux

Almut Heinken, Nov 2019

testSecretionProducts(model, microbeID, biomassReaction, database, inputDataFolder)[source]

Performs an FVA and reports those secretions (exchange reactions) that can be secreted by the model and should be secreted according to data (true positives) and those secretions that cannot be secreted by the model but should be secreted according to in vitro data (false negatives). Based on literature search of reported secretion-secreting probiotics performed 11/2017

INPUT model COBRA model structure microbeID Microbe ID in secretion secretion data file biomassReaction Biomass objective functions (low flux through BOF

required in analysis)

database Structure containing rBioNet reaction and metabolite

database

inputDataFolder Folder with experimental data and database files

to load

OUTPUT TruePositives Cell array of strings listing all secretions

(exchange reactions) that can be secreted by the model and in in vitro data.

FalseNegatives Cell array of strings listing all secretions

(exchange reactions) that cannot be secreted by the model but should be secreted according to in vitro data.

validateCompartments(model)[source]

This function checks if there are any reactions with incorrect compartments in the refined reconstructions. Appropriate compartments include [c], [e], and [p].

USAGE

[incorrectRxns,incorrectMets] = validateCompartments (model)

INPUTS model COBRA model structure

OUTPUTS

incorrectRxns Reactions including metabolites in inappropriate compartments incorrectMets Metabolites located in inappropriate compartments

AUTHOR:

Almut Heinken, 10/2020