Load a cobra model stored as a .mat file .. warning:: INCOMPLETE, does not load GPR’s
infile_path : str variable_name : str, optional
The variable name of the model in the .mat file. If this is not specified, then the first MATLAB variable which looks like a COBRA model will be used
A helper function for adding cobra metabolites to an sbml model.
sbml_model: sbml_model object
cobra_metabolite: a cobra.Metabolite object
note_start_tag: the start tag for parsing cobra notes. this will eventually be supplanted when COBRA is worked into sbml.
note_end_tag: the end tag for parsing cobra notes. this will eventually be supplanted when COBRA is worked into sbml.
convert an SBML XML file into a cobra.Model object. Supports SBML Level 2 Versions 1 and 4
sbml_filename: String.
old_sbml: Boolean. Set to True if the XML file has metabolite formula appended to metabolite names. This was a poorly designed artifact that persists in some models.
legacy_metabolite: Boolean. If True then assume that the metabolite id has the compartment id appended after an underscore (e.g. _c for cytosol). This has not been implemented but will be soon.
print_time: Boolean. Print the time requirements for different sections
use_hyphens: Boolean. If True, double underscores (__) in an SBML ID will be converted to hyphens
Deals with a bunch of problems due to bigg.ucsd.edu not following SBML standards
the_id: String.
the_compartment: String.
the_type: String. Currently only ‘metabolite’ is supported
use_hyphens: Boolean. If True, double underscores (__) in an SBML ID will be converted to hyphens
Deal with legacy SBML format issues arising from the COBRA Toolbox for MATLAB and BiGG.ucsd.edu developers.
read in an sbml file and fix the sbml id’s
Write a cobra.Model object to an SBML XML file.
cobra_model: A cobra.Model object
sbml_filename: The file to write the SBML XML to.
sbml_level: 2 is the only level supported at the moment.
sbml_version: 1 is the only version supported at the moment.
print_time: Boolean. Print the time requirements for different sections
TODO: Update the NOTES to match the SBML standard and provide support for Level 2 Version 4