anvi-get-metabolic-model-file

This program exports a metabolic reaction network to a file suitable for flux balance analysis..

🔙 To the main page of anvi’o programs and artifacts.

Authors

Requires

contigs-db reaction-network

Provides

reaction-network-json

Usage

This program exports a metabolic reaction-network from a contigs-db OR a pan-db and genomes-storage-db to a reaction-network-json file formatted for flux balance analysis.

The required input to this program is a contigs-db OR a pan-db in which a reaction-network has been stored by anvi-reaction-network. The pan-db must be accompanied by a genomes-storage-db input.

The reaction-network-json file output contains sections on the metabolites, reactions, and genes (or gene clusters) constituting the reaction-network that had been predicted from the genome (or pangenome). An “objective function” representing the biomass composition of metabolites in the “core metabolism” of E. coli is automatically added as the first entry in the “reactions” section of the file and can be deleted as needed. An objective function is needed for flux balance analysis.

Usage

anvi-get-metabolic-model-file requires a contigs-db OR a pan-db and genomes-storage-db as input, plus the path to an output reaction-network-json file.

anvi-get-metabolic-model-file -c /path/to/contigs-db \ -o /path/to/ouput.json

anvi-get-metabolic-model-file -p /path/to/pan-db \ -g /path/to/genomes-storage-db \ -o /path/to/output.json

An existing file at the target output location must be explicitly overwritten with the flag, --overwrite-output-destinations.

anvi-get-metabolic-model-file -c /path/to/contigs-db \ -o /path/to/output.json \ --overwrite-output-destinations

The flag, --remove-missing-objective-metabolites must be used to remove metabolites in the E. coli core biomass objective function from the reaction-network-json file if the metabolites are not produced or consumed by the predicted reaction-network. COBRApy, for instance, cannot load the JSON file if metabolites in the objective function are missing from the model.

anvi-get-metabolic-model-file -c /path/to/contigs-db \ -o /path/to/output.json \ --remove-missing-objective-metabolites

It is possible that the gene KO annotations used to construct the stored reaction network have since been changed in the contigs-db or the genomes-storage-db. By default, without using the flag, --ignore-changed-gene-annotations, this program checks that the set of gene KO annotations that is currently stored was also that used in construction of the reaction-network, and raises an error if this is not the case. Use of this flag ignores that check, permitting the set of gene annotations to have changed since creation of the network.

anvi-get-metabolic-model-file -p /path/to/contigs-db \ -o /path/to/output.json \ --ignore-changed-gene-annotations

For a pangenomic network, the option --record-genomes determines which additional information is added to the output reaction-network-json file regarding genome membership. By default, genome names are recorded for gene clusters and reactions, which is equivalent to --record-genomes cluster reaction. ‘cluster’ records in the ‘notes’ section of each ‘gene’ (cluster) entry in the JSON file which genomes are part of the cluster. ‘reaction’ and ‘metabolite’, respectively, record the genomes predicted to encode enzymes associated with reaction and metabolite entries. The arguments, ‘cluster’, ‘reaction’, and ‘metabolite’, are valid, and are all used in the following example.

anvi-get-metabolic-model-file -p /path/to/pan-db \ -g /path/to/genomes-storage-db \ --record-genomes cluster reaction metabolite

The use of --record-genomes as a flag without any arguments prevents genome membership from being recorded at all in the reaction-network-json file.

anvi-get-metabolic-model-file -p /path/to/pan-db \ -g /path/to/genomes-storage-db \ --record-genomes

Edit this file to update this information.

Command line interface

The following is the list of parameters and their descriptions in the latest version of anvi-get-metabolic-model-file.

The code that generates this web page ensures that this information is the latest available in 9-dev (eunice). Which means, in some cases the information in this section (generated automatically) might be more comprehensive or up-to-date compared to the descriptions above (written by humans).


Command line usage

anvi-get-metabolic-model-file [-h] [-c CONTIGS_DB] [-p PAN_DB] [-g GENOMES_STORAGE] [--record-genomes [RECORD_GENOMES ...]] [-o FILE_PATH] [-W] [--remove-missing-objective-metabolites] [--ignore-changed-gene-annotations]

Parameters and their descriptions

SINGLE GENOME OR METAGENOME Export a reaction network stored in a contigs database.
-c, --contigs-db CONTIGS_DB
Anvi'o contigs database generated by 'anvi-gen-contigs-database'
PANGENOME Export a reaction network stored in a pan database, with the associated genomes storage database also required.
-p, --pan-db PAN_DB
Anvi'o pan database
-g, --genomes-storage GENOMES_STORAGE
Anvi'o genomes storage file
--record-genomes RECORD_GENOMES
This option records the genome membership of gene clusters in JSON entries. By default, genome names are recorded for gene clusters and reactions: this is equivalent to the argument 'cluster reaction'. To not record genome membership at all, use this as a flag without any arguments, i.e., '--record-genomes'. The following arguments can be provided in any combination: 'cluster', 'reaction', and 'metabolite'. 'reaction' and 'metabolite' record the genomes predicted to encode enzymes associated with reactions and metabolites, respectively. Default: ['cluster', 'reaction']
OUTPUT
-o, --output-file FILE_PATH
File path to store results.
-W, --overwrite-output-destinations
Overwrite if the output files and/or directories exist.
OTHER OPTIONS
--remove-missing-objective-metabolites
The metabolic model file includes the core E. coli biomass objective function (BOF), as in the COBRApy example file, 'e_coli_core.json'. With this flag, metabolites in the BOF are removed if they are not produced or consumed by enzymes in the model. Without this flag, COBRApy cannot load the output JSON file if there are missing BOF metabolites. Removed BOF metabolite data are reported to the terminal.
--ignore-changed-gene-annotations
It is possible that the gene KO annotations used to construct the stored reaction network have since been changed in the database. By default, without using this flag, this program checks that the set of gene KO annotations that is currently stored was also that used in construction of the reaction network, and raises an error if this is not the case. Use of this flag ignores that check, permitting the set of gene annotations to have changed since creation of the reaction network.

Additional Resources

Are you aware of resources that may help users better understand the utility of this program? Please feel free to edit this file on GitHub. If you are not sure how to do that, find the __resources__ tag in this file to see an example.