diff --git a/cobra/__init__.py b/cobra/__init__.py
index 57982c0fd..5f065ca2e 100644
--- a/cobra/__init__.py
+++ b/cobra/__init__.py
@@ -10,7 +10,7 @@
from cobra import flux_analysis, io
from cobra.core import (
- DictList, Gene, Metabolite, Model, Object, Reaction, Species)
+ DictList, Gene, Metabolite, Model, Object, Reaction, Species, Compartment)
from cobra.util import show_versions
__version__ = "0.13.4"
diff --git a/cobra/core/__init__.py b/cobra/core/__init__.py
index f23d109a3..3d48fa6a9 100644
--- a/cobra/core/__init__.py
+++ b/cobra/core/__init__.py
@@ -10,3 +10,4 @@
from cobra.core.reaction import Reaction
from cobra.core.solution import Solution, LegacySolution, get_solution
from cobra.core.species import Species
+from cobra.core.compartment import Compartment
diff --git a/cobra/core/compartment.py b/cobra/core/compartment.py
new file mode 100644
index 000000000..a53124b4a
--- /dev/null
+++ b/cobra/core/compartment.py
@@ -0,0 +1,76 @@
+# -*- coding: utf-8 -*-
+
+"""Provide a class for compartments."""
+
+from __future__ import absolute_import
+
+from copy import deepcopy
+from cobra.util import format_long_string, is_not_sane
+from six import string_types
+
+from cobra.core.object import Object
+
+
+class Compartment(Object):
+ """
+ Compartment is a class for holding information regarding
+ a compartment in a cobra.Model object
+
+ Parameters
+ ----------
+ id : string
+ An identifier for the compartment
+ name : string
+ A human readable name.
+
+ """
+ def __init__(self, id=None, name=""):
+ super(Compartment, self).__init__(id=id, name=name)
+ self._id = None
+ self.id = id
+
+ def __contains__(self, metabolite):
+ return metabolite.compartment is self
+
+ def __eq__(self, other):
+ if self is other:
+ return True
+ if isinstance(other, string_types):
+ return self._id == other
+ if isinstance(other, Compartment):
+ return self._id == other.id
+ else:
+ return False
+
+ def __ne__(self, other):
+ return not self.__eq__(other)
+
+ def __hash__(self):
+ return hash(self._id)
+
+ def copy(self):
+ return deepcopy(self)
+
+ @property
+ def id(self):
+ return self._id
+
+ @id.setter
+ def id(self, value):
+ if is_not_sane(value):
+ raise TypeError("The compartment ID must be a non-empty string")
+ self._id = value
+
+ def _repr_html_(self):
+ return """
+
+
+ Compartment identifier | {id} |
+
+ Name | {name} |
+
+ Memory address |
+ {address} |
+
+
""".format(id=self.id, name=format_long_string(self.name),
+ address='0x0%x' % id(self))
diff --git a/cobra/core/metabolite.py b/cobra/core/metabolite.py
index 781fd1236..6e05b147c 100644
--- a/cobra/core/metabolite.py
+++ b/cobra/core/metabolite.py
@@ -12,7 +12,8 @@
from cobra.core.formula import elements_and_molecular_weights
from cobra.core.species import Species
from cobra.util.solver import check_solver_status
-from cobra.util.util import format_long_string
+from cobra.util.util import format_long_string, is_not_sane
+from cobra.core.compartment import Compartment
# Numbers are not required because of the |(?=[A-Z])? block. See the
@@ -35,8 +36,8 @@ class Metabolite(Species):
A human readable name.
charge : float
The charge number of the metabolite
- compartment: str or None
- Compartment of the metabolite.
+ compartment: cobra.Compartment, str or None
+ Compartment or compartment ID that the the metabolite is in.
"""
def __init__(self, id=None, formula=None, name="",
@@ -44,6 +45,7 @@ def __init__(self, id=None, formula=None, name="",
Species.__init__(self, id, name)
self.formula = formula
# because in a Model a metabolite may participate in multiple Reactions
+ self._compartment = None
self.compartment = compartment
self.charge = charge
@@ -58,6 +60,28 @@ def _set_id_with_model(self, value):
self._id = value
self.model.metabolites._generate_index()
+ @property
+ def compartment(self):
+ return self._compartment
+
+ @compartment.setter
+ def compartment(self, value):
+ if value is None:
+ self._compartment = None
+ elif isinstance(value, Compartment):
+ if self._model and value.id in self._model.compartments:
+ self._compartment = \
+ self._model.compartments.get_by_id(value.id)
+ else:
+ self._compartment = value
+ elif not is_not_sane(value):
+ if self._model and value in self._model.compartments:
+ self._compartment = self._model.compartments.get_by_id(value)
+ else:
+ self._compartment = Compartment(value)
+ else:
+ raise TypeError("The compartment ID must be a non-empty string")
+
@property
def constraint(self):
"""Get the constraints associated with this metabolite from the solve
diff --git a/cobra/core/model.py b/cobra/core/model.py
index 4a8e30c07..156db7afa 100644
--- a/cobra/core/model.py
+++ b/cobra/core/model.py
@@ -22,7 +22,7 @@
from cobra.util.solver import (
get_solver_name, interface_to_str, set_objective, solvers,
add_cons_vars_to_problem, remove_cons_vars_from_problem, assert_optimal)
-from cobra.util.util import AutoVivification, format_long_string
+from cobra.util.util import AutoVivification, format_long_string, is_not_sane
from cobra.medium import find_boundary_types
LOGGER = logging.getLogger(__name__)
@@ -91,7 +91,7 @@ def __init__(self, id_or_model=None, name=None):
self.reactions = DictList() # A list of cobra.Reactions
self.metabolites = DictList() # A list of cobra.Metabolites
# genes based on their ids {Gene.id: Gene}
- self._compartments = dict()
+ self._compartments = DictList() # A list of cobra.Compartments
self._contexts = []
# from cameo ...
@@ -162,31 +162,36 @@ def get_metabolite_compartments(self):
return {met.compartment for met in self.metabolites
if met.compartment is not None}
- @property
- def compartments(self):
- return {met.compartment: self._compartments.get(met.compartment, '')
- for met in self.metabolites if met.compartment is not None}
+ def get_metabolites_in_compartment(self, compartment):
+ """
+ Return all metabolites in a specific compartment.
- @compartments.setter
- def compartments(self, value):
- """Get or set the dictionary of current compartment descriptions.
+ Parameters:
+ -----------
+ compartment : Either a `cobra.core.Compartment` object or a string
+ matching the ID of a compartment associated with the cobra.Model.
- Assigning a dictionary to this property updates the model's
- dictionary of compartment descriptions with the new values.
+ """
+ if isinstance(compartment, string_types):
+ return {m for m in self.metabolites if
+ m.compartment.id == compartment}
+ else:
+ return {m for m in self.metabolites if
+ m.compartment is compartment}
- Parameters
- ----------
- value : dict
- Dictionary mapping compartments abbreviations to full names.
+ @property
+ def compartments(self):
+ for met in self.metabolites:
+ if met.compartment is not None:
+ try:
+ self._compartments.append(met.compartment)
+ except Exception:
+ pass
+ return self._compartments
- Examples
- --------
- >>> import cobra.test
- >>> model = cobra.test.create_test_model("textbook")
- >>> model.compartments = {'c': 'the cytosol'}
- {'c': 'the cytosol', 'e': 'extracellular'}
- """
- self._compartments.update(value)
+ @compartments.setter
+ def compartments(self, compartments):
+ self._compartments = compartments
@property
def medium(self):
@@ -330,12 +335,47 @@ def copy(self):
except Exception: # pragma: no cover
new._solver = copy(self.solver) # pragma: no cover
+ try:
+ new.compartments = self.compartments
+ except Exception:
+ pass
+
# it doesn't make sense to retain the context of a copied model so
# assign a new empty context
new._contexts = list()
return new
+ def add_compartments(self, compartment_list):
+ """
+ Will add a list of compartments to the model object.
+
+ The change is reverted upon exit when using the model as a context.
+
+ Parameters
+ ----------
+ compartment_list : list
+ A list with `cobra.Compartment` objects as elements.
+
+ """
+ if not hasattr(compartment_list, '__iter__'):
+ compartment_list = [compartment_list]
+ if len(compartment_list) == 0:
+ return None
+
+ # First check whether the compartments exist in the model
+ compartment_list = [x for x in compartment_list
+ if x not in self.compartments]
+
+ self._compartments += compartment_list
+
+ context = get_context(self)
+ if context:
+ context(partial(self._compartments.__isub__, compartment_list))
+ for x in compartment_list:
+ # Do we care?
+ context(partial(setattr, x, '_model', None))
+
def add_metabolites(self, metabolite_list):
"""Will add a list of metabolites to the model object and add new
constraints accordingly.
@@ -357,12 +397,29 @@ def add_metabolites(self, metabolite_list):
if x.id not in self.metabolites]
bad_ids = [m for m in metabolite_list
- if not isinstance(m.id, string_types) or len(m.id) < 1]
+ if is_not_sane(m.id)]
if len(bad_ids) != 0:
raise ValueError('invalid identifiers in {}'.format(repr(bad_ids)))
- for x in metabolite_list:
- x._model = self
+ for m in metabolite_list:
+ # Link up metabolite to model.
+ m._model = self
+ # Ignore if the metabolite has no compartment assignment at all.
+ if m.compartment is None:
+ continue
+ # If a compartment with this ID already exists in the model ..
+ if m.compartment.id in self.compartments:
+ # .. then re-trigger the metabolite.compartment.setter to now
+ # assign metabolite to this specific compartment.
+ LOGGER.warning("The compartment {} of metabolite {} has been "
+ "replaced with a compartment which already "
+ "exists in the model the ID of which is "
+ "identical".format(m.compartment, m.id))
+ m.compartment = m.compartment.id
+ # Else, safely add the new compartment to the the central
+ # list of compartments.
+ else:
+ self.add_compartments([m.compartment])
self.metabolites += metabolite_list
# from cameo ...
@@ -382,6 +439,56 @@ def add_metabolites(self, metabolite_list):
# Do we care?
context(partial(setattr, x, '_model', None))
+ def remove_compartments(self, compartment_list, destructive=False):
+ """
+ Removes a list of compartments from the object.
+
+ Be aware that this method does not work with the context manager!
+ Before removing a non-empty compartment destructively we recommend
+ storing affected metabolites and compartment for later recovery:
+
+ >>> met_list = model.get_metabolites_in_compartment('x')
+ >>> backup_compartment = model.compartments.x.copy()
+ >>> model.remove_compartments([model.compartments.x], destructive=True)
+
+ Parameters
+ ----------
+ compartment_list : list
+ A list with `cobra.Compartment` objects as elements.
+
+ destructive : bool
+ If False then the compartment will not be removed if it contains
+ metabolites. If True the compartment will be removed even if when
+ it is non-empty. All associated metabolites will then lack a
+ compartment annotation.
+
+ """
+ if not hasattr(compartment_list, '__iter__'):
+ compartment_list = [compartment_list]
+ # Ignore compartments that don't exist in the model
+ compartment_list = [comp for comp in compartment_list
+ if comp in self.compartments]
+ for comp in compartment_list:
+ compartment_mets = self.get_metabolites_in_compartment(comp)
+ if destructive and compartment_mets:
+ warn('The compartment {} was not empty. '
+ 'It contained {} metabolites which are now '
+ 'left without compartment association.'
+ ''.format(comp.id, len(compartment_mets)))
+ for met in compartment_mets:
+ met.compartment = None
+ self.compartments.remove(comp.id)
+ continue
+ elif not destructive and compartment_mets:
+ raise NameError('The compartment {} is not empty. Removing it '
+ 'will leave {} metabolites without '
+ 'compartment association. To bypass this '
+ 'error invoke this function with '
+ 'destructive=True.'
+ ''.format(comp.id, len(compartment_mets)))
+ else:
+ self.compartments.remove(comp.id)
+
def remove_metabolites(self, metabolite_list, destructive=False):
"""Remove a list of metabolites from the the object.
@@ -403,17 +510,24 @@ def remove_metabolites(self, metabolite_list, destructive=False):
# Make sure metabolites exist in model
metabolite_list = [x for x in metabolite_list
if x.id in self.metabolites]
- for x in metabolite_list:
- x._model = None
+ for m in metabolite_list:
+ m._model = None
if not destructive:
- for the_reaction in list(x._reaction):
- the_coefficient = the_reaction._metabolites[x]
- the_reaction.subtract_metabolites({x: the_coefficient})
+ for the_reaction in list(m._reaction):
+ the_coefficient = the_reaction._metabolites[m]
+ the_reaction.subtract_metabolites({m: the_coefficient})
else:
- for x in list(x._reaction):
- x.remove_from_model()
+ for r in list(m._reaction):
+ r.remove_from_model()
+
+ # Notify the user when removing a metabolite has left a
+ # compartment empty.
+ if len(self.get_metabolites_in_compartment(m.compartment)) == 1:
+ warn("{} is the only metabolite in compartment {}. "
+ "Removing it has left that compartment empty."
+ "".format(m.id, m.compartment))
self.metabolites -= metabolite_list
@@ -899,6 +1013,7 @@ def repair(self, rebuild_index=True, rebuild_relationships=True):
self.reactions._generate_index()
self.metabolites._generate_index()
self.genes._generate_index()
+ self._compartments._generate_index()
if rebuild_relationships:
for met in self.metabolites:
met._reaction.clear()
@@ -1089,15 +1204,16 @@ def _repr_html_(self):
Objective expression |
{objective} |
- Compartments |
+ {n_compartments} compartment(s) |
{compartments} |
- """.format(
+ """.format(
name=self.id,
address='0x0%x' % id(self),
num_metabolites=len(self.metabolites),
num_reactions=len(self.reactions),
objective=format_long_string(str(self.objective.expression), 100),
- compartments=", ".join(
- v if v else k for k, v in iteritems(self.compartments)
- ))
+ n_compartments=len(self.compartments),
+ compartments=format_long_string(
+ ', '.join((r.id + " : " + r.name) for r in self._compartments),
+ 200))
diff --git a/cobra/io/__init__.py b/cobra/io/__init__.py
index fac8edb8f..619bef45d 100644
--- a/cobra/io/__init__.py
+++ b/cobra/io/__init__.py
@@ -2,11 +2,12 @@
from __future__ import absolute_import
+from cobra.io.schemata import MODEL_SCHEMA
from cobra.io.dict import (model_from_dict, model_to_dict)
from cobra.io.json import (
- to_json, from_json, load_json_model, save_json_model)
+ to_json, from_json, load_json_model, save_json_model, JSON_SPEC)
from cobra.io.yaml import (
- to_yaml, from_yaml, load_yaml_model, save_yaml_model)
+ to_yaml, from_yaml, load_yaml_model, save_yaml_model, YAML_SPEC)
from cobra.io.sbml3 import read_sbml_model, write_sbml_model
from cobra.io.sbml import read_legacy_sbml
from cobra.io.sbml import write_cobra_model_to_sbml_file as \
diff --git a/cobra/io/dict.py b/cobra/io/dict.py
index da4369a8d..874380ae5 100644
--- a/cobra/io/dict.py
+++ b/cobra/io/dict.py
@@ -8,7 +8,7 @@
from numpy import bool_, float_
from six import iteritems, string_types
-from cobra.core import Gene, Metabolite, Model, Reaction
+from cobra.core import Gene, Metabolite, Model, Reaction, Compartment
from cobra.util.solver import set_objective
_REQUIRED_REACTION_ATTRIBUTES = [
@@ -44,11 +44,17 @@
"annotation": {},
}
-_ORDERED_OPTIONAL_MODEL_KEYS = ["name", "compartments", "notes", "annotation"]
+_REQUIRED_COMPARTMENT_ATTRIBUTES = ["id", "name"]
+_ORDERED_OPTIONAL_COMPARTMENT_KEYS = ["notes", "annotation"]
+_OPTIONAL_COMPARTMENT_ATTRIBUTES = {
+ "notes": {},
+ "annotation": {},
+}
+
+_ORDERED_OPTIONAL_MODEL_KEYS = ["name", "notes", "annotation"]
_OPTIONAL_MODEL_ATTRIBUTES = {
"name": None,
# "description": None, should not actually be included
- "compartments": [],
"notes": {},
"annotation": {},
}
@@ -70,6 +76,8 @@ def _fix_type(value):
# handle legacy Formula type
if value.__class__.__name__ == "Formula":
return str(value)
+ if value.__class__.__name__ == "Compartment":
+ return value.id
if value is None:
return ""
return value
@@ -118,6 +126,28 @@ def gene_from_dict(gene):
return new_gene
+def compartment_to_dict(compartment):
+ new_compartment = OrderedDict()
+ for key in _REQUIRED_COMPARTMENT_ATTRIBUTES:
+ new_compartment[key] = _fix_type(getattr(compartment, key))
+ _update_optional(compartment, new_compartment,
+ _OPTIONAL_COMPARTMENT_ATTRIBUTES,
+ _ORDERED_OPTIONAL_COMPARTMENT_KEYS)
+ return new_compartment
+
+
+def compartment_from_dict(compartment):
+ # Backwards compatibility support for the old schema
+ if "id" not in compartment:
+ id, name = next(iteritems(compartment))
+ return Compartment(id=id, name=name)
+ else:
+ new_compartment = Compartment(compartment["id"])
+ for k, v in iteritems(compartment):
+ setattr(new_compartment, k, v)
+ return new_compartment
+
+
def reaction_to_dict(reaction):
new_reaction = OrderedDict()
for key in _REQUIRED_REACTION_ATTRIBUTES:
@@ -162,9 +192,9 @@ def model_to_dict(model, sort=False):
-------
OrderedDict
A dictionary with elements, 'genes', 'compartments', 'id',
- 'metabolites', 'notes' and 'reactions'; where 'metabolites', 'genes'
- and 'metabolites' are in turn lists with dictionaries holding all
- attributes to form the corresponding object.
+ 'metabolites', 'notes' and 'reactions'; where 'metabolites',
+ 'compartments', 'genes' and 'metabolites' are in turn lists with
+ dictionaries holding all attributes to form the corresponding object.
See Also
--------
@@ -174,6 +204,7 @@ def model_to_dict(model, sort=False):
obj["metabolites"] = list(map(metabolite_to_dict, model.metabolites))
obj["reactions"] = list(map(reaction_to_dict, model.reactions))
obj["genes"] = list(map(gene_to_dict, model.genes))
+ obj["compartments"] = list(map(compartment_to_dict, model.compartments))
obj["id"] = model.id
_update_optional(model, obj, _OPTIONAL_MODEL_ATTRIBUTES,
_ORDERED_OPTIONAL_MODEL_KEYS)
@@ -182,6 +213,7 @@ def model_to_dict(model, sort=False):
obj["metabolites"].sort(key=get_id)
obj["reactions"].sort(key=get_id)
obj["genes"].sort(key=get_id)
+ obj["compartments"].sort(key=get_id)
return obj
@@ -211,6 +243,8 @@ def model_from_dict(obj):
if 'reactions' not in obj:
raise ValueError('Object has no reactions attribute. Cannot load.')
model = Model()
+ model.add_compartments([compartment_from_dict(compartment) for
+ compartment in obj['compartments'] if compartment])
model.add_metabolites(
[metabolite_from_dict(metabolite) for metabolite in obj['metabolites']]
)
@@ -225,6 +259,6 @@ def model_from_dict(obj):
rxn in objective_reactions}
set_objective(model, coefficients)
for k, v in iteritems(obj):
- if k in {'id', 'name', 'notes', 'compartments', 'annotation'}:
+ if k in {'id', 'name', 'notes', 'annotation'}:
setattr(model, k, v)
return model
diff --git a/cobra/io/json.py b/cobra/io/json.py
index 410f96c20..af6901456 100644
--- a/cobra/io/json.py
+++ b/cobra/io/json.py
@@ -2,18 +2,32 @@
from __future__ import absolute_import
-try:
- import simplejson as json
-except ImportError:
- import json
+import json
+
from six import string_types
+import cobra.io.schemata
from cobra.io.dict import model_to_dict, model_from_dict
+
JSON_SPEC = "1"
+JSON_FORMAT = {
+ True: {
+ "indent": 2,
+ "separators": (", ", ": "),
+ "sort_keys": True,
+ "allow_nan": False
+ },
+ False: {
+ "separators": (",", ":"),
+ "sort_keys": False,
+ "allow_nan": False
+ }
+}
+
-def to_json(model, sort=False, **kwargs):
+def to_json(model, sort=False, pretty=False, **kwargs):
"""
Return the model as a JSON document.
@@ -26,6 +40,10 @@ def to_json(model, sort=False, **kwargs):
sort : bool, optional
Whether to sort the metabolites, reactions, and genes or maintain the
order defined in the model.
+ pretty : bool, optional
+ Whether to format the JSON more compactly (default) or in a more
+ verbose but easier to read fashion. Can be partially overwritten by the
+ ``kwargs``.
Returns
-------
@@ -36,10 +54,13 @@ def to_json(model, sort=False, **kwargs):
--------
save_json_model : Write directly to a file.
json.dumps : Base function.
+
"""
obj = model_to_dict(model, sort=sort)
obj[u"version"] = JSON_SPEC
- return json.dumps(obj, allow_nan=False, **kwargs)
+ options = JSON_FORMAT[pretty]
+ options.update(kwargs)
+ return json.dumps(obj, **options)
def from_json(document):
@@ -59,6 +80,7 @@ def from_json(document):
See Also
--------
load_json_model : Load directly from a file.
+
"""
return model_from_dict(json.loads(document))
@@ -88,25 +110,18 @@ def save_json_model(model, filename, sort=False, pretty=False, **kwargs):
--------
to_json : Return a string representation.
json.dump : Base function.
+
"""
obj = model_to_dict(model, sort=sort)
obj[u"version"] = JSON_SPEC
-
- if pretty:
- dump_opts = {
- "indent": 4, "separators": (",", ": "), "sort_keys": True,
- "allow_nan": False}
- else:
- dump_opts = {
- "indent": 0, "separators": (",", ":"), "sort_keys": False,
- "allow_nan": False}
- dump_opts.update(**kwargs)
+ options = JSON_FORMAT[pretty]
+ options.update(**kwargs)
if isinstance(filename, string_types):
with open(filename, "w") as file_handle:
- json.dump(obj, file_handle, **dump_opts)
+ json.dump(obj, file_handle, **options)
else:
- json.dump(obj, filename, **dump_opts)
+ json.dump(obj, filename, **options)
def load_json_model(filename):
@@ -127,116 +142,10 @@ def load_json_model(filename):
See Also
--------
from_json : Load from a string.
+
"""
if isinstance(filename, string_types):
with open(filename, "r") as file_handle:
return model_from_dict(json.load(file_handle))
else:
return model_from_dict(json.load(filename))
-
-
-json_schema = {
- "$schema": "http://json-schema.org/draft-04/schema#",
- "title": "COBRA",
- "description": "JSON representation of COBRA model",
- "type": "object",
- "properties": {
- "id": {"type": "string"},
- "name": {"type": "string"},
- "description": {"type": "string"},
- "version": {
- "type": "integer",
- "default": 1,
- },
-
- "reactions": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {"type": "string"},
- "name": {"type": "string"},
- "metabolites": {
- "type": "object",
- "patternProperties": {
- ".*": {"type": "number"},
- }
- },
- "gene_reaction_rule": {"type": "string"},
- "lower_bound": {"type": "number"},
- "upper_bound": {"type": "number"},
- "objective_coefficient": {
- "type": "number",
- "default": 0,
- },
- "variable_kind": {
- "type": "string",
- "pattern": "integer|continuous",
- "default": "continuous"
- },
- "subsystem": {"type": "string"},
- "notes": {"type": "object"},
- "annotation": {"type": "object"},
- },
- "required": ["id", "name", "metabolites", "lower_bound",
- "upper_bound", "gene_reaction_rule"],
- "additionalProperties": False,
- }
- },
- "metabolites": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {"type": "string"},
- "name": {"type": "string"},
- "compartment": {
- "type": "string",
- "pattern": "[a-z]{1,2}"
- },
- "charge": {"type": "integer"},
- "formula": {"type": "string"},
- "_bound": {
- "type": "number",
- "default": 0
- },
- "_constraint_sense": {
- "type": "string",
- "default": "E",
- "pattern": "E|L|G",
- },
- "notes": {"type": "object"},
- "annotation": {"type": "object"},
- },
- "required": ["id", "name", "compartment"],
- "additionalProperties": False,
- }
-
- },
- "genes": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {"type": "string"},
- "name": {"type": "string"},
- "notes": {"type": "object"},
- "annotation": {"type": "object"},
- },
- "required": ["id", "name"],
- "additionalProperties": False,
- }
-
- },
- "compartments": {
- "type": "object",
- "patternProperties": {
- "[a-z]{1,2}": {"type": "string"}
- }
- },
- "notes": {"type": "object"},
- "annotation": {"type": "object"},
- },
- "required": ["id", "reactions", "metabolites", "genes"],
- "additionalProperties": False,
-}
diff --git a/cobra/io/mat.py b/cobra/io/mat.py
index 1840d99d9..8bee0b99f 100644
--- a/cobra/io/mat.py
+++ b/cobra/io/mat.py
@@ -11,7 +11,7 @@
from numpy import array, inf, isinf
from six import string_types
-from cobra.core import Metabolite, Model, Reaction
+from cobra.core import Metabolite, Model, Reaction, Compartment
from cobra.util import create_stoichiometric_matrix
from cobra.util.solver import set_objective
@@ -120,7 +120,8 @@ def create_mat_metabolite_id(model):
for met in model.metabolites:
if not _get_id_compartment(met.id) and met.compartment:
yield '{}[{}]'.format(met.id,
- model.compartments[met.compartment].lower())
+ model.compartments.get_by_id(
+ met.compartment).name.lower())
else:
yield met.id
@@ -204,12 +205,15 @@ def from_mat_struct(mat_struct, model_id=None, inf=inf):
new_metabolite.compartment = m['comps'][0, 0][comp_index][0][0]
if new_metabolite.compartment not in model.compartments:
comp_name = m['compNames'][0, 0][comp_index][0][0]
- model.compartments[new_metabolite.compartment] = comp_name
+ model.add_compartments([
+ Compartment(str(new_metabolite.compartment), comp_name)])
else:
new_metabolite.compartment = _get_id_compartment(new_metabolite.id)
- if new_metabolite.compartment not in model.compartments:
- model.compartments[
- new_metabolite.compartment] = new_metabolite.compartment
+ if new_metabolite.compartment not in model.compartments and \
+ new_metabolite.compartment is not None:
+ model.add_compartments([
+ Compartment(str(new_metabolite.compartment),
+ new_metabolite.compartment)])
try:
new_metabolite.name = str(m["metNames"][0, 0][i][0][0])
except (IndexError, ValueError):
diff --git a/cobra/io/sbml.py b/cobra/io/sbml.py
index cc4d65f0c..5b0c598d5 100644
--- a/cobra/io/sbml.py
+++ b/cobra/io/sbml.py
@@ -9,7 +9,7 @@
from six import iteritems
-from cobra.core import Metabolite, Model, Reaction
+from cobra.core import Metabolite, Model, Reaction, Compartment
from cobra.util.solver import set_objective
try:
@@ -123,6 +123,10 @@ def create_cobra_model_from_sbml_file(sbml_filename, old_sbml=False,
[(v, k) for k, v in iteritems(compartment_dict)])
cobra_model = Model(sbml_model_id)
+ # Populate the compartment list - This will be done based on
+ # cobra.Metabolites in cobra.Reactions in the future.
+ compartments = [Compartment(k, v) for k, v in iteritems(compartment_dict)]
+ cobra_model.add_compartments(compartments)
metabolites = []
metabolite_dict = {}
# Convert sbml_metabolites to cobra.Metabolites
@@ -344,9 +348,6 @@ def create_cobra_model_from_sbml_file(sbml_filename, old_sbml=False,
# Now, add all of the reactions to the model.
cobra_model.id = sbml_model.getId()
- # Populate the compartment list - This will be done based on
- # cobra.Metabolites in cobra.Reactions in the future.
- cobra_model.compartments = compartment_dict
cobra_model.add_reactions(cobra_reaction_list)
set_objective(cobra_model, coefficients)
@@ -460,14 +461,14 @@ def get_libsbml_document(cobra_model,
# Add in the common compartment abbreviations. If there are additional
# compartments they also need to be added.
- if not cobra_model.compartments:
- cobra_model.compartments = {'c': 'cytosol',
- 'p': 'periplasm',
- 'e': 'extracellular'}
- for the_key in cobra_model.compartments.keys():
+ if len(cobra_model.compartments) == 0:
+ cobra_model.add_compartments([Compartment('c', 'cytosol'),
+ Compartment('p', 'periplasm'),
+ Compartment('e', 'extracellular')])
+ for compartment in cobra_model.compartments:
sbml_comp = sbml_model.createCompartment()
- sbml_comp.setId(the_key)
- sbml_comp.setName(cobra_model.compartments[the_key])
+ sbml_comp.setId(compartment.id)
+ sbml_comp.setName(compartment.name)
sbml_comp.setSize(1) # Just to get rid of warnings
if print_time:
@@ -562,7 +563,7 @@ def get_libsbml_document(cobra_model,
# they are set to be identical
note_dict = the_reaction.notes.copy()
if the_reaction.gene_reaction_rule:
- note_dict['GENE ASSOCIATION'] = [
+ note_dict['GENE_ASSOCIATION'] = [
str(the_reaction.gene_reaction_rule)]
if the_reaction.subsystem:
note_dict['SUBSYSTEM'] = [str(the_reaction.subsystem)]
@@ -657,7 +658,7 @@ def add_sbml_species(sbml_model, cobra_metabolite, note_start_tag,
sbml_species.setName(cobra_metabolite.id)
if the_compartment is not None:
try:
- sbml_species.setCompartment(the_compartment)
+ sbml_species.setCompartment(the_compartment.id)
except:
warn('metabolite failed: ' + the_id)
return cobra_metabolite
diff --git a/cobra/io/sbml3.py b/cobra/io/sbml3.py
index 8f6e7e808..b388a7146 100644
--- a/cobra/io/sbml3.py
+++ b/cobra/io/sbml3.py
@@ -13,7 +13,7 @@
from six import iteritems, string_types
-from cobra.core import Gene, Metabolite, Model, Reaction
+from cobra.core import Gene, Metabolite, Model, Reaction, Compartment
from cobra.core.gene import parse_gpr
from cobra.manipulation.modify import _renames
from cobra.manipulation.validate import check_metabolite_compartment_formula
@@ -262,8 +262,8 @@ def parse_xml_into_model(xml, number=float):
model = Model(model_id)
model.name = xml_model.get("name")
- model.compartments = {c.get("id"): c.get("name") for c in
- xml_model.findall(COMPARTMENT_XPATH)}
+ model.add_compartments([Compartment(c.get("id"), c.get("name")) for c
+ in xml_model.findall(COMPARTMENT_XPATH)])
# add metabolites
for species in xml_model.findall(SPECIES_XPATH % 'false'):
met = get_attrib(species, "id", require=True)
@@ -467,9 +467,9 @@ def create_bound(reaction, bound_type):
# add in compartments
compartments_list = SubElement(xml_model, "listOfCompartments")
compartments = cobra_model.compartments
- for compartment, name in iteritems(compartments):
- SubElement(compartments_list, "compartment", id=compartment, name=name,
- constant="true")
+ for compartment in compartments:
+ SubElement(compartments_list, "compartment", id=compartment.id,
+ name=compartment.name, constant="true")
# add in metabolites
species_list = SubElement(xml_model, "listOfSpecies")
diff --git a/cobra/io/schemata/__init__.py b/cobra/io/schemata/__init__.py
new file mode 100644
index 000000000..77d5db991
--- /dev/null
+++ b/cobra/io/schemata/__init__.py
@@ -0,0 +1,14 @@
+# -*- coding: utf-8 -*-
+
+"""Provide JSON schemata that can be used for validation."""
+
+from __future__ import absolute_import
+
+import json
+
+from importlib_resources import open_text
+
+
+with open_text("cobra.io.schemata", "model_schema.json",
+ encoding="utf-8") as file_handle:
+ MODEL_SCHEMA = json.load(file_handle)
diff --git a/cobra/io/schemata/model_schema.json b/cobra/io/schemata/model_schema.json
new file mode 100644
index 000000000..88b15117b
--- /dev/null
+++ b/cobra/io/schemata/model_schema.json
@@ -0,0 +1,114 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "COBRA",
+ "description": "JSON representation of COBRA model",
+ "type": "object",
+ "properties": {
+ "id": {"type": "string"},
+ "name": {"type": "string"},
+ "description": {"type": "string"},
+ "version": {
+ "type": "string",
+ "default": "1"
+ },
+
+ "reactions": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {"type": "string"},
+ "name": {"type": "string"},
+ "metabolites": {
+ "type": "object",
+ "patternProperties": {
+ ".*": {"type": "number"}
+ }
+ },
+ "gene_reaction_rule": {"type": "string"},
+ "lower_bound": {"type": "number"},
+ "upper_bound": {"type": "number"},
+ "objective_coefficient": {
+ "type": "number",
+ "default": 0
+ },
+ "variable_kind": {
+ "type": "string",
+ "pattern": "integer|continuous",
+ "default": "continuous"
+ },
+ "subsystem": {"type": "string"},
+ "notes": {"type": "object"},
+ "annotation": {"type": "object"}
+ },
+ "required": ["id", "name", "metabolites", "lower_bound",
+ "upper_bound", "gene_reaction_rule"],
+ "additionalProperties": false
+ }
+ },
+ "metabolites": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {"type": "string"},
+ "name": {"type": "string"},
+ "compartment": {
+ "type": "string",
+ "pattern": "[a-z]{1,2}"
+ },
+ "charge": {"type": "integer"},
+ "formula": {"type": "string"},
+ "_bound": {
+ "type": "number",
+ "default": 0
+ },
+ "_constraint_sense": {
+ "type": "string",
+ "default": "E",
+ "pattern": "E|L|G"
+ },
+ "notes": {"type": "object"},
+ "annotation": {"type": "object"}
+ },
+ "required": ["id", "name", "compartment"],
+ "additionalProperties": false
+ }
+
+ },
+ "genes": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {"type": "string"},
+ "name": {"type": "string"},
+ "notes": {"type": "object"},
+ "annotation": {"type": "object"}
+ },
+ "required": ["id", "name"],
+ "additionalProperties": false
+ }
+
+ },
+ "compartments": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {"type": "string"},
+ "name": {"type": "string"},
+ "notes": {"type": "object"},
+ "annotation": {"type": "object"}
+ },
+ "required": ["id", "name"],
+ "additionalProperties": false
+ }
+
+ },
+ "notes": {"type": "object"},
+ "annotation": {"type": "object"}
+ },
+ "required": ["id", "reactions", "metabolites", "genes"],
+ "additionalProperties": false
+}
diff --git a/cobra/io/yaml.py b/cobra/io/yaml.py
index a31c16608..1b862f5af 100644
--- a/cobra/io/yaml.py
+++ b/cobra/io/yaml.py
@@ -14,6 +14,7 @@
class MyYAML(YAML):
+
def dump(self, data, stream=None, **kwargs):
inefficient = False
if stream is None:
diff --git a/cobra/manipulation/modify.py b/cobra/manipulation/modify.py
index 1403c413b..555d20179 100644
--- a/cobra/manipulation/modify.py
+++ b/cobra/manipulation/modify.py
@@ -56,7 +56,8 @@ def escape_ID(cobra_model):
for x in chain([cobra_model],
cobra_model.metabolites,
cobra_model.reactions,
- cobra_model.genes):
+ cobra_model.genes,
+ cobra_model.compartments):
x.id = _escape_str_id(x.id)
cobra_model.repair()
gene_renamer = _GeneEscaper()
diff --git a/cobra/test/data/iJO1366.pickle b/cobra/test/data/iJO1366.pickle
index 2e89067fa..3192a560f 100644
Binary files a/cobra/test/data/iJO1366.pickle and b/cobra/test/data/iJO1366.pickle differ
diff --git a/cobra/test/data/mini.json b/cobra/test/data/mini.json
index 0268e688b..6cbcd6c02 100644
--- a/cobra/test/data/mini.json
+++ b/cobra/test/data/mini.json
@@ -1,1367 +1,1373 @@
{
- "compartments": {
- "c": "cytosol",
- "e": "extracellular"
- },
- "genes": [
- {
- "id": "b0755",
- "name": "gpmA"
- },
- {
- "id": "b0875",
- "name": "aqpZ"
- },
- {
- "id": "b1101",
- "name": "ptsG"
- },
- {
- "id": "b1380",
- "name": "ldhA"
- },
- {
- "id": "b1621",
- "name": "malX"
- },
- {
- "annotation": {
- "ncbigi": [
- "GI:1208453",
- "GI:1652654"
- ]
- },
- "id": "b1676",
- "name": "pykF"
- },
- {
- "id": "b1723",
- "name": "pfkB"
- },
- {
- "id": "b1773",
- "name": "ydjI"
- },
- {
- "id": "b1779",
- "name": "gapA"
- },
- {
- "id": "b1817",
- "name": "manX"
- },
- {
- "id": "b1818",
- "name": "manY"
- },
- {
- "id": "b1819",
- "name": "manZ"
- },
- {
- "id": "b1854",
- "name": "pykA"
- },
- {
- "id": "b2097",
- "name": "fbaB"
- },
- {
- "id": "b2133",
- "name": "dld"
- },
- {
- "id": "b2415",
- "name": "ptsH"
- },
- {
- "id": "b2416",
- "name": "ptsI"
- },
- {
- "id": "b2417",
- "name": "crr"
- },
- {
- "annotation": {
- "ncbigi": "GI:1653839"
- },
- "id": "b2779",
- "name": "eno"
- },
- {
- "id": "b2925",
- "name": "fbaA"
- },
- {
- "annotation": {
- "ncbigi": "GI:1653609"
- },
- "id": "b2926",
- "name": "pgk"
- },
- {
- "id": "b2975",
- "name": "glcA"
- },
- {
- "id": "b2987",
- "name": "pitB"
- },
- {
- "id": "b3493",
- "name": "pitA"
- },
- {
- "id": "b3603",
- "name": "lldP"
- },
- {
- "id": "b3612",
- "name": "gpmM"
- },
- {
- "annotation": {
- "ncbigi": [
- "GI:1006614",
- "GI:1651919"
- ]
- },
- "id": "b3916",
- "name": "pfkA"
- },
- {
- "id": "b3919",
- "name": "tpiA"
- },
- {
- "annotation": {
- "ncbigi": "GI:1653253"
- },
- "id": "b4025",
- "name": "pgi"
- },
- {
- "id": "b4395",
- "name": "ytjC"
- },
- {
- "id": "s0001",
- "name": "G_s0001"
- }
- ],
- "id": "mini_textbook",
- "metabolites": [
- {
- "annotation": {
- "bigg.metabolite": "13dpg",
- "biocyc": "DPG",
- "chebi": [
- "CHEBI:16001",
- "CHEBI:1658",
- "CHEBI:20189",
- "CHEBI:57604",
- "CHEBI:11881"
- ],
- "hmdb": "HMDB01270",
- "kegg.compound": "C00236",
- "pubchem.substance": "3535",
- "reactome": "REACT_29800",
- "seed.compound": "cpd00203",
- "unipathway.compound": "UPC00236"
- },
- "charge": -4,
- "compartment": "c",
- "formula": "C3H4O10P2",
- "id": "13dpg_c",
- "name": "3-Phospho-D-glyceroyl phosphate"
- },
- {
- "annotation": {
- "bigg.metabolite": "2pg",
- "biocyc": "2-PG",
- "chebi": [
- "CHEBI:1267",
- "CHEBI:58289",
- "CHEBI:17835",
- "CHEBI:21028",
- "CHEBI:11651",
- "CHEBI:12986",
- "CHEBI:24344",
- "CHEBI:39868"
- ],
- "hmdb": [
- "HMDB03391",
- "HMDB00362"
- ],
- "kegg.compound": "C00631",
- "pubchem.substance": "3904",
- "reactome": "REACT_30485",
- "seed.compound": "cpd00482",
- "unipathway.compound": "UPC00631"
- },
- "charge": -3,
- "compartment": "c",
- "formula": "C3H4O7P",
- "id": "2pg_c",
- "name": "D-Glycerate 2-phosphate"
- },
- {
- "annotation": {
- "bigg.metabolite": "3pg",
- "biocyc": "G3P",
- "chebi": [
- "CHEBI:40016",
- "CHEBI:58272",
- "CHEBI:57998",
- "CHEBI:11879",
- "CHEBI:1657",
- "CHEBI:1659",
- "CHEBI:17050",
- "CHEBI:21029",
- "CHEBI:11882",
- "CHEBI:11880",
- "CHEBI:12987",
- "CHEBI:17794",
- "CHEBI:24345"
- ],
- "hmdb": "HMDB00807",
- "kegg.compound": [
- "C00197",
- "C00597"
- ],
- "pubchem.substance": "3497",
- "reactome": "REACT_29728",
- "seed.compound": "cpd00169",
- "unipathway.compound": [
- "UPC00597",
- "UPC00197"
- ]
- },
- "charge": -3,
- "compartment": "c",
- "formula": "C3H4O7P",
- "id": "3pg_c",
- "name": "3-Phospho-D-glycerate"
- },
- {
- "annotation": {
- "bigg.metabolite": "adp",
- "biocyc": [
- "ADP",
- "ADP-GROUP"
- ],
- "cas": [
- "58-64-0",
- "58-64-0"
- ],
- "chebi": [
- "CHEBI:13222",
- "CHEBI:16761",
- "CHEBI:2342",
- "CHEBI:22244",
- "CHEBI:40553",
- "CHEBI:456216"
- ],
- "hmdb": "HMDB01341",
- "kegg.compound": "C00008",
- "kegg.glycan": "G11113",
- "pubchem.substance": "3310",
- "reactome": [
- "REACT_190072",
- "REACT_481002",
- "REACT_211606",
- "REACT_429160",
- "REACT_29370",
- "REACT_196180",
- "REACT_113581",
- "REACT_113582",
- "REACT_114564",
- "REACT_114565",
- "REACT_429153"
- ],
- "seed.compound": "cpd00008",
- "unipathway.compound": "UPC00008"
- },
- "charge": -3,
- "compartment": "c",
- "formula": "C10H12N5O10P2",
- "id": "adp_c",
- "name": "ADP"
- },
- {
- "annotation": {
- "bigg.metabolite": "atp",
- "biocyc": "ATP",
- "cas": [
- "56-65-5",
- "56-65-5"
- ],
- "chebi": [
- "CHEBI:40938",
- "CHEBI:15422",
- "CHEBI:57299",
- "CHEBI:13236",
- "CHEBI:10789",
- "CHEBI:30616",
- "CHEBI:22249",
- "CHEBI:10841",
- "CHEBI:2359"
- ],
- "hmdb": "HMDB00538",
- "kegg.compound": "C00002",
- "kegg.drug": "D08646",
- "pubchem.substance": "3304",
- "reactome": [
- "REACT_190078",
- "REACT_113592",
- "REACT_113593",
- "REACT_114570",
- "REACT_29358",
- "REACT_389573",
- "REACT_139836",
- "REACT_211579"
- ],
- "seed.compound": "cpd00002",
- "unipathway.compound": "UPC00002"
- },
- "charge": -4,
- "compartment": "c",
- "formula": "C10H12N5O13P3",
- "id": "atp_c",
- "name": "ATP"
- },
- {
- "annotation": {
- "bigg.metabolite": "dhap",
- "biocyc": "DIHYDROXY-ACETONE-PHOSPHATE",
- "cas": [
- "57-04-5",
- "57-04-5"
- ],
- "chebi": [
- "CHEBI:14341",
- "CHEBI:57642",
- "CHEBI:14342",
- "CHEBI:16108",
- "CHEBI:5454",
- "CHEBI:24355",
- "CHEBI:39571"
- ],
- "hmdb": [
- "HMDB01473",
- "HMDB11735"
- ],
- "kegg.compound": "C00111",
- "pubchem.substance": "3411",
- "reactome": [
- "REACT_188451",
- "REACT_75970",
- "REACT_390404"
- ],
- "seed.compound": "cpd00095",
- "unipathway.compound": "UPC00111"
- },
- "charge": -2,
- "compartment": "c",
- "formula": "C3H5O6P",
- "id": "dhap_c",
- "name": "Dihydroxyacetone phosphate"
- },
- {
- "annotation": {
- "bigg.metabolite": "f6p",
- "biocyc": "FRUCTOSE-6P",
- "cas": [
- "643-13-0",
- "643-13-0"
- ],
- "chebi": [
- "CHEBI:57634",
- "CHEBI:12352",
- "CHEBI:45804",
- "CHEBI:61527",
- "CHEBI:61553",
- "CHEBI:10375",
- "CHEBI:16084",
- "CHEBI:42378",
- "CHEBI:22768"
- ],
- "hmdb": "HMDB03971",
- "kegg.compound": [
- "C05345",
- "C00085"
- ],
- "pubchem.substance": "3385",
- "seed.compound": "cpd00072",
- "unipathway.compound": [
- "UPC05345",
- "UPC00085"
- ]
- },
- "charge": -2,
- "compartment": "c",
- "formula": "C6H11O9P",
- "id": "f6p_c",
- "name": "D-Fructose 6-phosphate"
- },
- {
- "annotation": {
- "bigg.metabolite": "fdp",
- "biocyc": "FRUCTOSE-16-DIPHOSPHATE",
- "cas": [
- "488-69-7",
- "488-69-7"
- ],
- "chebi": [
- "CHEBI:32968",
- "CHEBI:49299",
- "CHEBI:42553",
- "CHEBI:32966",
- "CHEBI:37736",
- "CHEBI:28013",
- "CHEBI:32967",
- "CHEBI:41014",
- "CHEBI:22767",
- "CHEBI:10374",
- "CHEBI:40595",
- "CHEBI:40591"
- ],
- "kegg.compound": [
- "C05378",
- "C00354"
- ],
- "pubchem.substance": "3647",
- "seed.compound": "cpd00290",
- "unipathway.compound": "UPC00354"
- },
- "charge": -4,
- "compartment": "c",
- "formula": "C6H10O12P2",
- "id": "fdp_c",
- "name": "D-Fructose 1,6-bisphosphate"
- },
- {
- "annotation": {
- "bigg.metabolite": "g3p",
- "cas": [
- "142-10-9",
- "142-10-9"
- ],
- "chebi": [
- "CHEBI:17138",
- "CHEBI:14333",
- "CHEBI:5446",
- "CHEBI:58027"
- ],
- "hmdb": "HMDB01112",
- "kegg.compound": [
- "C00661",
- "C00118"
- ],
- "pubchem.substance": "3930",
- "seed.compound": "cpd00102",
- "unipathway.compound": [
- "UPC00661",
- "UPC00118"
- ]
- },
- "charge": -2,
- "compartment": "c",
- "formula": "C3H5O6P",
- "id": "g3p_c",
- "name": "Glyceraldehyde 3-phosphate"
- },
- {
- "annotation": {
- "bigg.metabolite": "g6p",
- "biocyc": [
- "D-glucose-6-phosphate",
- "GLC-6-P"
- ],
- "cas": [
- "56-73-5",
- "56-73-5"
- ],
- "chebi": [
- "CHEBI:10399",
- "CHEBI:22797",
- "CHEBI:41041",
- "CHEBI:17719",
- "CHEBI:4170",
- "CHEBI:61548",
- "CHEBI:58247",
- "CHEBI:12375"
- ],
- "hmdb": [
- "HMDB03498",
- "HMDB06793",
- "HMDB01401",
- "HMDB01549"
- ],
- "kegg.compound": [
- "C00092",
- "C01172"
- ],
- "pubchem.substance": "3392",
- "reactome": "REACT_1629756",
- "seed.compound": "cpd00079",
- "unipathway.compound": "UPC00092"
- },
- "charge": -2,
- "compartment": "c",
- "formula": "C6H11O9P",
- "id": "g6p_c",
- "name": "D-Glucose 6-phosphate"
- },
- {
- "annotation": {
- "bigg.metabolite": "glc__D",
- "cas": [
- "50-99-7",
- "50-99-7"
- ],
- "kegg.compound": "C00031",
- "pubchem.substance": "3333"
- },
- "charge": 0,
- "compartment": "e",
- "formula": "C6H12O6",
- "id": "glc__D_e",
- "name": "D-Glucose"
- },
- {
- "annotation": {
- "bigg.metabolite": "h2o",
- "biocyc": [
- "WATER",
- "OH",
- "OXONIUM"
- ],
- "cas": [
- "7732-18-5",
- "7732-18-5"
- ],
- "chebi": [
- "CHEBI:15377",
- "CHEBI:13365",
- "CHEBI:41979",
- "CHEBI:16234",
- "CHEBI:36385",
- "CHEBI:42857",
- "CHEBI:27313",
- "CHEBI:44819",
- "CHEBI:29373",
- "CHEBI:10743",
- "CHEBI:5594",
- "CHEBI:29356",
- "CHEBI:53442",
- "CHEBI:29375",
- "CHEBI:29374",
- "CHEBI:13419",
- "CHEBI:43228",
- "CHEBI:44292",
- "CHEBI:13352",
- "CHEBI:41981",
- "CHEBI:29412",
- "CHEBI:42043",
- "CHEBI:33811",
- "CHEBI:33813",
- "CHEBI:35511",
- "CHEBI:5585",
- "CHEBI:44641",
- "CHEBI:44701"
- ],
- "hmdb": [
- "HMDB01039",
- "HMDB02111"
- ],
- "kegg.compound": [
- "C01328",
- "C00001",
- "C18714",
- "C18712"
- ],
- "kegg.drug": [
- "D00001",
- "D06322",
- "D03703"
- ],
- "pubchem.substance": "3303",
- "reactome": [
- "REACT_947593",
- "REACT_189422",
- "REACT_141343",
- "REACT_113518",
- "REACT_1605715",
- "REACT_109276",
- "REACT_113521",
- "REACT_113519",
- "REACT_2022884",
- "REACT_351603",
- "REACT_29356"
- ],
- "seed.compound": [
- "cpd15275",
- "cpd00001"
- ],
- "unipathway.compound": [
- "UPC00001",
- "UPC01328"
- ]
- },
- "charge": 0,
- "compartment": "c",
- "formula": "H2O",
- "id": "h2o_c",
- "name": "H2O"
- },
- {
- "annotation": {
- "bigg.metabolite": "h2o",
- "biocyc": [
- "WATER",
- "OH",
- "OXONIUM"
- ],
- "cas": [
- "7732-18-5",
- "7732-18-5"
- ],
- "chebi": [
- "CHEBI:15377",
- "CHEBI:13365",
- "CHEBI:41979",
- "CHEBI:16234",
- "CHEBI:36385",
- "CHEBI:42857",
- "CHEBI:27313",
- "CHEBI:44819",
- "CHEBI:29373",
- "CHEBI:10743",
- "CHEBI:5594",
- "CHEBI:29356",
- "CHEBI:53442",
- "CHEBI:29375",
- "CHEBI:29374",
- "CHEBI:13419",
- "CHEBI:43228",
- "CHEBI:44292",
- "CHEBI:13352",
- "CHEBI:41981",
- "CHEBI:29412",
- "CHEBI:42043",
- "CHEBI:33811",
- "CHEBI:33813",
- "CHEBI:35511",
- "CHEBI:5585",
- "CHEBI:44641",
- "CHEBI:44701"
- ],
- "hmdb": [
- "HMDB01039",
- "HMDB02111"
- ],
- "kegg.compound": [
- "C01328",
- "C00001",
- "C18714",
- "C18712"
- ],
- "kegg.drug": [
- "D00001",
- "D06322",
- "D03703"
- ],
- "pubchem.substance": "3303",
- "reactome": [
- "REACT_947593",
- "REACT_189422",
- "REACT_141343",
- "REACT_113518",
- "REACT_1605715",
- "REACT_109276",
- "REACT_113521",
- "REACT_113519",
- "REACT_2022884",
- "REACT_351603",
- "REACT_29356"
- ],
- "seed.compound": [
- "cpd15275",
- "cpd00001"
- ],
- "unipathway.compound": [
- "UPC00001",
- "UPC01328"
- ]
- },
- "charge": 0,
- "compartment": "e",
- "formula": "H2O",
- "id": "h2o_e",
- "name": "H2O"
- },
- {
- "annotation": {
- "bigg.metabolite": "h",
- "biocyc": "PROTON",
- "cas": [
- "12408-02-5",
- "12408-02-5"
- ],
- "chebi": [
- "CHEBI:24636",
- "CHEBI:15378",
- "CHEBI:10744",
- "CHEBI:13357",
- "CHEBI:5584"
- ],
- "kegg.compound": "C00080",
- "pubchem.substance": "3380",
- "reactome": [
- "REACT_194688",
- "REACT_425978",
- "REACT_193465",
- "REACT_374900",
- "REACT_74722",
- "REACT_425999",
- "REACT_428040",
- "REACT_163953",
- "REACT_372511",
- "REACT_2000349",
- "REACT_70106",
- "REACT_1470067",
- "REACT_113529",
- "REACT_425969",
- "REACT_428548",
- "REACT_156540",
- "REACT_1614597",
- "REACT_351626",
- "REACT_427899"
- ],
- "seed.compound": "cpd00067",
- "unipathway.compound": "UPC00080"
- },
- "charge": 1,
- "compartment": "c",
- "formula": "H",
- "id": "h_c",
- "name": "H+"
- },
- {
- "annotation": {
- "bigg.metabolite": "h",
- "biocyc": "PROTON",
- "cas": [
- "12408-02-5",
- "12408-02-5"
- ],
- "chebi": [
- "CHEBI:24636",
- "CHEBI:15378",
- "CHEBI:10744",
- "CHEBI:13357",
- "CHEBI:5584"
- ],
- "kegg.compound": "C00080",
- "pubchem.substance": "3380",
- "reactome": [
- "REACT_194688",
- "REACT_425978",
- "REACT_193465",
- "REACT_374900",
- "REACT_74722",
- "REACT_425999",
- "REACT_428040",
- "REACT_163953",
- "REACT_372511",
- "REACT_2000349",
- "REACT_70106",
- "REACT_1470067",
- "REACT_113529",
- "REACT_425969",
- "REACT_428548",
- "REACT_156540",
- "REACT_1614597",
- "REACT_351626",
- "REACT_427899"
- ],
- "seed.compound": "cpd00067",
- "unipathway.compound": "UPC00080"
- },
- "charge": 1,
- "compartment": "e",
- "formula": "H",
- "id": "h_e",
- "name": "H+"
- },
- {
- "charge": -1,
- "compartment": "c",
- "formula": "C3H5O3",
- "id": "lac__D_c",
- "name": "D-Lactate"
- },
- {
- "charge": -1,
- "compartment": "e",
- "formula": "C3H5O3",
- "id": "lac__D_e",
- "name": "D-Lactate"
- },
- {
- "annotation": {
- "bigg.metabolite": "nad",
- "biocyc": "NAD",
- "cas": [
- "53-84-9",
- "53-84-9"
- ],
- "chebi": [
- "CHEBI:21901",
- "CHEBI:7422",
- "CHEBI:44214",
- "CHEBI:15846",
- "CHEBI:13394",
- "CHEBI:13393",
- "CHEBI:44215",
- "CHEBI:13389",
- "CHEBI:57540",
- "CHEBI:44281"
- ],
- "hmdb": "HMDB00902",
- "kegg.compound": "C00003",
- "kegg.drug": "D00002",
- "pubchem.substance": "3305",
- "reactome": [
- "REACT_192307",
- "REACT_29360",
- "REACT_427523",
- "REACT_194653",
- "REACT_113526"
- ],
- "seed.compound": "cpd00003",
- "unipathway.compound": "UPC00003"
- },
- "charge": -1,
- "compartment": "c",
- "formula": "C21H26N7O14P2",
- "id": "nad_c",
- "name": "Nicotinamide adenine dinucleotide"
- },
- {
- "annotation": {
- "bigg.metabolite": "nadh",
- "biocyc": "NADH",
- "cas": [
- "58-68-4",
- "58-68-4"
- ],
- "chebi": [
- "CHEBI:13395",
- "CHEBI:21902",
- "CHEBI:16908",
- "CHEBI:7423",
- "CHEBI:44216",
- "CHEBI:57945",
- "CHEBI:13396"
- ],
- "hmdb": "HMDB01487",
- "kegg.compound": "C00004",
- "pubchem.substance": "3306",
- "reactome": [
- "REACT_192305",
- "REACT_73473",
- "REACT_194697",
- "REACT_29362"
- ],
- "seed.compound": "cpd00004",
- "unipathway.compound": "UPC00004"
- },
- "charge": -2,
- "compartment": "c",
- "formula": "C21H27N7O14P2",
- "id": "nadh_c",
- "name": "Nicotinamide adenine dinucleotide - reduced"
- },
- {
- "annotation": {
- "bigg.metabolite": "pep",
- "biocyc": "PHOSPHO-ENOL-PYRUVATE",
- "cas": [
- "138-08-9",
- "138-08-9"
- ],
- "chebi": [
- "CHEBI:44897",
- "CHEBI:44894",
- "CHEBI:14812",
- "CHEBI:8147",
- "CHEBI:26055",
- "CHEBI:26054",
- "CHEBI:58702",
- "CHEBI:18021"
- ],
- "hmdb": "HMDB00263",
- "kegg.compound": "C00074",
- "pubchem.substance": "3374",
- "reactome": [
- "REACT_29492",
- "REACT_372364"
- ],
- "seed.compound": "cpd00061",
- "unipathway.compound": "UPC00074"
- },
- "charge": -3,
- "compartment": "c",
- "formula": "C3H2O6P",
- "id": "pep_c",
- "name": "Phosphoenolpyruvate"
- },
- {
- "annotation": {
- "bigg.metabolite": "pi",
- "biocyc": [
- "Pi",
- "PHOSPHATE-GROUP",
- "CPD0-1421"
- ],
- "cas": [
- "14265-44-2",
- "14265-44-2"
- ],
- "chebi": [
- "CHEBI:37583",
- "CHEBI:7793",
- "CHEBI:37585",
- "CHEBI:34683",
- "CHEBI:14791",
- "CHEBI:34855",
- "CHEBI:29137",
- "CHEBI:29139",
- "CHEBI:63036",
- "CHEBI:26020",
- "CHEBI:39739",
- "CHEBI:32597",
- "CHEBI:32596",
- "CHEBI:43474",
- "CHEBI:63051",
- "CHEBI:43470",
- "CHEBI:9679",
- "CHEBI:35433",
- "CHEBI:4496",
- "CHEBI:45024",
- "CHEBI:18367",
- "CHEBI:26078",
- "CHEBI:39745",
- "CHEBI:24838"
- ],
- "hmdb": "HMDB02142",
- "kegg.compound": [
- "C13556",
- "C13558",
- "C00009"
- ],
- "kegg.drug": "D05467",
- "pubchem.substance": "3311",
- "reactome": [
- "REACT_947590",
- "REACT_109277",
- "REACT_113548",
- "REACT_2255331",
- "REACT_29372",
- "REACT_113550",
- "REACT_113551"
- ],
- "seed.compound": [
- "cpd09464",
- "cpd09463",
- "cpd00009"
- ],
- "unipathway.compound": "UPC00009"
- },
- "charge": -2,
- "compartment": "c",
- "formula": "HO4P",
- "id": "pi_c",
- "name": "Phosphate"
- },
- {
- "annotation": {
- "bigg.metabolite": "pi",
- "biocyc": [
- "Pi",
- "PHOSPHATE-GROUP",
- "CPD0-1421"
- ],
- "cas": [
- "14265-44-2",
- "14265-44-2"
- ],
- "chebi": [
- "CHEBI:37583",
- "CHEBI:7793",
- "CHEBI:37585",
- "CHEBI:34683",
- "CHEBI:14791",
- "CHEBI:34855",
- "CHEBI:29137",
- "CHEBI:29139",
- "CHEBI:63036",
- "CHEBI:26020",
- "CHEBI:39739",
- "CHEBI:32597",
- "CHEBI:32596",
- "CHEBI:43474",
- "CHEBI:63051",
- "CHEBI:43470",
- "CHEBI:9679",
- "CHEBI:35433",
- "CHEBI:4496",
- "CHEBI:45024",
- "CHEBI:18367",
- "CHEBI:26078",
- "CHEBI:39745",
- "CHEBI:24838"
- ],
- "hmdb": "HMDB02142",
- "kegg.compound": [
- "C13556",
- "C13558",
- "C00009"
- ],
- "kegg.drug": "D05467",
- "pubchem.substance": "3311",
- "reactome": [
- "REACT_947590",
- "REACT_109277",
- "REACT_113548",
- "REACT_2255331",
- "REACT_29372",
- "REACT_113550",
- "REACT_113551"
- ],
- "seed.compound": [
- "cpd09464",
- "cpd09463",
- "cpd00009"
- ],
- "unipathway.compound": "UPC00009"
- },
- "charge": -2,
- "compartment": "e",
- "formula": "HO4P",
- "id": "pi_e",
- "name": "Phosphate"
- },
- {
- "annotation": {
- "bigg.metabolite": "pyr",
- "biocyc": "PYRUVATE",
- "cas": [
- "127-17-3",
- "127-17-3"
- ],
- "chebi": [
- "CHEBI:15361",
- "CHEBI:14987",
- "CHEBI:8685",
- "CHEBI:32816",
- "CHEBI:45253",
- "CHEBI:26466",
- "CHEBI:26462"
- ],
- "hmdb": "HMDB00243",
- "kegg.compound": "C00022",
- "lipidmaps": "LMFA01060077",
- "pubchem.substance": "3324",
- "reactome": [
- "REACT_113557",
- "REACT_389680",
- "REACT_29398"
- ],
- "seed.compound": "cpd00020",
- "unipathway.compound": "UPC00022"
- },
- "charge": -1,
- "compartment": "c",
- "formula": "C3H3O3",
- "id": "pyr_c",
- "name": "Pyruvate"
- }
- ],
- "reactions": [
- {
- "annotation": {
- "bigg.reaction": "ATPM"
- },
- "gene_reaction_rule": "",
- "id": "ATPM",
- "lower_bound": 8.39,
- "metabolites": {
- "adp_c": 1.0,
- "atp_c": -1.0,
- "h2o_c": -1.0,
- "h_c": 1.0,
- "pi_c": 1.0
- },
- "name": "ATP maintenance requirement",
- "objective_coefficient": 1.0,
- "upper_bound": 1000.0
- },
- {
- "gene_reaction_rule": "b3603 or b2975",
- "id": "D_LACt2",
- "lower_bound": -1000.0,
- "metabolites": {
- "h_c": 1,
- "h_e": -1,
- "lac__D_c": 1,
- "lac__D_e": -1
- },
- "name": "",
- "upper_bound": 1000.0
- },
- {
- "annotation": {
- "bigg.reaction": "ENO"
- },
- "gene_reaction_rule": "b2779",
- "id": "ENO",
- "lower_bound": -1000.0,
- "metabolites": {
- "2pg_c": -1.0,
- "h2o_c": 1.0,
- "pep_c": 1.0
- },
- "name": "enolase",
- "upper_bound": 1000.0
- },
- {
- "annotation": {
- "SBO": "SBO:0000627",
- "bigg.reaction": "glc"
- },
- "gene_reaction_rule": "",
- "id": "EX_glc__D_e",
- "lower_bound": -10.0,
- "metabolites": {
- "glc__D_e": -1.0
- },
- "name": "D-Glucose exchange",
- "upper_bound": 1000.0
- },
- {
- "annotation": {
- "SBO": "SBO:0000627",
- "bigg.reaction": "h"
- },
- "gene_reaction_rule": "",
- "id": "EX_h_e",
- "lower_bound": -1000.0,
- "metabolites": {
- "h_e": -1.0
- },
- "name": "H+ exchange",
- "upper_bound": 1000.0
- },
- {
- "gene_reaction_rule": "",
- "id": "EX_lac__D_e",
- "lower_bound": 0.0,
- "metabolites": {
- "lac__D_e": -1.0
- },
- "name": "D-lactate exchange",
- "upper_bound": 1000.0
- },
- {
- "annotation": {
- "bigg.reaction": "FBA"
- },
- "gene_reaction_rule": "b1773 or b2097 or b2925",
- "id": "FBA",
- "lower_bound": -1000.0,
- "metabolites": {
- "dhap_c": 1.0,
- "fdp_c": -1.0,
- "g3p_c": 1.0
- },
- "name": "fructose-bisphosphate aldolase",
- "upper_bound": 1000.0
- },
- {
- "annotation": {
- "bigg.reaction": "GAPD"
- },
- "gene_reaction_rule": "b1779",
- "id": "GAPD",
- "lower_bound": -1000.0,
- "metabolites": {
- "13dpg_c": 1.0,
- "g3p_c": -1.0,
- "h_c": 1.0,
- "nad_c": -1.0,
- "nadh_c": 1.0,
- "pi_c": -1.0
- },
- "name": "glyceraldehyde-3-phosphate dehydrogenase",
- "upper_bound": 1000.0
- },
- {
- "annotation": {
- "bigg.reaction": "GLCpts"
- },
- "gene_reaction_rule": "( b2417 and b1621 and b2415 and b2416 ) or ( b2417 and b1101 and b2415 and b2416 ) or ( b1817 and b1818 and b1819 and b2415 and b2416 )",
- "id": "GLCpts",
- "lower_bound": 0.0,
- "metabolites": {
- "g6p_c": 1.0,
- "glc__D_e": -1.0,
- "pep_c": -1.0,
- "pyr_c": 1.0
- },
- "name": "D-glucose transport via PEP:Pyr PTS",
- "upper_bound": 1000.0
- },
- {
- "annotation": {
- "bigg.reaction": "H2Ot"
- },
- "gene_reaction_rule": "b0875 or s0001",
- "id": "H2Ot",
- "lower_bound": -1000.0,
- "metabolites": {
- "h2o_c": 1.0,
- "h2o_e": -1.0
- },
- "name": "R H2O transport via - diffusion",
- "upper_bound": 1000.0
- },
- {
- "gene_reaction_rule": "b2133 or b1380",
- "id": "LDH_D",
- "lower_bound": -1000.0,
- "metabolites": {
- "h_c": 1.0,
- "lac__D_c": -1.0,
- "nad_c": -1.0,
- "nadh_c": 1.0,
- "pyr_c": 1.0
- },
- "name": "D-lactate dehydrogenase",
- "upper_bound": 1000.0
- },
- {
- "annotation": {
- "bigg.reaction": "PFK"
- },
- "gene_reaction_rule": "b3916 or b1723",
- "id": "PFK",
- "lower_bound": 0.0,
- "metabolites": {
- "adp_c": 1.0,
- "atp_c": -1.0,
- "f6p_c": -1.0,
- "fdp_c": 1.0,
- "h_c": 1.0
- },
- "name": "phosphofructokinase",
- "objective_coefficient": 1.0,
- "upper_bound": 1000.0
- },
- {
- "annotation": {
- "bigg.reaction": "PGI"
- },
- "gene_reaction_rule": "b4025",
- "id": "PGI",
- "lower_bound": -1000.0,
- "metabolites": {
- "f6p_c": 1.0,
- "g6p_c": -1.0
- },
- "name": "glucose-6-phosphate isomerase",
- "upper_bound": 1000.0
- },
- {
- "annotation": {
- "bigg.reaction": "PGK"
- },
- "gene_reaction_rule": "b2926",
- "id": "PGK",
- "lower_bound": -1000.0,
- "metabolites": {
- "13dpg_c": 1.0,
- "3pg_c": -1.0,
- "adp_c": 1.0,
- "atp_c": -1.0
- },
- "name": "phosphoglycerate kinase",
- "upper_bound": 1000.0
- },
- {
- "annotation": {
- "bigg.reaction": "PGM"
- },
- "gene_reaction_rule": "b4395 or b3612 or b0755",
- "id": "PGM",
- "lower_bound": -1000.0,
- "metabolites": {
- "2pg_c": -1.0,
- "3pg_c": 1.0
- },
- "name": "phosphoglycerate mutase",
- "upper_bound": 1000.0
- },
- {
- "annotation": {
- "bigg.reaction": "PIt2r"
- },
- "gene_reaction_rule": "b2987 or b3493",
- "id": "PIt2r",
- "lower_bound": -1000.0,
- "metabolites": {
- "h_c": 1.0,
- "h_e": -1.0,
- "pi_c": 1.0,
- "pi_e": -1.0
- },
- "name": "R phosphate reversible transport via - symport",
- "upper_bound": 1000.0
- },
- {
- "annotation": {
- "bigg.reaction": "PYK"
- },
- "gene_reaction_rule": "b1854 or b1676",
- "id": "PYK",
- "lower_bound": 0.0,
- "metabolites": {
- "adp_c": -1.0,
- "atp_c": 1.0,
- "h_c": -1.0,
- "pep_c": -1.0,
- "pyr_c": 1.0
- },
- "name": "pyruvate kinase",
- "upper_bound": 1000.0
- },
- {
- "annotation": {
- "bigg.reaction": "TPI"
- },
- "gene_reaction_rule": "b3919",
- "id": "TPI",
- "lower_bound": -1000.0,
- "metabolites": {
- "dhap_c": -1.0,
- "g3p_c": 1.0
- },
- "name": "triose-phosphate isomerase",
- "upper_bound": 1000.0
- }
- ],
- "version": "1"
+ "compartments": [
+ {
+ "id": "c",
+ "name": "cytosol"
+ },
+ {
+ "id": "e",
+ "name": "extracellular"
+ }
+ ],
+ "genes": [
+ {
+ "id": "b0755",
+ "name": "gpmA"
+ },
+ {
+ "id": "b0875",
+ "name": "aqpZ"
+ },
+ {
+ "id": "b1101",
+ "name": "ptsG"
+ },
+ {
+ "id": "b1380",
+ "name": "ldhA"
+ },
+ {
+ "id": "b1621",
+ "name": "malX"
+ },
+ {
+ "annotation": {
+ "ncbigi": [
+ "GI:1208453",
+ "GI:1652654"
+ ]
+ },
+ "id": "b1676",
+ "name": "pykF"
+ },
+ {
+ "id": "b1723",
+ "name": "pfkB"
+ },
+ {
+ "id": "b1773",
+ "name": "ydjI"
+ },
+ {
+ "id": "b1779",
+ "name": "gapA"
+ },
+ {
+ "id": "b1817",
+ "name": "manX"
+ },
+ {
+ "id": "b1818",
+ "name": "manY"
+ },
+ {
+ "id": "b1819",
+ "name": "manZ"
+ },
+ {
+ "id": "b1854",
+ "name": "pykA"
+ },
+ {
+ "id": "b2097",
+ "name": "fbaB"
+ },
+ {
+ "id": "b2133",
+ "name": "dld"
+ },
+ {
+ "id": "b2415",
+ "name": "ptsH"
+ },
+ {
+ "id": "b2416",
+ "name": "ptsI"
+ },
+ {
+ "id": "b2417",
+ "name": "crr"
+ },
+ {
+ "annotation": {
+ "ncbigi": "GI:1653839"
+ },
+ "id": "b2779",
+ "name": "eno"
+ },
+ {
+ "id": "b2925",
+ "name": "fbaA"
+ },
+ {
+ "annotation": {
+ "ncbigi": "GI:1653609"
+ },
+ "id": "b2926",
+ "name": "pgk"
+ },
+ {
+ "id": "b2975",
+ "name": "glcA"
+ },
+ {
+ "id": "b2987",
+ "name": "pitB"
+ },
+ {
+ "id": "b3493",
+ "name": "pitA"
+ },
+ {
+ "id": "b3603",
+ "name": "lldP"
+ },
+ {
+ "id": "b3612",
+ "name": "gpmM"
+ },
+ {
+ "annotation": {
+ "ncbigi": [
+ "GI:1006614",
+ "GI:1651919"
+ ]
+ },
+ "id": "b3916",
+ "name": "pfkA"
+ },
+ {
+ "id": "b3919",
+ "name": "tpiA"
+ },
+ {
+ "annotation": {
+ "ncbigi": "GI:1653253"
+ },
+ "id": "b4025",
+ "name": "pgi"
+ },
+ {
+ "id": "b4395",
+ "name": "ytjC"
+ },
+ {
+ "id": "s0001",
+ "name": "G_s0001"
+ }
+ ],
+ "id": "mini_textbook",
+ "metabolites": [
+ {
+ "annotation": {
+ "bigg.metabolite": "13dpg",
+ "biocyc": "DPG",
+ "chebi": [
+ "CHEBI:16001",
+ "CHEBI:1658",
+ "CHEBI:20189",
+ "CHEBI:57604",
+ "CHEBI:11881"
+ ],
+ "hmdb": "HMDB01270",
+ "kegg.compound": "C00236",
+ "pubchem.substance": "3535",
+ "reactome": "REACT_29800",
+ "seed.compound": "cpd00203",
+ "unipathway.compound": "UPC00236"
+ },
+ "charge": -4,
+ "compartment": "c",
+ "formula": "C3H4O10P2",
+ "id": "13dpg_c",
+ "name": "3-Phospho-D-glyceroyl phosphate"
+ },
+ {
+ "annotation": {
+ "bigg.metabolite": "2pg",
+ "biocyc": "2-PG",
+ "chebi": [
+ "CHEBI:1267",
+ "CHEBI:58289",
+ "CHEBI:17835",
+ "CHEBI:21028",
+ "CHEBI:11651",
+ "CHEBI:12986",
+ "CHEBI:24344",
+ "CHEBI:39868"
+ ],
+ "hmdb": [
+ "HMDB03391",
+ "HMDB00362"
+ ],
+ "kegg.compound": "C00631",
+ "pubchem.substance": "3904",
+ "reactome": "REACT_30485",
+ "seed.compound": "cpd00482",
+ "unipathway.compound": "UPC00631"
+ },
+ "charge": -3,
+ "compartment": "c",
+ "formula": "C3H4O7P",
+ "id": "2pg_c",
+ "name": "D-Glycerate 2-phosphate"
+ },
+ {
+ "annotation": {
+ "bigg.metabolite": "3pg",
+ "biocyc": "G3P",
+ "chebi": [
+ "CHEBI:40016",
+ "CHEBI:58272",
+ "CHEBI:57998",
+ "CHEBI:11879",
+ "CHEBI:1657",
+ "CHEBI:1659",
+ "CHEBI:17050",
+ "CHEBI:21029",
+ "CHEBI:11882",
+ "CHEBI:11880",
+ "CHEBI:12987",
+ "CHEBI:17794",
+ "CHEBI:24345"
+ ],
+ "hmdb": "HMDB00807",
+ "kegg.compound": [
+ "C00197",
+ "C00597"
+ ],
+ "pubchem.substance": "3497",
+ "reactome": "REACT_29728",
+ "seed.compound": "cpd00169",
+ "unipathway.compound": [
+ "UPC00597",
+ "UPC00197"
+ ]
+ },
+ "charge": -3,
+ "compartment": "c",
+ "formula": "C3H4O7P",
+ "id": "3pg_c",
+ "name": "3-Phospho-D-glycerate"
+ },
+ {
+ "annotation": {
+ "bigg.metabolite": "adp",
+ "biocyc": [
+ "ADP",
+ "ADP-GROUP"
+ ],
+ "cas": [
+ "58-64-0",
+ "58-64-0"
+ ],
+ "chebi": [
+ "CHEBI:13222",
+ "CHEBI:16761",
+ "CHEBI:2342",
+ "CHEBI:22244",
+ "CHEBI:40553",
+ "CHEBI:456216"
+ ],
+ "hmdb": "HMDB01341",
+ "kegg.compound": "C00008",
+ "kegg.glycan": "G11113",
+ "pubchem.substance": "3310",
+ "reactome": [
+ "REACT_190072",
+ "REACT_481002",
+ "REACT_211606",
+ "REACT_429160",
+ "REACT_29370",
+ "REACT_196180",
+ "REACT_113581",
+ "REACT_113582",
+ "REACT_114564",
+ "REACT_114565",
+ "REACT_429153"
+ ],
+ "seed.compound": "cpd00008",
+ "unipathway.compound": "UPC00008"
+ },
+ "charge": -3,
+ "compartment": "c",
+ "formula": "C10H12N5O10P2",
+ "id": "adp_c",
+ "name": "ADP"
+ },
+ {
+ "annotation": {
+ "bigg.metabolite": "atp",
+ "biocyc": "ATP",
+ "cas": [
+ "56-65-5",
+ "56-65-5"
+ ],
+ "chebi": [
+ "CHEBI:40938",
+ "CHEBI:15422",
+ "CHEBI:57299",
+ "CHEBI:13236",
+ "CHEBI:10789",
+ "CHEBI:30616",
+ "CHEBI:22249",
+ "CHEBI:10841",
+ "CHEBI:2359"
+ ],
+ "hmdb": "HMDB00538",
+ "kegg.compound": "C00002",
+ "kegg.drug": "D08646",
+ "pubchem.substance": "3304",
+ "reactome": [
+ "REACT_190078",
+ "REACT_113592",
+ "REACT_113593",
+ "REACT_114570",
+ "REACT_29358",
+ "REACT_389573",
+ "REACT_139836",
+ "REACT_211579"
+ ],
+ "seed.compound": "cpd00002",
+ "unipathway.compound": "UPC00002"
+ },
+ "charge": -4,
+ "compartment": "c",
+ "formula": "C10H12N5O13P3",
+ "id": "atp_c",
+ "name": "ATP"
+ },
+ {
+ "annotation": {
+ "bigg.metabolite": "dhap",
+ "biocyc": "DIHYDROXY-ACETONE-PHOSPHATE",
+ "cas": [
+ "57-04-5",
+ "57-04-5"
+ ],
+ "chebi": [
+ "CHEBI:14341",
+ "CHEBI:57642",
+ "CHEBI:14342",
+ "CHEBI:16108",
+ "CHEBI:5454",
+ "CHEBI:24355",
+ "CHEBI:39571"
+ ],
+ "hmdb": [
+ "HMDB01473",
+ "HMDB11735"
+ ],
+ "kegg.compound": "C00111",
+ "pubchem.substance": "3411",
+ "reactome": [
+ "REACT_188451",
+ "REACT_75970",
+ "REACT_390404"
+ ],
+ "seed.compound": "cpd00095",
+ "unipathway.compound": "UPC00111"
+ },
+ "charge": -2,
+ "compartment": "c",
+ "formula": "C3H5O6P",
+ "id": "dhap_c",
+ "name": "Dihydroxyacetone phosphate"
+ },
+ {
+ "annotation": {
+ "bigg.metabolite": "f6p",
+ "biocyc": "FRUCTOSE-6P",
+ "cas": [
+ "643-13-0",
+ "643-13-0"
+ ],
+ "chebi": [
+ "CHEBI:57634",
+ "CHEBI:12352",
+ "CHEBI:45804",
+ "CHEBI:61527",
+ "CHEBI:61553",
+ "CHEBI:10375",
+ "CHEBI:16084",
+ "CHEBI:42378",
+ "CHEBI:22768"
+ ],
+ "hmdb": "HMDB03971",
+ "kegg.compound": [
+ "C05345",
+ "C00085"
+ ],
+ "pubchem.substance": "3385",
+ "seed.compound": "cpd00072",
+ "unipathway.compound": [
+ "UPC05345",
+ "UPC00085"
+ ]
+ },
+ "charge": -2,
+ "compartment": "c",
+ "formula": "C6H11O9P",
+ "id": "f6p_c",
+ "name": "D-Fructose 6-phosphate"
+ },
+ {
+ "annotation": {
+ "bigg.metabolite": "fdp",
+ "biocyc": "FRUCTOSE-16-DIPHOSPHATE",
+ "cas": [
+ "488-69-7",
+ "488-69-7"
+ ],
+ "chebi": [
+ "CHEBI:32968",
+ "CHEBI:49299",
+ "CHEBI:42553",
+ "CHEBI:32966",
+ "CHEBI:37736",
+ "CHEBI:28013",
+ "CHEBI:32967",
+ "CHEBI:41014",
+ "CHEBI:22767",
+ "CHEBI:10374",
+ "CHEBI:40595",
+ "CHEBI:40591"
+ ],
+ "kegg.compound": [
+ "C05378",
+ "C00354"
+ ],
+ "pubchem.substance": "3647",
+ "seed.compound": "cpd00290",
+ "unipathway.compound": "UPC00354"
+ },
+ "charge": -4,
+ "compartment": "c",
+ "formula": "C6H10O12P2",
+ "id": "fdp_c",
+ "name": "D-Fructose 1,6-bisphosphate"
+ },
+ {
+ "annotation": {
+ "bigg.metabolite": "g3p",
+ "cas": [
+ "142-10-9",
+ "142-10-9"
+ ],
+ "chebi": [
+ "CHEBI:17138",
+ "CHEBI:14333",
+ "CHEBI:5446",
+ "CHEBI:58027"
+ ],
+ "hmdb": "HMDB01112",
+ "kegg.compound": [
+ "C00661",
+ "C00118"
+ ],
+ "pubchem.substance": "3930",
+ "seed.compound": "cpd00102",
+ "unipathway.compound": [
+ "UPC00661",
+ "UPC00118"
+ ]
+ },
+ "charge": -2,
+ "compartment": "c",
+ "formula": "C3H5O6P",
+ "id": "g3p_c",
+ "name": "Glyceraldehyde 3-phosphate"
+ },
+ {
+ "annotation": {
+ "bigg.metabolite": "g6p",
+ "biocyc": [
+ "D-glucose-6-phosphate",
+ "GLC-6-P"
+ ],
+ "cas": [
+ "56-73-5",
+ "56-73-5"
+ ],
+ "chebi": [
+ "CHEBI:10399",
+ "CHEBI:22797",
+ "CHEBI:41041",
+ "CHEBI:17719",
+ "CHEBI:4170",
+ "CHEBI:61548",
+ "CHEBI:58247",
+ "CHEBI:12375"
+ ],
+ "hmdb": [
+ "HMDB03498",
+ "HMDB06793",
+ "HMDB01401",
+ "HMDB01549"
+ ],
+ "kegg.compound": [
+ "C00092",
+ "C01172"
+ ],
+ "pubchem.substance": "3392",
+ "reactome": "REACT_1629756",
+ "seed.compound": "cpd00079",
+ "unipathway.compound": "UPC00092"
+ },
+ "charge": -2,
+ "compartment": "c",
+ "formula": "C6H11O9P",
+ "id": "g6p_c",
+ "name": "D-Glucose 6-phosphate"
+ },
+ {
+ "annotation": {
+ "bigg.metabolite": "glc__D",
+ "cas": [
+ "50-99-7",
+ "50-99-7"
+ ],
+ "kegg.compound": "C00031",
+ "pubchem.substance": "3333"
+ },
+ "charge": 0,
+ "compartment": "e",
+ "formula": "C6H12O6",
+ "id": "glc__D_e",
+ "name": "D-Glucose"
+ },
+ {
+ "annotation": {
+ "bigg.metabolite": "h2o",
+ "biocyc": [
+ "WATER",
+ "OH",
+ "OXONIUM"
+ ],
+ "cas": [
+ "7732-18-5",
+ "7732-18-5"
+ ],
+ "chebi": [
+ "CHEBI:15377",
+ "CHEBI:13365",
+ "CHEBI:41979",
+ "CHEBI:16234",
+ "CHEBI:36385",
+ "CHEBI:42857",
+ "CHEBI:27313",
+ "CHEBI:44819",
+ "CHEBI:29373",
+ "CHEBI:10743",
+ "CHEBI:5594",
+ "CHEBI:29356",
+ "CHEBI:53442",
+ "CHEBI:29375",
+ "CHEBI:29374",
+ "CHEBI:13419",
+ "CHEBI:43228",
+ "CHEBI:44292",
+ "CHEBI:13352",
+ "CHEBI:41981",
+ "CHEBI:29412",
+ "CHEBI:42043",
+ "CHEBI:33811",
+ "CHEBI:33813",
+ "CHEBI:35511",
+ "CHEBI:5585",
+ "CHEBI:44641",
+ "CHEBI:44701"
+ ],
+ "hmdb": [
+ "HMDB01039",
+ "HMDB02111"
+ ],
+ "kegg.compound": [
+ "C01328",
+ "C00001",
+ "C18714",
+ "C18712"
+ ],
+ "kegg.drug": [
+ "D00001",
+ "D06322",
+ "D03703"
+ ],
+ "pubchem.substance": "3303",
+ "reactome": [
+ "REACT_947593",
+ "REACT_189422",
+ "REACT_141343",
+ "REACT_113518",
+ "REACT_1605715",
+ "REACT_109276",
+ "REACT_113521",
+ "REACT_113519",
+ "REACT_2022884",
+ "REACT_351603",
+ "REACT_29356"
+ ],
+ "seed.compound": [
+ "cpd15275",
+ "cpd00001"
+ ],
+ "unipathway.compound": [
+ "UPC00001",
+ "UPC01328"
+ ]
+ },
+ "charge": 0,
+ "compartment": "c",
+ "formula": "H2O",
+ "id": "h2o_c",
+ "name": "H2O"
+ },
+ {
+ "annotation": {
+ "bigg.metabolite": "h2o",
+ "biocyc": [
+ "WATER",
+ "OH",
+ "OXONIUM"
+ ],
+ "cas": [
+ "7732-18-5",
+ "7732-18-5"
+ ],
+ "chebi": [
+ "CHEBI:15377",
+ "CHEBI:13365",
+ "CHEBI:41979",
+ "CHEBI:16234",
+ "CHEBI:36385",
+ "CHEBI:42857",
+ "CHEBI:27313",
+ "CHEBI:44819",
+ "CHEBI:29373",
+ "CHEBI:10743",
+ "CHEBI:5594",
+ "CHEBI:29356",
+ "CHEBI:53442",
+ "CHEBI:29375",
+ "CHEBI:29374",
+ "CHEBI:13419",
+ "CHEBI:43228",
+ "CHEBI:44292",
+ "CHEBI:13352",
+ "CHEBI:41981",
+ "CHEBI:29412",
+ "CHEBI:42043",
+ "CHEBI:33811",
+ "CHEBI:33813",
+ "CHEBI:35511",
+ "CHEBI:5585",
+ "CHEBI:44641",
+ "CHEBI:44701"
+ ],
+ "hmdb": [
+ "HMDB01039",
+ "HMDB02111"
+ ],
+ "kegg.compound": [
+ "C01328",
+ "C00001",
+ "C18714",
+ "C18712"
+ ],
+ "kegg.drug": [
+ "D00001",
+ "D06322",
+ "D03703"
+ ],
+ "pubchem.substance": "3303",
+ "reactome": [
+ "REACT_947593",
+ "REACT_189422",
+ "REACT_141343",
+ "REACT_113518",
+ "REACT_1605715",
+ "REACT_109276",
+ "REACT_113521",
+ "REACT_113519",
+ "REACT_2022884",
+ "REACT_351603",
+ "REACT_29356"
+ ],
+ "seed.compound": [
+ "cpd15275",
+ "cpd00001"
+ ],
+ "unipathway.compound": [
+ "UPC00001",
+ "UPC01328"
+ ]
+ },
+ "charge": 0,
+ "compartment": "e",
+ "formula": "H2O",
+ "id": "h2o_e",
+ "name": "H2O"
+ },
+ {
+ "annotation": {
+ "bigg.metabolite": "h",
+ "biocyc": "PROTON",
+ "cas": [
+ "12408-02-5",
+ "12408-02-5"
+ ],
+ "chebi": [
+ "CHEBI:24636",
+ "CHEBI:15378",
+ "CHEBI:10744",
+ "CHEBI:13357",
+ "CHEBI:5584"
+ ],
+ "kegg.compound": "C00080",
+ "pubchem.substance": "3380",
+ "reactome": [
+ "REACT_194688",
+ "REACT_425978",
+ "REACT_193465",
+ "REACT_374900",
+ "REACT_74722",
+ "REACT_425999",
+ "REACT_428040",
+ "REACT_163953",
+ "REACT_372511",
+ "REACT_2000349",
+ "REACT_70106",
+ "REACT_1470067",
+ "REACT_113529",
+ "REACT_425969",
+ "REACT_428548",
+ "REACT_156540",
+ "REACT_1614597",
+ "REACT_351626",
+ "REACT_427899"
+ ],
+ "seed.compound": "cpd00067",
+ "unipathway.compound": "UPC00080"
+ },
+ "charge": 1,
+ "compartment": "c",
+ "formula": "H",
+ "id": "h_c",
+ "name": "H+"
+ },
+ {
+ "annotation": {
+ "bigg.metabolite": "h",
+ "biocyc": "PROTON",
+ "cas": [
+ "12408-02-5",
+ "12408-02-5"
+ ],
+ "chebi": [
+ "CHEBI:24636",
+ "CHEBI:15378",
+ "CHEBI:10744",
+ "CHEBI:13357",
+ "CHEBI:5584"
+ ],
+ "kegg.compound": "C00080",
+ "pubchem.substance": "3380",
+ "reactome": [
+ "REACT_194688",
+ "REACT_425978",
+ "REACT_193465",
+ "REACT_374900",
+ "REACT_74722",
+ "REACT_425999",
+ "REACT_428040",
+ "REACT_163953",
+ "REACT_372511",
+ "REACT_2000349",
+ "REACT_70106",
+ "REACT_1470067",
+ "REACT_113529",
+ "REACT_425969",
+ "REACT_428548",
+ "REACT_156540",
+ "REACT_1614597",
+ "REACT_351626",
+ "REACT_427899"
+ ],
+ "seed.compound": "cpd00067",
+ "unipathway.compound": "UPC00080"
+ },
+ "charge": 1,
+ "compartment": "e",
+ "formula": "H",
+ "id": "h_e",
+ "name": "H+"
+ },
+ {
+ "charge": -1,
+ "compartment": "c",
+ "formula": "C3H5O3",
+ "id": "lac__D_c",
+ "name": "D-Lactate"
+ },
+ {
+ "charge": -1,
+ "compartment": "e",
+ "formula": "C3H5O3",
+ "id": "lac__D_e",
+ "name": "D-Lactate"
+ },
+ {
+ "annotation": {
+ "bigg.metabolite": "nad",
+ "biocyc": "NAD",
+ "cas": [
+ "53-84-9",
+ "53-84-9"
+ ],
+ "chebi": [
+ "CHEBI:21901",
+ "CHEBI:7422",
+ "CHEBI:44214",
+ "CHEBI:15846",
+ "CHEBI:13394",
+ "CHEBI:13393",
+ "CHEBI:44215",
+ "CHEBI:13389",
+ "CHEBI:57540",
+ "CHEBI:44281"
+ ],
+ "hmdb": "HMDB00902",
+ "kegg.compound": "C00003",
+ "kegg.drug": "D00002",
+ "pubchem.substance": "3305",
+ "reactome": [
+ "REACT_192307",
+ "REACT_29360",
+ "REACT_427523",
+ "REACT_194653",
+ "REACT_113526"
+ ],
+ "seed.compound": "cpd00003",
+ "unipathway.compound": "UPC00003"
+ },
+ "charge": -1,
+ "compartment": "c",
+ "formula": "C21H26N7O14P2",
+ "id": "nad_c",
+ "name": "Nicotinamide adenine dinucleotide"
+ },
+ {
+ "annotation": {
+ "bigg.metabolite": "nadh",
+ "biocyc": "NADH",
+ "cas": [
+ "58-68-4",
+ "58-68-4"
+ ],
+ "chebi": [
+ "CHEBI:13395",
+ "CHEBI:21902",
+ "CHEBI:16908",
+ "CHEBI:7423",
+ "CHEBI:44216",
+ "CHEBI:57945",
+ "CHEBI:13396"
+ ],
+ "hmdb": "HMDB01487",
+ "kegg.compound": "C00004",
+ "pubchem.substance": "3306",
+ "reactome": [
+ "REACT_192305",
+ "REACT_73473",
+ "REACT_194697",
+ "REACT_29362"
+ ],
+ "seed.compound": "cpd00004",
+ "unipathway.compound": "UPC00004"
+ },
+ "charge": -2,
+ "compartment": "c",
+ "formula": "C21H27N7O14P2",
+ "id": "nadh_c",
+ "name": "Nicotinamide adenine dinucleotide - reduced"
+ },
+ {
+ "annotation": {
+ "bigg.metabolite": "pep",
+ "biocyc": "PHOSPHO-ENOL-PYRUVATE",
+ "cas": [
+ "138-08-9",
+ "138-08-9"
+ ],
+ "chebi": [
+ "CHEBI:44897",
+ "CHEBI:44894",
+ "CHEBI:14812",
+ "CHEBI:8147",
+ "CHEBI:26055",
+ "CHEBI:26054",
+ "CHEBI:58702",
+ "CHEBI:18021"
+ ],
+ "hmdb": "HMDB00263",
+ "kegg.compound": "C00074",
+ "pubchem.substance": "3374",
+ "reactome": [
+ "REACT_29492",
+ "REACT_372364"
+ ],
+ "seed.compound": "cpd00061",
+ "unipathway.compound": "UPC00074"
+ },
+ "charge": -3,
+ "compartment": "c",
+ "formula": "C3H2O6P",
+ "id": "pep_c",
+ "name": "Phosphoenolpyruvate"
+ },
+ {
+ "annotation": {
+ "bigg.metabolite": "pi",
+ "biocyc": [
+ "Pi",
+ "PHOSPHATE-GROUP",
+ "CPD0-1421"
+ ],
+ "cas": [
+ "14265-44-2",
+ "14265-44-2"
+ ],
+ "chebi": [
+ "CHEBI:37583",
+ "CHEBI:7793",
+ "CHEBI:37585",
+ "CHEBI:34683",
+ "CHEBI:14791",
+ "CHEBI:34855",
+ "CHEBI:29137",
+ "CHEBI:29139",
+ "CHEBI:63036",
+ "CHEBI:26020",
+ "CHEBI:39739",
+ "CHEBI:32597",
+ "CHEBI:32596",
+ "CHEBI:43474",
+ "CHEBI:63051",
+ "CHEBI:43470",
+ "CHEBI:9679",
+ "CHEBI:35433",
+ "CHEBI:4496",
+ "CHEBI:45024",
+ "CHEBI:18367",
+ "CHEBI:26078",
+ "CHEBI:39745",
+ "CHEBI:24838"
+ ],
+ "hmdb": "HMDB02142",
+ "kegg.compound": [
+ "C13556",
+ "C13558",
+ "C00009"
+ ],
+ "kegg.drug": "D05467",
+ "pubchem.substance": "3311",
+ "reactome": [
+ "REACT_947590",
+ "REACT_109277",
+ "REACT_113548",
+ "REACT_2255331",
+ "REACT_29372",
+ "REACT_113550",
+ "REACT_113551"
+ ],
+ "seed.compound": [
+ "cpd09464",
+ "cpd09463",
+ "cpd00009"
+ ],
+ "unipathway.compound": "UPC00009"
+ },
+ "charge": -2,
+ "compartment": "c",
+ "formula": "HO4P",
+ "id": "pi_c",
+ "name": "Phosphate"
+ },
+ {
+ "annotation": {
+ "bigg.metabolite": "pi",
+ "biocyc": [
+ "Pi",
+ "PHOSPHATE-GROUP",
+ "CPD0-1421"
+ ],
+ "cas": [
+ "14265-44-2",
+ "14265-44-2"
+ ],
+ "chebi": [
+ "CHEBI:37583",
+ "CHEBI:7793",
+ "CHEBI:37585",
+ "CHEBI:34683",
+ "CHEBI:14791",
+ "CHEBI:34855",
+ "CHEBI:29137",
+ "CHEBI:29139",
+ "CHEBI:63036",
+ "CHEBI:26020",
+ "CHEBI:39739",
+ "CHEBI:32597",
+ "CHEBI:32596",
+ "CHEBI:43474",
+ "CHEBI:63051",
+ "CHEBI:43470",
+ "CHEBI:9679",
+ "CHEBI:35433",
+ "CHEBI:4496",
+ "CHEBI:45024",
+ "CHEBI:18367",
+ "CHEBI:26078",
+ "CHEBI:39745",
+ "CHEBI:24838"
+ ],
+ "hmdb": "HMDB02142",
+ "kegg.compound": [
+ "C13556",
+ "C13558",
+ "C00009"
+ ],
+ "kegg.drug": "D05467",
+ "pubchem.substance": "3311",
+ "reactome": [
+ "REACT_947590",
+ "REACT_109277",
+ "REACT_113548",
+ "REACT_2255331",
+ "REACT_29372",
+ "REACT_113550",
+ "REACT_113551"
+ ],
+ "seed.compound": [
+ "cpd09464",
+ "cpd09463",
+ "cpd00009"
+ ],
+ "unipathway.compound": "UPC00009"
+ },
+ "charge": -2,
+ "compartment": "e",
+ "formula": "HO4P",
+ "id": "pi_e",
+ "name": "Phosphate"
+ },
+ {
+ "annotation": {
+ "bigg.metabolite": "pyr",
+ "biocyc": "PYRUVATE",
+ "cas": [
+ "127-17-3",
+ "127-17-3"
+ ],
+ "chebi": [
+ "CHEBI:15361",
+ "CHEBI:14987",
+ "CHEBI:8685",
+ "CHEBI:32816",
+ "CHEBI:45253",
+ "CHEBI:26466",
+ "CHEBI:26462"
+ ],
+ "hmdb": "HMDB00243",
+ "kegg.compound": "C00022",
+ "lipidmaps": "LMFA01060077",
+ "pubchem.substance": "3324",
+ "reactome": [
+ "REACT_113557",
+ "REACT_389680",
+ "REACT_29398"
+ ],
+ "seed.compound": "cpd00020",
+ "unipathway.compound": "UPC00022"
+ },
+ "charge": -1,
+ "compartment": "c",
+ "formula": "C3H3O3",
+ "id": "pyr_c",
+ "name": "Pyruvate"
+ }
+ ],
+ "reactions": [
+ {
+ "annotation": {
+ "bigg.reaction": "ATPM"
+ },
+ "gene_reaction_rule": "",
+ "id": "ATPM",
+ "lower_bound": 8.39,
+ "metabolites": {
+ "adp_c": 1.0,
+ "atp_c": -1.0,
+ "h2o_c": -1.0,
+ "h_c": 1.0,
+ "pi_c": 1.0
+ },
+ "name": "ATP maintenance requirement",
+ "objective_coefficient": 1.0,
+ "upper_bound": 1000.0
+ },
+ {
+ "gene_reaction_rule": "b3603 or b2975",
+ "id": "D_LACt2",
+ "lower_bound": -1000.0,
+ "metabolites": {
+ "h_c": 1,
+ "h_e": -1,
+ "lac__D_c": 1,
+ "lac__D_e": -1
+ },
+ "name": "",
+ "upper_bound": 1000.0
+ },
+ {
+ "annotation": {
+ "bigg.reaction": "ENO"
+ },
+ "gene_reaction_rule": "b2779",
+ "id": "ENO",
+ "lower_bound": -1000.0,
+ "metabolites": {
+ "2pg_c": -1.0,
+ "h2o_c": 1.0,
+ "pep_c": 1.0
+ },
+ "name": "enolase",
+ "upper_bound": 1000.0
+ },
+ {
+ "annotation": {
+ "SBO": "SBO:0000627",
+ "bigg.reaction": "glc"
+ },
+ "gene_reaction_rule": "",
+ "id": "EX_glc__D_e",
+ "lower_bound": -10.0,
+ "metabolites": {
+ "glc__D_e": -1.0
+ },
+ "name": "D-Glucose exchange",
+ "upper_bound": 1000.0
+ },
+ {
+ "annotation": {
+ "SBO": "SBO:0000627",
+ "bigg.reaction": "h"
+ },
+ "gene_reaction_rule": "",
+ "id": "EX_h_e",
+ "lower_bound": -1000.0,
+ "metabolites": {
+ "h_e": -1.0
+ },
+ "name": "H+ exchange",
+ "upper_bound": 1000.0
+ },
+ {
+ "gene_reaction_rule": "",
+ "id": "EX_lac__D_e",
+ "lower_bound": 0.0,
+ "metabolites": {
+ "lac__D_e": -1.0
+ },
+ "name": "D-lactate exchange",
+ "upper_bound": 1000.0
+ },
+ {
+ "annotation": {
+ "bigg.reaction": "FBA"
+ },
+ "gene_reaction_rule": "b1773 or b2097 or b2925",
+ "id": "FBA",
+ "lower_bound": -1000.0,
+ "metabolites": {
+ "dhap_c": 1.0,
+ "fdp_c": -1.0,
+ "g3p_c": 1.0
+ },
+ "name": "fructose-bisphosphate aldolase",
+ "upper_bound": 1000.0
+ },
+ {
+ "annotation": {
+ "bigg.reaction": "GAPD"
+ },
+ "gene_reaction_rule": "b1779",
+ "id": "GAPD",
+ "lower_bound": -1000.0,
+ "metabolites": {
+ "13dpg_c": 1.0,
+ "g3p_c": -1.0,
+ "h_c": 1.0,
+ "nad_c": -1.0,
+ "nadh_c": 1.0,
+ "pi_c": -1.0
+ },
+ "name": "glyceraldehyde-3-phosphate dehydrogenase",
+ "upper_bound": 1000.0
+ },
+ {
+ "annotation": {
+ "bigg.reaction": "GLCpts"
+ },
+ "gene_reaction_rule": "( b2417 and b1621 and b2415 and b2416 ) or ( b2417 and b1101 and b2415 and b2416 ) or ( b1817 and b1818 and b1819 and b2415 and b2416 )",
+ "id": "GLCpts",
+ "lower_bound": 0.0,
+ "metabolites": {
+ "g6p_c": 1.0,
+ "glc__D_e": -1.0,
+ "pep_c": -1.0,
+ "pyr_c": 1.0
+ },
+ "name": "D-glucose transport via PEP:Pyr PTS",
+ "upper_bound": 1000.0
+ },
+ {
+ "annotation": {
+ "bigg.reaction": "H2Ot"
+ },
+ "gene_reaction_rule": "b0875 or s0001",
+ "id": "H2Ot",
+ "lower_bound": -1000.0,
+ "metabolites": {
+ "h2o_c": 1.0,
+ "h2o_e": -1.0
+ },
+ "name": "R H2O transport via - diffusion",
+ "upper_bound": 1000.0
+ },
+ {
+ "gene_reaction_rule": "b2133 or b1380",
+ "id": "LDH_D",
+ "lower_bound": -1000.0,
+ "metabolites": {
+ "h_c": 1.0,
+ "lac__D_c": -1.0,
+ "nad_c": -1.0,
+ "nadh_c": 1.0,
+ "pyr_c": 1.0
+ },
+ "name": "D-lactate dehydrogenase",
+ "upper_bound": 1000.0
+ },
+ {
+ "annotation": {
+ "bigg.reaction": "PFK"
+ },
+ "gene_reaction_rule": "b3916 or b1723",
+ "id": "PFK",
+ "lower_bound": 0.0,
+ "metabolites": {
+ "adp_c": 1.0,
+ "atp_c": -1.0,
+ "f6p_c": -1.0,
+ "fdp_c": 1.0,
+ "h_c": 1.0
+ },
+ "name": "phosphofructokinase",
+ "objective_coefficient": 1.0,
+ "upper_bound": 1000.0
+ },
+ {
+ "annotation": {
+ "bigg.reaction": "PGI"
+ },
+ "gene_reaction_rule": "b4025",
+ "id": "PGI",
+ "lower_bound": -1000.0,
+ "metabolites": {
+ "f6p_c": 1.0,
+ "g6p_c": -1.0
+ },
+ "name": "glucose-6-phosphate isomerase",
+ "upper_bound": 1000.0
+ },
+ {
+ "annotation": {
+ "bigg.reaction": "PGK"
+ },
+ "gene_reaction_rule": "b2926",
+ "id": "PGK",
+ "lower_bound": -1000.0,
+ "metabolites": {
+ "13dpg_c": 1.0,
+ "3pg_c": -1.0,
+ "adp_c": 1.0,
+ "atp_c": -1.0
+ },
+ "name": "phosphoglycerate kinase",
+ "upper_bound": 1000.0
+ },
+ {
+ "annotation": {
+ "bigg.reaction": "PGM"
+ },
+ "gene_reaction_rule": "b4395 or b3612 or b0755",
+ "id": "PGM",
+ "lower_bound": -1000.0,
+ "metabolites": {
+ "2pg_c": -1.0,
+ "3pg_c": 1.0
+ },
+ "name": "phosphoglycerate mutase",
+ "upper_bound": 1000.0
+ },
+ {
+ "annotation": {
+ "bigg.reaction": "PIt2r"
+ },
+ "gene_reaction_rule": "b2987 or b3493",
+ "id": "PIt2r",
+ "lower_bound": -1000.0,
+ "metabolites": {
+ "h_c": 1.0,
+ "h_e": -1.0,
+ "pi_c": 1.0,
+ "pi_e": -1.0
+ },
+ "name": "R phosphate reversible transport via - symport",
+ "upper_bound": 1000.0
+ },
+ {
+ "annotation": {
+ "bigg.reaction": "PYK"
+ },
+ "gene_reaction_rule": "b1854 or b1676",
+ "id": "PYK",
+ "lower_bound": 0.0,
+ "metabolites": {
+ "adp_c": -1.0,
+ "atp_c": 1.0,
+ "h_c": -1.0,
+ "pep_c": -1.0,
+ "pyr_c": 1.0
+ },
+ "name": "pyruvate kinase",
+ "upper_bound": 1000.0
+ },
+ {
+ "annotation": {
+ "bigg.reaction": "TPI"
+ },
+ "gene_reaction_rule": "b3919",
+ "id": "TPI",
+ "lower_bound": -1000.0,
+ "metabolites": {
+ "dhap_c": -1.0,
+ "g3p_c": 1.0
+ },
+ "name": "triose-phosphate isomerase",
+ "upper_bound": 1000.0
+ }
+ ],
+ "version": "1"
}
\ No newline at end of file
diff --git a/cobra/test/data/mini.mat b/cobra/test/data/mini.mat
index 6726342d3..627b56033 100644
Binary files a/cobra/test/data/mini.mat and b/cobra/test/data/mini.mat differ
diff --git a/cobra/test/data/mini.pickle b/cobra/test/data/mini.pickle
index af9ef9ccc..7feb9419d 100644
Binary files a/cobra/test/data/mini.pickle and b/cobra/test/data/mini.pickle differ
diff --git a/cobra/test/data/mini.yml b/cobra/test/data/mini.yml
index 9c1455a68..a8c5ba6bf 100644
--- a/cobra/test/data/mini.yml
+++ b/cobra/test/data/mini.yml
@@ -6,38 +6,31 @@
- compartment: c
- charge: -4
- formula: C3H4O10P2
- - annotation:
- pubchem.substance: '3535'
- biocyc: DPG
- kegg.compound: C00236
- seed.compound: cpd00203
- reactome: REACT_29800
- bigg.metabolite: 13dpg
- hmdb: HMDB01270
- chebi:
+ - annotation: !!omap
+ - bigg.metabolite: 13dpg
+ - biocyc: DPG
+ - chebi:
- CHEBI:16001
- CHEBI:1658
- CHEBI:20189
- CHEBI:57604
- CHEBI:11881
- unipathway.compound: UPC00236
+ - hmdb: HMDB01270
+ - kegg.compound: C00236
+ - pubchem.substance: '3535'
+ - reactome: REACT_29800
+ - seed.compound: cpd00203
+ - unipathway.compound: UPC00236
- !!omap
- id: 2pg_c
- name: D-Glycerate 2-phosphate
- compartment: c
- charge: -3
- formula: C3H4O7P
- - annotation:
- pubchem.substance: '3904'
- biocyc: 2-PG
- kegg.compound: C00631
- seed.compound: cpd00482
- reactome: REACT_30485
- bigg.metabolite: 2pg
- hmdb:
- - HMDB03391
- - HMDB00362
- chebi:
+ - annotation: !!omap
+ - bigg.metabolite: 2pg
+ - biocyc: 2-PG
+ - chebi:
- CHEBI:1267
- CHEBI:58289
- CHEBI:17835
@@ -46,24 +39,24 @@
- CHEBI:12986
- CHEBI:24344
- CHEBI:39868
- unipathway.compound: UPC00631
+ - hmdb:
+ - HMDB03391
+ - HMDB00362
+ - kegg.compound: C00631
+ - pubchem.substance: '3904'
+ - reactome: REACT_30485
+ - seed.compound: cpd00482
+ - unipathway.compound: UPC00631
- !!omap
- id: 3pg_c
- name: 3-Phospho-D-glycerate
- compartment: c
- charge: -3
- formula: C3H4O7P
- - annotation:
- pubchem.substance: '3497'
- biocyc: G3P
- kegg.compound:
- - C00197
- - C00597
- seed.compound: cpd00169
- reactome: REACT_29728
- bigg.metabolite: 3pg
- hmdb: HMDB00807
- chebi:
+ - annotation: !!omap
+ - bigg.metabolite: 3pg
+ - biocyc: G3P
+ - chebi:
- CHEBI:40016
- CHEBI:58272
- CHEBI:57998
@@ -77,7 +70,14 @@
- CHEBI:12987
- CHEBI:17794
- CHEBI:24345
- unipathway.compound:
+ - hmdb: HMDB00807
+ - kegg.compound:
+ - C00197
+ - C00597
+ - pubchem.substance: '3497'
+ - reactome: REACT_29728
+ - seed.compound: cpd00169
+ - unipathway.compound:
- UPC00597
- UPC00197
- !!omap
@@ -86,21 +86,26 @@
- compartment: c
- charge: -3
- formula: C10H12N5O10P2
- - annotation:
- kegg.glycan: G11113
- biocyc:
+ - annotation: !!omap
+ - bigg.metabolite: adp
+ - biocyc:
- ADP
- ADP-GROUP
- chebi:
+ - cas:
+ - 58-64-0
+ - 58-64-0
+ - chebi:
- CHEBI:13222
- CHEBI:16761
- CHEBI:2342
- CHEBI:22244
- CHEBI:40553
- CHEBI:456216
- unipathway.compound: UPC00008
- seed.compound: cpd00008
- reactome:
+ - hmdb: HMDB01341
+ - kegg.compound: C00008
+ - kegg.glycan: G11113
+ - pubchem.substance: '3310'
+ - reactome:
- REACT_190072
- REACT_481002
- REACT_211606
@@ -112,23 +117,21 @@
- REACT_114564
- REACT_114565
- REACT_429153
- bigg.metabolite: adp
- hmdb: HMDB01341
- pubchem.substance: '3310'
- cas:
- - 58-64-0
- - 58-64-0
- kegg.compound: C00008
+ - seed.compound: cpd00008
+ - unipathway.compound: UPC00008
- !!omap
- id: atp_c
- name: ATP
- compartment: c
- charge: -4
- formula: C10H12N5O13P3
- - annotation:
- pubchem.substance: '3304'
- biocyc: ATP
- chebi:
+ - annotation: !!omap
+ - bigg.metabolite: atp
+ - biocyc: ATP
+ - cas:
+ - 56-65-5
+ - 56-65-5
+ - chebi:
- CHEBI:40938
- CHEBI:15422
- CHEBI:57299
@@ -138,9 +141,11 @@
- CHEBI:22249
- CHEBI:10841
- CHEBI:2359
- unipathway.compound: UPC00002
- seed.compound: cpd00002
- reactome:
+ - hmdb: HMDB00538
+ - kegg.compound: C00002
+ - kegg.drug: D08646
+ - pubchem.substance: '3304'
+ - reactome:
- REACT_190078
- REACT_113592
- REACT_113593
@@ -149,23 +154,21 @@
- REACT_389573
- REACT_139836
- REACT_211579
- bigg.metabolite: atp
- hmdb: HMDB00538
- kegg.drug: D08646
- cas:
- - 56-65-5
- - 56-65-5
- kegg.compound: C00002
+ - seed.compound: cpd00002
+ - unipathway.compound: UPC00002
- !!omap
- id: dhap_c
- name: Dihydroxyacetone phosphate
- compartment: c
- charge: -2
- formula: C3H5O6P
- - annotation:
- pubchem.substance: '3411'
- biocyc: DIHYDROXY-ACETONE-PHOSPHATE
- chebi:
+ - annotation: !!omap
+ - bigg.metabolite: dhap
+ - biocyc: DIHYDROXY-ACETONE-PHOSPHATE
+ - cas:
+ - 57-04-5
+ - 57-04-5
+ - chebi:
- CHEBI:14341
- CHEBI:57642
- CHEBI:14342
@@ -173,30 +176,30 @@
- CHEBI:5454
- CHEBI:24355
- CHEBI:39571
- unipathway.compound: UPC00111
- seed.compound: cpd00095
- reactome:
+ - hmdb:
+ - HMDB01473
+ - HMDB11735
+ - kegg.compound: C00111
+ - pubchem.substance: '3411'
+ - reactome:
- REACT_188451
- REACT_75970
- REACT_390404
- bigg.metabolite: dhap
- hmdb:
- - HMDB01473
- - HMDB11735
- cas:
- - 57-04-5
- - 57-04-5
- kegg.compound: C00111
+ - seed.compound: cpd00095
+ - unipathway.compound: UPC00111
- !!omap
- id: f6p_c
- name: D-Fructose 6-phosphate
- compartment: c
- charge: -2
- formula: C6H11O9P
- - annotation:
- pubchem.substance: '3385'
- biocyc: FRUCTOSE-6P
- chebi:
+ - annotation: !!omap
+ - bigg.metabolite: f6p
+ - biocyc: FRUCTOSE-6P
+ - cas:
+ - 643-13-0
+ - 643-13-0
+ - chebi:
- CHEBI:57634
- CHEBI:12352
- CHEBI:45804
@@ -206,28 +209,28 @@
- CHEBI:16084
- CHEBI:42378
- CHEBI:22768
- unipathway.compound:
- - UPC05345
- - UPC00085
- seed.compound: cpd00072
- bigg.metabolite: f6p
- hmdb: HMDB03971
- cas:
- - 643-13-0
- - 643-13-0
- kegg.compound:
+ - hmdb: HMDB03971
+ - kegg.compound:
- C05345
- C00085
+ - pubchem.substance: '3385'
+ - seed.compound: cpd00072
+ - unipathway.compound:
+ - UPC05345
+ - UPC00085
- !!omap
- id: fdp_c
- name: D-Fructose 1,6-bisphosphate
- compartment: c
- charge: -4
- formula: C6H10O12P2
- - annotation:
- pubchem.substance: '3647'
- biocyc: FRUCTOSE-16-DIPHOSPHATE
- chebi:
+ - annotation: !!omap
+ - bigg.metabolite: fdp
+ - biocyc: FRUCTOSE-16-DIPHOSPHATE
+ - cas:
+ - 488-69-7
+ - 488-69-7
+ - chebi:
- CHEBI:32968
- CHEBI:49299
- CHEBI:42553
@@ -240,52 +243,52 @@
- CHEBI:10374
- CHEBI:40595
- CHEBI:40591
- unipathway.compound: UPC00354
- seed.compound: cpd00290
- bigg.metabolite: fdp
- cas:
- - 488-69-7
- - 488-69-7
- kegg.compound:
+ - kegg.compound:
- C05378
- C00354
+ - pubchem.substance: '3647'
+ - seed.compound: cpd00290
+ - unipathway.compound: UPC00354
- !!omap
- id: g3p_c
- name: Glyceraldehyde 3-phosphate
- compartment: c
- charge: -2
- formula: C3H5O6P
- - annotation:
- pubchem.substance: '3930'
- chebi:
+ - annotation: !!omap
+ - bigg.metabolite: g3p
+ - cas:
+ - 142-10-9
+ - 142-10-9
+ - chebi:
- CHEBI:17138
- CHEBI:14333
- CHEBI:5446
- CHEBI:58027
- unipathway.compound:
- - UPC00661
- - UPC00118
- seed.compound: cpd00102
- bigg.metabolite: g3p
- hmdb: HMDB01112
- cas:
- - 142-10-9
- - 142-10-9
- kegg.compound:
+ - hmdb: HMDB01112
+ - kegg.compound:
- C00661
- C00118
+ - pubchem.substance: '3930'
+ - seed.compound: cpd00102
+ - unipathway.compound:
+ - UPC00661
+ - UPC00118
- !!omap
- id: g6p_c
- name: D-Glucose 6-phosphate
- compartment: c
- charge: -2
- formula: C6H11O9P
- - annotation:
- pubchem.substance: '3392'
- biocyc:
+ - annotation: !!omap
+ - bigg.metabolite: g6p
+ - biocyc:
- D-glucose-6-phosphate
- GLC-6-P
- chebi:
+ - cas:
+ - 56-73-5
+ - 56-73-5
+ - chebi:
- CHEBI:10399
- CHEBI:22797
- CHEBI:41041
@@ -294,47 +297,47 @@
- CHEBI:61548
- CHEBI:58247
- CHEBI:12375
- unipathway.compound: UPC00092
- seed.compound: cpd00079
- reactome: REACT_1629756
- bigg.metabolite: g6p
- hmdb:
+ - hmdb:
- HMDB03498
- HMDB06793
- HMDB01401
- HMDB01549
- cas:
- - 56-73-5
- - 56-73-5
- kegg.compound:
+ - kegg.compound:
- C00092
- C01172
+ - pubchem.substance: '3392'
+ - reactome: REACT_1629756
+ - seed.compound: cpd00079
+ - unipathway.compound: UPC00092
- !!omap
- id: glc__D_e
- name: D-Glucose
- compartment: e
- charge: 0
- formula: C6H12O6
- - annotation:
- bigg.metabolite: glc__D
- pubchem.substance: '3333'
- cas:
+ - annotation: !!omap
+ - bigg.metabolite: glc__D
+ - cas:
- 50-99-7
- 50-99-7
- kegg.compound: C00031
+ - kegg.compound: C00031
+ - pubchem.substance: '3333'
- !!omap
- id: h2o_c
- name: H2O
- compartment: c
- charge: 0
- formula: H2O
- - annotation:
- pubchem.substance: '3303'
- biocyc:
+ - annotation: !!omap
+ - bigg.metabolite: h2o
+ - biocyc:
- WATER
- OH
- OXONIUM
- chebi:
+ - cas:
+ - 7732-18-5
+ - 7732-18-5
+ - chebi:
- CHEBI:15377
- CHEBI:13365
- CHEBI:41979
@@ -363,13 +366,20 @@
- CHEBI:5585
- CHEBI:44641
- CHEBI:44701
- unipathway.compound:
- - UPC00001
- - UPC01328
- seed.compound:
- - cpd15275
- - cpd00001
- reactome:
+ - hmdb:
+ - HMDB01039
+ - HMDB02111
+ - kegg.compound:
+ - C01328
+ - C00001
+ - C18714
+ - C18712
+ - kegg.drug:
+ - D00001
+ - D06322
+ - D03703
+ - pubchem.substance: '3303'
+ - reactome:
- REACT_947593
- REACT_189422
- REACT_141343
@@ -381,35 +391,28 @@
- REACT_2022884
- REACT_351603
- REACT_29356
- bigg.metabolite: h2o
- hmdb:
- - HMDB01039
- - HMDB02111
- kegg.drug:
- - D00001
- - D06322
- - D03703
- cas:
- - 7732-18-5
- - 7732-18-5
- kegg.compound:
- - C01328
- - C00001
- - C18714
- - C18712
+ - seed.compound:
+ - cpd15275
+ - cpd00001
+ - unipathway.compound:
+ - UPC00001
+ - UPC01328
- !!omap
- id: h2o_e
- name: H2O
- compartment: e
- charge: 0
- formula: H2O
- - annotation:
- pubchem.substance: '3303'
- biocyc:
+ - annotation: !!omap
+ - bigg.metabolite: h2o
+ - biocyc:
- WATER
- OH
- OXONIUM
- chebi:
+ - cas:
+ - 7732-18-5
+ - 7732-18-5
+ - chebi:
- CHEBI:15377
- CHEBI:13365
- CHEBI:41979
@@ -438,13 +441,20 @@
- CHEBI:5585
- CHEBI:44641
- CHEBI:44701
- unipathway.compound:
- - UPC00001
- - UPC01328
- seed.compound:
- - cpd15275
- - cpd00001
- reactome:
+ - hmdb:
+ - HMDB01039
+ - HMDB02111
+ - kegg.compound:
+ - C01328
+ - C00001
+ - C18714
+ - C18712
+ - kegg.drug:
+ - D00001
+ - D06322
+ - D03703
+ - pubchem.substance: '3303'
+ - reactome:
- REACT_947593
- REACT_189422
- REACT_141343
@@ -456,40 +466,33 @@
- REACT_2022884
- REACT_351603
- REACT_29356
- bigg.metabolite: h2o
- hmdb:
- - HMDB01039
- - HMDB02111
- kegg.drug:
- - D00001
- - D06322
- - D03703
- cas:
- - 7732-18-5
- - 7732-18-5
- kegg.compound:
- - C01328
- - C00001
- - C18714
- - C18712
+ - seed.compound:
+ - cpd15275
+ - cpd00001
+ - unipathway.compound:
+ - UPC00001
+ - UPC01328
- !!omap
- id: h_c
- name: H+
- compartment: c
- charge: 1
- formula: H
- - annotation:
- pubchem.substance: '3380'
- biocyc: PROTON
- chebi:
+ - annotation: !!omap
+ - bigg.metabolite: h
+ - biocyc: PROTON
+ - cas:
+ - 12408-02-5
+ - 12408-02-5
+ - chebi:
- CHEBI:24636
- CHEBI:15378
- CHEBI:10744
- CHEBI:13357
- CHEBI:5584
- unipathway.compound: UPC00080
- seed.compound: cpd00067
- reactome:
+ - kegg.compound: C00080
+ - pubchem.substance: '3380'
+ - reactome:
- REACT_194688
- REACT_425978
- REACT_193465
@@ -509,29 +512,29 @@
- REACT_1614597
- REACT_351626
- REACT_427899
- bigg.metabolite: h
- cas:
- - 12408-02-5
- - 12408-02-5
- kegg.compound: C00080
+ - seed.compound: cpd00067
+ - unipathway.compound: UPC00080
- !!omap
- id: h_e
- name: H+
- compartment: e
- charge: 1
- formula: H
- - annotation:
- pubchem.substance: '3380'
- biocyc: PROTON
- chebi:
+ - annotation: !!omap
+ - bigg.metabolite: h
+ - biocyc: PROTON
+ - cas:
+ - 12408-02-5
+ - 12408-02-5
+ - chebi:
- CHEBI:24636
- CHEBI:15378
- CHEBI:10744
- CHEBI:13357
- CHEBI:5584
- unipathway.compound: UPC00080
- seed.compound: cpd00067
- reactome:
+ - kegg.compound: C00080
+ - pubchem.substance: '3380'
+ - reactome:
- REACT_194688
- REACT_425978
- REACT_193465
@@ -551,11 +554,8 @@
- REACT_1614597
- REACT_351626
- REACT_427899
- bigg.metabolite: h
- cas:
- - 12408-02-5
- - 12408-02-5
- kegg.compound: C00080
+ - seed.compound: cpd00067
+ - unipathway.compound: UPC00080
- !!omap
- id: lac__D_c
- name: D-Lactate
@@ -574,10 +574,13 @@
- compartment: c
- charge: -1
- formula: C21H26N7O14P2
- - annotation:
- pubchem.substance: '3305'
- biocyc: NAD
- chebi:
+ - annotation: !!omap
+ - bigg.metabolite: nad
+ - biocyc: NAD
+ - cas:
+ - 53-84-9
+ - 53-84-9
+ - chebi:
- CHEBI:21901
- CHEBI:7422
- CHEBI:44214
@@ -588,31 +591,31 @@
- CHEBI:13389
- CHEBI:57540
- CHEBI:44281
- unipathway.compound: UPC00003
- seed.compound: cpd00003
- reactome:
+ - hmdb: HMDB00902
+ - kegg.compound: C00003
+ - kegg.drug: D00002
+ - pubchem.substance: '3305'
+ - reactome:
- REACT_192307
- REACT_29360
- REACT_427523
- REACT_194653
- REACT_113526
- bigg.metabolite: nad
- hmdb: HMDB00902
- kegg.drug: D00002
- cas:
- - 53-84-9
- - 53-84-9
- kegg.compound: C00003
+ - seed.compound: cpd00003
+ - unipathway.compound: UPC00003
- !!omap
- id: nadh_c
- name: Nicotinamide adenine dinucleotide - reduced
- compartment: c
- charge: -2
- formula: C21H27N7O14P2
- - annotation:
- pubchem.substance: '3306'
- biocyc: NADH
- chebi:
+ - annotation: !!omap
+ - bigg.metabolite: nadh
+ - biocyc: NADH
+ - cas:
+ - 58-68-4
+ - 58-68-4
+ - chebi:
- CHEBI:13395
- CHEBI:21902
- CHEBI:16908
@@ -620,29 +623,29 @@
- CHEBI:44216
- CHEBI:57945
- CHEBI:13396
- unipathway.compound: UPC00004
- seed.compound: cpd00004
- reactome:
+ - hmdb: HMDB01487
+ - kegg.compound: C00004
+ - pubchem.substance: '3306'
+ - reactome:
- REACT_192305
- REACT_73473
- REACT_194697
- REACT_29362
- bigg.metabolite: nadh
- hmdb: HMDB01487
- cas:
- - 58-68-4
- - 58-68-4
- kegg.compound: C00004
+ - seed.compound: cpd00004
+ - unipathway.compound: UPC00004
- !!omap
- id: pep_c
- name: Phosphoenolpyruvate
- compartment: c
- charge: -3
- formula: C3H2O6P
- - annotation:
- pubchem.substance: '3374'
- biocyc: PHOSPHO-ENOL-PYRUVATE
- chebi:
+ - annotation: !!omap
+ - bigg.metabolite: pep
+ - biocyc: PHOSPHO-ENOL-PYRUVATE
+ - cas:
+ - 138-08-9
+ - 138-08-9
+ - chebi:
- CHEBI:44897
- CHEBI:44894
- CHEBI:14812
@@ -651,30 +654,30 @@
- CHEBI:26054
- CHEBI:58702
- CHEBI:18021
- unipathway.compound: UPC00074
- seed.compound: cpd00061
- reactome:
+ - hmdb: HMDB00263
+ - kegg.compound: C00074
+ - pubchem.substance: '3374'
+ - reactome:
- REACT_29492
- REACT_372364
- bigg.metabolite: pep
- hmdb: HMDB00263
- cas:
- - 138-08-9
- - 138-08-9
- kegg.compound: C00074
+ - seed.compound: cpd00061
+ - unipathway.compound: UPC00074
- !!omap
- id: pi_c
- name: Phosphate
- compartment: c
- charge: -2
- formula: HO4P
- - annotation:
- pubchem.substance: '3311'
- biocyc:
+ - annotation: !!omap
+ - bigg.metabolite: pi
+ - biocyc:
- Pi
- PHOSPHATE-GROUP
- CPD0-1421
- chebi:
+ - cas:
+ - 14265-44-2
+ - 14265-44-2
+ - chebi:
- CHEBI:37583
- CHEBI:7793
- CHEBI:37585
@@ -699,12 +702,14 @@
- CHEBI:26078
- CHEBI:39745
- CHEBI:24838
- unipathway.compound: UPC00009
- seed.compound:
- - cpd09464
- - cpd09463
- - cpd00009
- reactome:
+ - hmdb: HMDB02142
+ - kegg.compound:
+ - C13556
+ - C13558
+ - C00009
+ - kegg.drug: D05467
+ - pubchem.substance: '3311'
+ - reactome:
- REACT_947590
- REACT_109277
- REACT_113548
@@ -712,29 +717,27 @@
- REACT_29372
- REACT_113550
- REACT_113551
- bigg.metabolite: pi
- hmdb: HMDB02142
- kegg.drug: D05467
- cas:
- - 14265-44-2
- - 14265-44-2
- kegg.compound:
- - C13556
- - C13558
- - C00009
+ - seed.compound:
+ - cpd09464
+ - cpd09463
+ - cpd00009
+ - unipathway.compound: UPC00009
- !!omap
- id: pi_e
- name: Phosphate
- compartment: e
- charge: -2
- formula: HO4P
- - annotation:
- pubchem.substance: '3311'
- biocyc:
+ - annotation: !!omap
+ - bigg.metabolite: pi
+ - biocyc:
- Pi
- PHOSPHATE-GROUP
- CPD0-1421
- chebi:
+ - cas:
+ - 14265-44-2
+ - 14265-44-2
+ - chebi:
- CHEBI:37583
- CHEBI:7793
- CHEBI:37585
@@ -759,12 +762,14 @@
- CHEBI:26078
- CHEBI:39745
- CHEBI:24838
- unipathway.compound: UPC00009
- seed.compound:
- - cpd09464
- - cpd09463
- - cpd00009
- reactome:
+ - hmdb: HMDB02142
+ - kegg.compound:
+ - C13556
+ - C13558
+ - C00009
+ - kegg.drug: D05467
+ - pubchem.substance: '3311'
+ - reactome:
- REACT_947590
- REACT_109277
- REACT_113548
@@ -772,26 +777,24 @@
- REACT_29372
- REACT_113550
- REACT_113551
- bigg.metabolite: pi
- hmdb: HMDB02142
- kegg.drug: D05467
- cas:
- - 14265-44-2
- - 14265-44-2
- kegg.compound:
- - C13556
- - C13558
- - C00009
+ - seed.compound:
+ - cpd09464
+ - cpd09463
+ - cpd00009
+ - unipathway.compound: UPC00009
- !!omap
- id: pyr_c
- name: Pyruvate
- compartment: c
- charge: -1
- formula: C3H3O3
- - annotation:
- pubchem.substance: '3324'
- biocyc: PYRUVATE
- chebi:
+ - annotation: !!omap
+ - bigg.metabolite: pyr
+ - biocyc: PYRUVATE
+ - cas:
+ - 127-17-3
+ - 127-17-3
+ - chebi:
- CHEBI:15361
- CHEBI:14987
- CHEBI:8685
@@ -799,19 +802,16 @@
- CHEBI:45253
- CHEBI:26466
- CHEBI:26462
- lipidmaps: LMFA01060077
- seed.compound: cpd00020
- kegg.compound: C00022
- reactome:
+ - hmdb: HMDB00243
+ - kegg.compound: C00022
+ - lipidmaps: LMFA01060077
+ - pubchem.substance: '3324'
+ - reactome:
- REACT_113557
- REACT_389680
- REACT_29398
- bigg.metabolite: pyr
- hmdb: HMDB00243
- cas:
- - 127-17-3
- - 127-17-3
- unipathway.compound: UPC00022
+ - seed.compound: cpd00020
+ - unipathway.compound: UPC00022
- reactions:
- !!omap
- id: ATPM
@@ -826,8 +826,8 @@
- upper_bound: 1000.0
- gene_reaction_rule: ''
- objective_coefficient: 1.0
- - annotation:
- bigg.reaction: ATPM
+ - annotation: !!omap
+ - bigg.reaction: ATPM
- !!omap
- id: D_LACt2
- name: ''
@@ -849,8 +849,8 @@
- lower_bound: -1000.0
- upper_bound: 1000.0
- gene_reaction_rule: b2779
- - annotation:
- bigg.reaction: ENO
+ - annotation: !!omap
+ - bigg.reaction: ENO
- !!omap
- id: EX_glc__D_e
- name: D-Glucose exchange
@@ -859,9 +859,9 @@
- lower_bound: -10.0
- upper_bound: 1000.0
- gene_reaction_rule: ''
- - annotation:
- bigg.reaction: glc
- SBO: SBO:0000627
+ - annotation: !!omap
+ - SBO: SBO:0000627
+ - bigg.reaction: glc
- !!omap
- id: EX_h_e
- name: H+ exchange
@@ -870,9 +870,9 @@
- lower_bound: -1000.0
- upper_bound: 1000.0
- gene_reaction_rule: ''
- - annotation:
- bigg.reaction: h
- SBO: SBO:0000627
+ - annotation: !!omap
+ - SBO: SBO:0000627
+ - bigg.reaction: h
- !!omap
- id: EX_lac__D_e
- name: D-lactate exchange
@@ -891,8 +891,8 @@
- lower_bound: -1000.0
- upper_bound: 1000.0
- gene_reaction_rule: b1773 or b2097 or b2925
- - annotation:
- bigg.reaction: FBA
+ - annotation: !!omap
+ - bigg.reaction: FBA
- !!omap
- id: GAPD
- name: glyceraldehyde-3-phosphate dehydrogenase
@@ -906,8 +906,8 @@
- lower_bound: -1000.0
- upper_bound: 1000.0
- gene_reaction_rule: b1779
- - annotation:
- bigg.reaction: GAPD
+ - annotation: !!omap
+ - bigg.reaction: GAPD
- !!omap
- id: GLCpts
- name: D-glucose transport via PEP:Pyr PTS
@@ -920,8 +920,8 @@
- upper_bound: 1000.0
- gene_reaction_rule: ( b2417 and b1621 and b2415 and b2416 ) or ( b2417 and b1101
and b2415 and b2416 ) or ( b1817 and b1818 and b1819 and b2415 and b2416 )
- - annotation:
- bigg.reaction: GLCpts
+ - annotation: !!omap
+ - bigg.reaction: GLCpts
- !!omap
- id: H2Ot
- name: R H2O transport via - diffusion
@@ -931,8 +931,8 @@
- lower_bound: -1000.0
- upper_bound: 1000.0
- gene_reaction_rule: b0875 or s0001
- - annotation:
- bigg.reaction: H2Ot
+ - annotation: !!omap
+ - bigg.reaction: H2Ot
- !!omap
- id: LDH_D
- name: D-lactate dehydrogenase
@@ -958,8 +958,8 @@
- upper_bound: 1000.0
- gene_reaction_rule: b3916 or b1723
- objective_coefficient: 1.0
- - annotation:
- bigg.reaction: PFK
+ - annotation: !!omap
+ - bigg.reaction: PFK
- !!omap
- id: PGI
- name: glucose-6-phosphate isomerase
@@ -969,8 +969,8 @@
- lower_bound: -1000.0
- upper_bound: 1000.0
- gene_reaction_rule: b4025
- - annotation:
- bigg.reaction: PGI
+ - annotation: !!omap
+ - bigg.reaction: PGI
- !!omap
- id: PGK
- name: phosphoglycerate kinase
@@ -982,8 +982,8 @@
- lower_bound: -1000.0
- upper_bound: 1000.0
- gene_reaction_rule: b2926
- - annotation:
- bigg.reaction: PGK
+ - annotation: !!omap
+ - bigg.reaction: PGK
- !!omap
- id: PGM
- name: phosphoglycerate mutase
@@ -993,8 +993,8 @@
- lower_bound: -1000.0
- upper_bound: 1000.0
- gene_reaction_rule: b4395 or b3612 or b0755
- - annotation:
- bigg.reaction: PGM
+ - annotation: !!omap
+ - bigg.reaction: PGM
- !!omap
- id: PIt2r
- name: R phosphate reversible transport via - symport
@@ -1006,8 +1006,8 @@
- lower_bound: -1000.0
- upper_bound: 1000.0
- gene_reaction_rule: b2987 or b3493
- - annotation:
- bigg.reaction: PIt2r
+ - annotation: !!omap
+ - bigg.reaction: PIt2r
- !!omap
- id: PYK
- name: pyruvate kinase
@@ -1020,8 +1020,8 @@
- lower_bound: 0.0
- upper_bound: 1000.0
- gene_reaction_rule: b1854 or b1676
- - annotation:
- bigg.reaction: PYK
+ - annotation: !!omap
+ - bigg.reaction: PYK
- !!omap
- id: TPI
- name: triose-phosphate isomerase
@@ -1031,8 +1031,8 @@
- lower_bound: -1000.0
- upper_bound: 1000.0
- gene_reaction_rule: b3919
- - annotation:
- bigg.reaction: TPI
+ - annotation: !!omap
+ - bigg.reaction: TPI
- genes:
- !!omap
- id: b0755
@@ -1052,8 +1052,8 @@
- !!omap
- id: b1676
- name: pykF
- - annotation:
- ncbigi:
+ - annotation: !!omap
+ - ncbigi:
- GI:1208453
- GI:1652654
- !!omap
@@ -1095,16 +1095,16 @@
- !!omap
- id: b2779
- name: eno
- - annotation:
- ncbigi: GI:1653839
+ - annotation: !!omap
+ - ncbigi: GI:1653839
- !!omap
- id: b2925
- name: fbaA
- !!omap
- id: b2926
- name: pgk
- - annotation:
- ncbigi: GI:1653609
+ - annotation: !!omap
+ - ncbigi: GI:1653609
- !!omap
- id: b2975
- name: glcA
@@ -1123,8 +1123,8 @@
- !!omap
- id: b3916
- name: pfkA
- - annotation:
- ncbigi:
+ - annotation: !!omap
+ - ncbigi:
- GI:1006614
- GI:1651919
- !!omap
@@ -1133,16 +1133,20 @@
- !!omap
- id: b4025
- name: pgi
- - annotation:
- ncbigi: GI:1653253
+ - annotation: !!omap
+ - ncbigi: GI:1653253
- !!omap
- id: b4395
- name: ytjC
- !!omap
- id: s0001
- name: G_s0001
+- compartments:
+ - !!omap
+ - id: c
+ - name: cytosol
+ - !!omap
+ - id: e
+ - name: extracellular
- id: mini_textbook
-- compartments: !!omap
- - c: cytosol
- - e: extracellular
- version: '1.2'
diff --git a/cobra/test/data/mini_cobra.xml b/cobra/test/data/mini_cobra.xml
index 48b02294b..edfccd336 100644
--- a/cobra/test/data/mini_cobra.xml
+++ b/cobra/test/data/mini_cobra.xml
@@ -201,22 +201,22 @@
-
+
+
-
+
-
@@ -240,9 +240,9 @@
FLUX_VALUE
+
-
@@ -265,9 +265,9 @@
FLUX_VALUE
+
-
@@ -284,9 +284,9 @@
FLUX_VALUE
+
-
@@ -303,9 +303,9 @@
FLUX_VALUE
+
-
@@ -322,9 +322,9 @@
FLUX_VALUE
+
-
@@ -347,9 +347,9 @@
FLUX_VALUE
+
-
@@ -366,18 +366,18 @@
-
-
+
+
+
-
@@ -401,9 +401,9 @@
FLUX_VALUE
+
-
@@ -425,9 +425,9 @@
FLUX_VALUE
+
-
@@ -452,9 +452,9 @@
FLUX_VALUE
+
-
@@ -466,22 +466,22 @@