Our goal in promoting this tool is to achieve two major shifts in the metabolic model building community:
The memote tool therefore performs four subfunctions:
And in order to make this process as easy as possible the generated repository can easily be integrated with continuous integration testing providers such as Travis CI, which means that anytime you push a model change to GitHub, the test suite will be run automatically and a report will be available for you to look at via GitHub pages for your repository.
For comments and questions get in touch via
Are you excited about this project? Consider contributing by adding novel tests, reporting or fixing bugs, and generally help us make this a better software for everyone.
We highly recommend creating a Python virtualenv for your model testing purposes.
To install memote, run this command in your terminal:
$ pip install memote
This is the preferred method to install memote, as it will always install the most recent stable release.
If you don’t have pip installed, this Python installation guide can guide you through the process.
The sources for memote can be downloaded from the Github repo.
You can either clone the public repository:
$ git clone https://github.com/opencobra/memote.git
Or download the tarball or zip archive:
$ curl -OL https://github.com/opencobra/memote/archive/master.zip
Once you have a copy of the source files, you can install it with:
$ pip install .
After installation, memote can be employed in two different ways: As a benchmarking tool for ad hoc model assessment and as an automated testing suite to aid with the reconstruction of metabolic models. When using memote to benchmark a model, the tests are run once and a report is generated which describes the status-quo. As an automated testing suite, memote facilitates tracking incremental model changes in a version controlled repository and can enable continuous testing and reporting if desired.
Here, we explain step-by-step the necessary commands to pursue either workflow. Users that have already followed this tutorial once may want to refer to the cheat-sheet flowchart to refresh their memory.
To benchmark the performance of a single model, run this command in your terminal:
$ memote report snapshot path/to/model.xml
This will generate the performance report as index.html
.
The output filename can be changed by adding the following option.
To illustrate here it is changed to report.html
.
$ memote report snapshot --filename "report.html" path/to/model.xml
While the html report is still a work in progress, we recommend relying on the verbose output of the command line tool above. Users can tweak the console output by passing additional arguments directly to pytest. This can be done by writing the pytest arguments as one continuous string.
For a full list of possible arguments please refer to the pytest documentation.
This functionality is coming soon.
Comparing two models against each other and quickly identify the differences.
When starting a memote repository, users need to provide an SBMLv3-FBC formatted file. Automatic draft reconstruction tools such as Pathway Tools, Model SEED, The RAVEN Toolbox and others are able to output files in this format. Model repositories such as BiGG or BioModels further serve as a great resource for models in the correct format.
With this in mind, starting a local, version-controlled model repository is as simple as running the following command:
$ memote new
After this, the user will be prompted with a few questions regarding details of the project. If the project is to be kept strictly locally, the user does not need to supply GitHub (or GitLab - not implemented yet) credentials. However, these are a requirement if the project is to use the full benefits of distributed version control such as cloud-based development, remote collaboration and community feedback. It is important to note that furthermore a public repository is needed to set up automatic testing through continuous integration, one of the key features of memote.
Once all the questions following memote new
have been answered, a public
repository has been created under either the user’s GitHub or GitLab account.
To enable continuous integration via Travis CI the following command is
executed:
This functionality is coming soon. A manual workaround is outlined in the cookiecutter-memote readme.
$ memote online
Now, after each edit to the model in the repository, the user can generate an update to the continuous model report shown at the project’s gh-pages branch by saving the changes with the following command:
This functionality is coming soon, for now please utilize the steps outlined for advanced users.
$ memote save
For advanced users: memote save
is the equivalent of executing git add .
,
git commit
and git push
in sequence.
Users that have decided to not to use GitHub (or GitLab Not implemented yet) or those that have decided to set the model repository to private, will need to execute:
$ memote run
to run the testing suite on their commit history followed by:
$ memote report history
to generate the same type of report that would be shown automatically with
continuous integration. After this it is crucial to save the generated test
results by running memote save
again.
We recommend the public workflow not only to promote open, collaborative science but also to benefit from the full functionality of memote.
This cheat-sheet flowchart servers as a visual guide on how to get up and running with memote! It is essentially the pictographic form of the section Getting Started.
Perform basic tests on an instance of cobra.Model
.
test_basic.
test_compartments_presence
(read_only_model, store)[source]¶Expect that >= 3 compartments are defined in the model.
test_basic.
test_enzyme_complex_presence
(read_only_model, store)[source]¶Expect that >= 1 enzyme complexes are present in the model.
test_basic.
test_find_pure_metabolic_reactions
(read_only_model, store)[source]¶Expect >= 1 pure metabolic reactions are present in the model.
test_basic.
test_find_transport_reactions
(read_only_model, store)[source]¶Expect >= 1 transport reactions are present in the read_only_model.
test_basic.
test_find_unique_metabolites
(read_only_model, store)[source]¶Expect there to be less metabolites when removing compartment tag.
test_basic.
test_gene_protein_reaction_rule_presence
(read_only_model, store)[source]¶Expect all non-exchange reactions to have a GPR rule.
test_basic.
test_genes_presence
(read_only_model, store)[source]¶Expect that >= 1 genes are present in the model.
test_basic.
test_metabolic_coverage
(read_only_model, store)[source]¶Expect a model to have high metabolic coverage.
test_basic.
test_metabolites_charge_presence
(read_only_model, store)[source]¶Expect all metabolites to have charge information.
test_basic.
test_metabolites_formula_presence
(read_only_model, store)[source]¶Expect all metabolites to have a formula.
test_basic.
test_metabolites_presence
(read_only_model, store)[source]¶Expect that >= 1 metabolites are present in the model.
test_basic.
test_model_id_presence
(read_only_model, store)[source]¶Expect that the model has an identifier.
test_basic.
test_ngam_presence
(read_only_model, store)[source]¶Expect a single non growth-associated maintenance reaction.
Stoichiometric consistency tests for an instance of cobra.Model
.
test_consistency.
test_blocked_reactions
(read_only_model, store)[source]¶Expect all reactions to be able to carry flux.
test_consistency.
test_find_stoichiometrically_balanced_cycles
(read_only_model, store)[source]¶Expect no stoichiometrically balanced loops to be present.
test_consistency.
test_imbalanced_reactions
(read_only_model, store)[source]¶Expect all reactions to be mass and charge balanced.
Biomass tests performed on an instance of cobra.Model
.
N.B.: We parametrize each function here with the identified biomass reactions. In the storage of test results we rely on the order of the biomass fixtures to remain the same as the parametrized test cases.
test_biomass.
test_biomass_consistency
(read_only_model, reaction_id, store)[source]¶Expect biomass components to sum up to 1 g[CDW].
test_biomass.
test_biomass_default_production
(model, reaction_id, store)[source]¶Expect biomass production in default medium.
test_biomass.
test_biomass_precursors_default_production
(read_only_model, reaction_id, store)[source]¶Expect production of all biomass precursors in default medium.
test_biomass.
test_biomass_precursors_open_production
(model, reaction_id, store)[source]¶Expect precursor production in complete medium.
test_biomass.
test_biomass_presence
(store)[source]¶Expect the model to contain at least one biomass reaction.
test_biomass.
test_fast_growth_default
(model, reaction_id)[source]¶Expect the predicted growth rate for each BOF to be below 10.3972.
This is based on lowest doubling time reported here http://www.pnnl.gov/science/highlights/highlight.asp?id=879
Annotation tests performed on an instance of cobra.Model
.
test_annotation.
test_metabolite_annotation_overview
(read_only_model, store)[source]¶Expect all metabolites to have annotations from common databases.
The required databases are outlined in annotation.py.
test_annotation.
test_metabolite_annotation_presence
(read_only_model, store)[source]¶Expect all metabolites to have a non-empty annotation attribute.
test_annotation.
test_metabolite_annotation_wrong_ids
(read_only_model, store)[source]¶Expect all annotations of metabolites to be in the correct format.
The required formats, i.e., regex patterns are outlined in annotation.py.
test_annotation.
test_metabolite_id_namespace_consistency
(read_only_model, store)[source]¶Expect metabolite IDs to be from the same namespace.
test_annotation.
test_reaction_annotation_overview
(read_only_model, store)[source]¶Expect all reactions to have annotations from common databases.
The required databases are outlined in annotation.py.
test_annotation.
test_reaction_annotation_presence
(read_only_model, store)[source]¶Expect all reactions to have a non-empty annotation attribute.
Syntax tests performed on an instance of cobra.Model
.
test_syntax.
test_abc_transp_rxn_tag_match
(read_only_model, store)[source]¶Expect all abc transport reactions to be tagged with abc
.
test_syntax.
test_demand_reaction_tag_match
(read_only_model, store)[source]¶Expect all demand reaction IDs to be prefixed with DM_
.
test_syntax.
test_exchange_reaction_tag_match
(read_only_model, store)[source]¶Expect all exchange reaction IDs to be prefixed with EX_
.
test_syntax.
test_false_demand_reaction
(read_only_model, store)[source]¶Expect all rxns that are tagged with DM_
to be true demand rxns.
test_syntax.
test_false_exchange_reaction
(read_only_model, store)[source]¶Expect all rxns that are tagged with EX_
to be true exchange rxns.
test_syntax.
test_false_sink_reaction
(read_only_model, store)[source]¶Expect all rxns that are tagged with SK_
to be true sink rxns.
test_syntax.
test_non_abc_transp_rxn_tag_match
(read_only_model, store)[source]¶Expect all non-abc transport reactions to be tagged with a t
.
test_syntax.
test_non_transp_rxn_id_compartment_suffix_match
(read_only_model, store, non_cytosolic)[source]¶Expect all reactions outside of the cytosol to be tagged accordingly.
test_syntax.
test_non_transp_rxn_id_suffix_compartment_match
(read_only_model, store, non_cytosolic)[source]¶Expect compartment-tagged reactions to involve fitting metabolites.
Callbacks for command line parameters.
memote.suite.cli.callbacks.
validate_collect
(context, param, value)[source]¶Handle the report collection flag.
memote.suite.cli.callbacks.
validate_directory
(context, param, value)[source]¶Load directory from different locations.
memote.suite.cli.callbacks.
validate_model
(context, param, value)[source]¶Load model path from different locations.
memote.suite.cli.callbacks.
validate_pytest_args
(context, param, value)[source]¶Handle additional arguments to pytest.
Define and make parseable the memote configuration file.
memote.suite.cli.config.
ConfigFileProcessor
[source]¶Bases: click_configfile.ConfigFileReader
Determine which files to look for and what sections.
config_files
= ['memote.ini', 'setup.cfg']¶config_section_schemas
= [<class 'memote.suite.cli.config.ConfigSectionSchema.Memote'>]¶config_sections
= ['memote']¶memote.suite.cli.config.
ConfigSectionSchema
[source]¶Bases: object
Describes all sections of the memote configuration file.
Memote
[source]¶Bases: click_configfile.SectionSchema
Describes the memote configuration keys and values.
addargs
= <click_configfile.Param object>¶collect
= <click_configfile.Param object>¶directory
= <click_configfile.Param object>¶git
= <click_configfile.Param object>¶github_repository
= <click_configfile.Param object>¶github_username
= <click_configfile.Param object>¶model
= <click_configfile.Param object>¶section_names
= ['memote']¶Provide commands for generating report files.
Provide commands for running the test suite on a metabolic model.
memote command line interface.
Render a basic one-time report.
memote.suite.reporting.reports.basic_report.
BasicReport
(data, **kwargs)[source]¶Bases: memote.suite.reporting.reports.report.Report
Render a basic report from the given data.
Compare two models with one another.
memote.suite.reporting.reports.diff_report.
DiffReport
(**kwargs)[source]¶Bases: memote.suite.reporting.reports.report.Report
Render a report from the comparison of two models.
Render results into pretty HTML.
memote.suite.reporting.reports.history_report.
HistoryReport
(repository, directory, index='time', **kwargs)[source]¶Bases: memote.suite.reporting.reports.report.Report
Render a rich report using the git repository history.
Subpackage for creating visually pleasing reports of test results.
There are three types of reports that we support:
Utilities that handle a dask.bag.
Subpackage for gathering information and creating reports.
Programmatically interact with the memote test suite.
memote.suite.api.
test_model
(model, filename=None, results=False, pytest_args=None)[source]¶Test a model and optionally store results as JSON.
Parameters: | model : cobra.Model
filename : str or pathlib.Path, optional
results : bool, optional
pytest_args : list, optional
|
---|---|
Returns: | int
dict, optional
|
memote.suite.api.
basic_report
(results, filename)[source]¶Test a model and save a basic report.
Parameters: | results : dict
filename : str or pathlib.Path
|
---|
memote.suite.api.
history_report
(repository, directory, filename, index='hash')[source]¶Test a model and save a history report.
Parameters: | repository : git.Repo, optional
directory : str or pathlib.Path
filename : str or pathlib.Path
index : {“hash”, “time”}, optional
|
---|
Collect results for reporting model quality.
memote.suite.collect.
ResultCollectionPlugin
(model, repository=None, branch=None, commit=None, **kwargs)[source]¶Bases: object
Provide functionality for complex test result collection.
The plugin exposes the fixture store
which can be used in test functions
to store values in a dictionary. The dictionary is namespaced to the module
so within a module the same keys should not be re-used (unless intended).
results
¶Return the test results as a nested dictionary.
Supporting functions for annotation checks performed on the model object.
memote.support.annotation.
find_components_without_annotation
(model, components)[source]¶Find model components with empty annotation attributes.
Parameters: | model : cobra.Model
components : {“metabolites”, “reactions”, “genes”}
|
---|---|
Returns: | list
|
memote.support.annotation.
generate_component_annotation_miriam_match
(model, components)[source]¶Tabulate which MIRIAM databases the component’s annotation match.
Parameters: | model : cobra.Model
components : {“metabolites”, “reactions”, “genes”}
|
---|---|
Returns: | pandas.DataFrame
|
memote.support.annotation.
generate_component_annotation_overview
(model, components)[source]¶Tabulate which MIRIAM databases the component’s annotation match.
Parameters: | model : cobra.Model
components : {“metabolites”, “reactions”, “genes”}
|
---|---|
Returns: | pandas.DataFrame
|
memote.support.annotation.
generate_component_id_namespace_overview
(model, components)[source]¶Tabulate which MIRIAM databases the component’s annotation match.
Parameters: | model : cobra.Model
components : {“metabolites”, “reactions”, “genes”}
|
---|---|
Returns: | pandas.DataFrame
|
Supporting functions for basic checks performed on the model object.
Supporting functions for biomass consistency checks.
memote.support.biomass.
sum_biomass_weight
(reaction)[source]¶Compute the sum of all reaction compounds.
Parameters: | reaction : cobra.core.reaction.Reaction
|
---|
memote.support.biomass.
find_biomass_precursors
(reaction)[source]¶Return a list of all biomass precursors excluding ATP and H2O.
Parameters: | reaction : cobra.core.reaction.Reaction
|
---|
memote.support.biomass.
find_blocked_biomass_precursors
(reaction, model)[source]¶Return a list of all biomass precursors that cannot be produced.
Parameters: | reaction : cobra.core.reaction.Reaction
model : cobra.Model
|
---|
Supporting functions for stoichiometric consistency checks.
memote.support.consistency.
check_stoichiometric_consistency
(model)[source]¶Verify the consistency of the model stoichiometry.
Parameters: | model : cobra.Model
|
---|
Notes
See [R15] section 3.1 for a complete description of the algorithm.
[R15] | Gevorgyan, A., M. G Poolman, and D. A Fell. “Detection of Stoichiometric Inconsistencies in Biomolecular Models.” Bioinformatics 24, no. 19 (2008): 2245. |
memote.support.consistency.
find_blocked_reactions
(model)[source]¶Find metabolic reactions that are blocked.
Parameters: | model : cobra.Model
|
---|
Notes
Blocked reactions are those reactions that when optimized for cannot carry any flux while all exchanges are open.
memote.support.consistency.
find_elementary_leakage_modes
(model, atol=1e-13)[source]¶Detect elementary leakage modes.
Parameters: | model : cobra.Model
atol : float, optional
|
---|
Notes
See [R26] section 3.4 for a complete description of the algorithm.
References
[R26] | (1, 2) Gevorgyan, A., M. G Poolman, and D. A Fell. “Detection of Stoichiometric Inconsistencies in Biomolecular Models.” Bioinformatics 24, no. 19 (2008): 2245. |
memote.support.consistency.
find_imbalanced_reactions
(model)[source]¶Find metabolic reactions that not mass and/or charge balanced.
This will exclude biomass, exchange and demand reactions as they are unbalanced by definition.
Parameters: | model : cobra.Model
|
---|
memote.support.consistency.
find_inconsistent_min_stoichiometry
(model, atol=1e-13)[source]¶Detect inconsistent minimal net stoichiometries.
Parameters: | model : cobra.Model
atol : float, optional
|
---|
Notes
See [R37] section 3.3 for a complete description of the algorithm.
[R37] | Gevorgyan, A., M. G Poolman, and D. A Fell. “Detection of Stoichiometric Inconsistencies in Biomolecular Models.” Bioinformatics 24, no. 19 (2008): 2245. |
memote.support.consistency.
find_stoichiometrically_balanced_cycles
(model)[source]¶Find metabolic rxns in stoichiometrically balanced cycles (SBCs).
The flux distribution of nominal FVA is compared with loopless FVA (loopless=True) to determine reactions that participate in loops, as participation in loops would increase the flux through a given reactions to the maximal bounds. This function then returns reactions where the flux differs between the two FVA calculations.
Parameters: | model : cobra.Model
|
---|
Notes
“SBCs are artifacts of metabolic reconstructions due to insufficient constraints (e.g., thermodynamic constraints and regulatory constraints) [R48].” They are defined by internal reactions that carry flux in spite of closed exchange reactions.
References
[R48] | (1, 2) Thiele, I., & Palsson, B. Ø. (2010, January). A protocol for generating a high-quality genome-scale metabolic reconstruction. Nature protocols. Nature Publishing Group. http://doi.org/10.1038/nprot.2009.203 |
memote.support.consistency.
find_unconserved_metabolites
(model)[source]¶Detect unconserved metabolites.
Parameters: | model : cobra.Model
|
---|
Notes
See [R59] section 3.2 for a complete description of the algorithm.
[R59] | Gevorgyan, A., M. G Poolman, and D. A Fell. “Detection of Stoichiometric Inconsistencies in Biomolecular Models.” Bioinformatics 24, no. 19 (2008): 2245. |
Helper functions for stoichiometric consistency checks.
memote.support.consistency_helpers.
stoichiometry_matrix
(metabolites, reactions)[source]¶Return the stoichiometry matrix representation of a set of reactions.
The reactions and metabolites order is respected. All metabolites are expected to be contained and complete in terms of the reactions.
Parameters: | reactions : iterable
metabolites : iterable
|
---|---|
Returns: | numpy.array
dict
dict
|
memote.support.consistency_helpers.
nullspace
(matrix, atol=1e-13, rtol=0.0)[source]¶Compute the nullspace of a 2D numpy.array.
Notes
Adapted from: https://scipy.github.io/old-wiki/pages/Cookbook/RankNullspace.html
Helper functions that are used all over the memote package.
memote.support.helpers.
find_atp_adp_converting_reactions
(model)[source]¶Find reactions which interact with ATP and ADP.
Parameters: | model : cobra.Model
|
---|
memote.support.helpers.
find_biomass_reaction
(model)[source]¶Return a list of the biomass reaction(s) of the model.
Parameters: | model : cobra.Model
|
---|
memote.support.helpers.
find_demand_reactions
(model)[source]¶Return a list of demand reactions.
Parameters: | model : cobra.Model
|
---|
Notes
[1] defines demand reactions as: – ‘unbalanced network reactions that allow the accumulation of a compound’ – reactions that are chiefly added during the gap-filling process – as a means of dealing with ‘compounds that are known to be produced by the organism [..] (i) for which no information is available about their fractional distribution to the biomass or (ii) which may only be produced in some environmental conditions – reactions with a formula such as: ‘met_c -> ‘
Demand reactions differ from exchange reactions in that the metabolites are not removed from the extracellular environment, but from any of the organism’s compartments.
References
[R1113] | Thiele, I., & Palsson, B. Ø. (2010, January). A protocol for generating a high-quality genome-scale metabolic reconstruction. Nature protocols. Nature Publishing Group. http://doi.org/10.1038/nprot.2009.203 |
memote.support.helpers.
find_exchange_rxns
(model)[source]¶Return a list of exchange reactions.
Parameters: | model : cobra.Model
|
---|
Notes
[1] defines exchange reactions as: – reactions that ‘define the extracellular environment’ – ‘unbalanced, extra-organism reactions that represent the supply to or removal of metabolites from the extra-organism “space”’ – reactions with a formula such as: ‘met_e -> ‘ or ‘ -> met_e’ or ‘met_e <=> ‘
Exchange reactions differ from demand reactions in that the metabolites are removed from or added to the extracellular environment only. With this the uptake or secretion of a metabolite is modeled, respectively.
References
[R1214] | Thiele, I., & Palsson, B. Ø. (2010, January). A protocol for generating a high-quality genome-scale metabolic reconstruction. Nature protocols. Nature Publishing Group. http://doi.org/10.1038/nprot.2009.203 |
memote.support.helpers.
find_functional_units
(gpr_str)[source]¶Return an iterator of gene IDs grouped by boolean rules from the gpr_str.
The gpr_str is first transformed into an algebraic expression, replacing the boolean operators ‘or’ with ‘+’ and ‘and’ with ‘*’. Treating the gene IDs as sympy.symbols this allows a mathematical expansion of the algebraic expression. The expanded form is then split again producing sets of gene IDs that in the gpr_str had an ‘and’ relationship.
Parameters: | gpr_str : string
|
---|
memote.support.helpers.
find_sink_reactions
(model)[source]¶Return a list of sink reactions.
Parameters: | model : cobra.Model
|
---|
Notes
[1] defines sink reactions as: – ‘similar to demand reactions’ but reversible, thus able to supply the model with metabolites – reactions that are chiefly added during the gap-filling process – as a means of dealing with ‘compounds that are produced by nonmetabolic cellular processes but that need to be metabolized’ – reactions with a formula such as: ‘met_c <-> ‘
Sink reactions differ from exchange reactions in that the metabolites are not removed from the extracellular environment, but from any of the organism’s compartments.
References
[R1315] | Thiele, I., & Palsson, B. Ø. (2010, January). A protocol for generating a high-quality genome-scale metabolic reconstruction. Nature protocols. Nature Publishing Group. http://doi.org/10.1038/nprot.2009.203 |
memote.support.helpers.
find_transport_reactions
(model)[source]¶Return a list of all transport reactions.
Parameters: | model : cobra.Model
|
---|
Notes
A transport reaction is defined as follows: 1. It contains metabolites from at least 2 compartments and 2. at least 1 metabolite undergoes no chemical reaction, i.e., the formula stays the same on both sides of the equation.
This function will not identify transport via the PTS System.
memote.support.helpers.
find_transported_elements
(rxn)[source]¶Return a dictionary showing the amount of transported elements of a rxn.
Collects the elements for each metabolite participating in a reaction,
multiplies the amount by the metabolite’s stoichiometry in the reaction and
bins the result according to the compartment that metabolite is in. This
produces a dictionary of dictionaries such as this
{'p': {'C': -1, 'H': -4}, c: {'C': 1, 'H': 4}}
which shows the
transported entities. This dictionary is then simplified to only include
the non-zero elements of one single compartment i.e. showing the precise
elements that are transported.
Parameters: | rxn : cobra.Reaction
|
---|
Supporting functions for syntax checks performed on the model object.
memote.support.syntax.
find_abc_tag_transporter
(model)[source]¶Find Atp-binding cassette transport rxns without ‘abc’ tag.
Parameters: | model : cobra.Model
|
---|
Notes
An ABC transport reaction is defined as follows: 1. It contains metabolites from at least 2 compartments, 2. at least 1 metabolite undergoes no chemical reaction, i.e., the formula stays the same on both sides of the equation, and 3. ATP is converted to ADP (+ Pi + H, yet this isn’t checked for explicitly).
Reactions that only transport protons (‘H’) across the membrane are excluded, as well as reactions with redox cofactors whose formula is either ‘X’ or ‘XH2’
memote.support.syntax.
find_false_demand_rxns
(model)[source]¶Find reactions which are tagged with DM_
but which are not demand rxns.
Parameters: | model : cobra.Model
|
---|
memote.support.syntax.
find_false_exchange_rxns
(model)[source]¶Find reactions that are tagged with EX_
but are not exchange reactions.
Parameters: | model : cobra.Model
|
---|
memote.support.syntax.
find_false_sink_rxns
(model)[source]¶Find reactions which are tagged with SK_
but which are not sink rxns.
Parameters: | model : cobra.Model
|
---|
memote.support.syntax.
find_reaction_tag_transporter
(model)[source]¶Return incorrectly tagged transport reactions.
Make an exception for the ATP synthase reaction (ATPS) which a unique case for a transport reaction and thus does not get the tag.
Parameters: | model : cobra.Model
|
---|
Notes
A transport reaction is defined as follows: 1. It contains metabolites from at least 2 compartments and 2. at least 1 metabolite undergoes no chemical reaction, i.e., the formula stays the same on both sides of the equation.
Reactions that only transport protons (‘H’) across the membrane are excluded, as well as reactions with redox cofactors whose formula is either ‘X’ or ‘XH2’
memote.support.syntax.
find_rxn_id_compartment_suffix
(model, suffix)[source]¶Find un-tagged non-transport reactions.
Find non-transport reactions with metabolites in the given compartment whose ID is not tagged accordingly.
Parameters: | model : cobra.Model
suffix : str
|
---|---|
Returns: | list
|
memote.support.syntax.
find_rxn_id_suffix_compartment
(model, suffix)[source]¶Find mis-tagged non-transport reactions.
Find non-transport reactions whose ID bear a compartment tag but which do not contain any metabolites in the given compartment.
Parameters: | model : cobra.Model
suffix : str
|
---|---|
Returns: | list
|
memote.support.syntax.
find_untagged_demand_rxns
(model)[source]¶Find demand reactions whose IDs do not begin with DM_
.
Parameters: | model : cobra.Model
|
---|
memote.support.syntax.
find_untagged_exchange_rxns
(model)[source]¶Find exchange reactions whose identifiers do not begin with EX_
.
Parameters: | model : cobra.Model
|
---|
memote.support.syntax.
find_untagged_sink_rxns
(model)[source]¶Find demand reactions whose IDs do not begin with SK_
.
Parameters: | model : cobra.Model
|
---|
memote.support.syntax.
find_upper_case_mets
(model)[source]¶Find metabolites whose ID roots contain uppercase characters.
Parameters: | model : cobra.Model
|
---|
Notes
In metabolite names, individual uppercase exceptions are allowed: – Dextorotary prefix: ‘D’ – Levorotary prefix: ‘L’ – Prefixes for the absolute configuration of a stereocenter: ‘R’ and ‘S’ – Prefixes for the absolute stereochemistry of double bonds ‘E’ and ‘Z’ – Acyl carrier proteins can be labeled as ‘ACP’
Helper functions for the metabolic model test suite.
(Me)tabolic (Mo)del (Te)sts.
The memote Python package provides a number of hard and soft expectations about genome-scale metabolic models.
Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
You can contribute in many ways:
Report bugs at https://github.com/opencobra/memote/issues.
If you are reporting a bug, please include:
Look through the GitHub issues for bugs. Anything tagged with “bug” and “help wanted” is open to whoever wants to implement it.
Look through the GitHub issues for features. Anything tagged with “enhancement” and “help wanted” is open to whoever wants to implement it.
memote could always use more documentation, whether as part of the official memote docs, in docstrings, or even on the web in blog posts, articles, and such.
The best way to send feedback is to file an issue at https://github.com/opencobra/memote/issues.
If you are proposing a feature:
Ready to contribute? Here’s how to set up memote for local development.
Fork the memote repo on GitHub.
Clone your fork locally:
git clone git@github.com:your_name_here/memote.git
Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:
mkvirtualenv memote
cd memote/
pip install -e .
Create a branch for local development using fix
or feat
as a prefix:
git checkout -b fix-name-of-your-bugfix
Now you can make your changes locally.
When you’re done making changes, check that your changes pass flake8 and the tests, including testing other Python versions. This is all included with tox:
tox
You can run all tests in parallel using detox. To get tox and detox, just pip install them into your virtualenv.
Commit your changes and push your branch to GitHub. Please use semantic commit messages:
git add .
git commit -m "fix: Your detailed description of your changes."
git push origin fix-name-of-your-bugfix
Submit a pull request through the GitHub website.
Before you submit a pull request, check that it meets these guidelines:
test_find_stoichiometrically_balanced_cycles
memote online
.memote.suite.api
(#162).memote
(#172).memote online
(#95, #153).memote.show_versions()
for easy dependency checking.