biggr.models
============

.. py:module:: biggr.models

.. autoapi-nested-parse::

   Module to mimic the cobradb models



Attributes
----------

.. autoapisummary::

   biggr.models.OBJECT_CACHE
   biggr.models.LAZY_LOADING
   biggr.models.T
   biggr.models.ForeignKey
   biggr.models.UniqueConstraint
   biggr.models.Enum
   biggr.models.mapped_column
   biggr.models.relationship
   biggr.models.String
   biggr.models.DateTime
   biggr.models.HASH_STR_MAX_LEN
   biggr.models.custom_enums
   biggr.models.COMPOUND_TYPE_TO_SBO


Classes
-------

.. autoapisummary::

   biggr.models.Mapped
   biggr.models.PropertyNotLoaded
   biggr.models.ORMDummy
   biggr.models.DeclarativeMeta
   biggr.models.DeclarativeBase
   biggr.models.Base
   biggr.models.BiGGBase
   biggr.models.InChI
   biggr.models.TaxonomicRank
   biggr.models.Taxon
   biggr.models.ModelCollection
   biggr.models.Genome
   biggr.models.Chromosome
   biggr.models.GenomeRegion
   biggr.models.ReferenceCompound
   biggr.models.UniversalComponent
   biggr.models.Component
   biggr.models.ComponentReferenceMapping
   biggr.models.UniversalComponentReferenceMapping
   biggr.models.DataSource
   biggr.models.Annotation
   biggr.models.AnnotationProperty
   biggr.models.AnnotationLink
   biggr.models.ComponentAnnotationMapping
   biggr.models.ReactionAnnotationMapping
   biggr.models.ReferenceCompoundAnnotationMapping
   biggr.models.ReferenceReactionAnnotationMapping
   biggr.models.Synonym
   biggr.models.Publication
   biggr.models.PublicationModel
   biggr.models.OldIDSynonym
   biggr.models.GenomeRegionMap
   biggr.models.DeprecatedID
   biggr.models.Model
   biggr.models.ModelGene
   biggr.models.ModelReaction
   biggr.models.GeneReactionMatrix
   biggr.models.UniversalCompartmentalizedComponent
   biggr.models.CompartmentalizedComponent
   biggr.models.ModelCompartmentalizedComponent
   biggr.models.Compartment
   biggr.models.EscherMap
   biggr.models.EscherMapMatrix
   biggr.models.ModelCount
   biggr.models.Gene
   biggr.models.ReferenceReactivePart
   biggr.models.ReferenceReactivePartMatrix
   biggr.models.ReferenceReaction
   biggr.models.ReferenceReactionParticipant
   biggr.models.UniversalReaction
   biggr.models.Reaction
   biggr.models.UniversalReactionMatrix
   biggr.models.ReactionMatrix
   biggr.models.ComponentIDMapping
   biggr.models.MemoteTest
   biggr.models.MemoteResult
   biggr.models.EscherModule
   biggr.models.ModelReactionEscherMapping


Functions
---------

.. autoapisummary::

   biggr.models.dummy_col_f
   biggr.models.dummy_f
   biggr.models.hybrid_property


Module Contents
---------------

.. py:data:: OBJECT_CACHE

.. py:data:: LAZY_LOADING
   :value: True


.. py:data:: T

.. py:class:: Mapped

   Bases: :py:obj:`Generic`\ [\ :py:obj:`T`\ ]


   Makes it easier to reuse cobradb/sqlalchemy code.


.. py:class:: PropertyNotLoaded

.. py:class:: ORMDummy(*args, **kwargs)

   .. py:attribute:: args
      :value: ()



   .. py:attribute:: kwargs


.. py:data:: ForeignKey

.. py:data:: UniqueConstraint

.. py:data:: Enum

.. py:function:: dummy_col_f(*args, obj_type: Type[T] = str, **kwargs) -> Mapped[T]

.. py:function:: dummy_f(*args, **kwargs)

.. py:function:: hybrid_property(f)

.. py:data:: mapped_column

.. py:data:: relationship

.. py:data:: String

.. py:data:: DateTime

.. py:data:: HASH_STR_MAX_LEN
   :value: 5000


.. py:data:: custom_enums

.. py:data:: COMPOUND_TYPE_TO_SBO

.. py:class:: DeclarativeMeta

   Bases: :py:obj:`type`


.. py:class:: DeclarativeBase(**kwargs)

.. py:class:: Base(**kwargs)

   Bases: :py:obj:`DeclarativeBase`


   .. py:method:: from_dict(d)
      :classmethod:



.. py:class:: BiGGBase

   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: bigg_id
      :type:  Mapped[str]


.. py:class:: InChI(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: formula
      :type:  Mapped[str]


   .. py:attribute:: c
      :type:  Mapped[Optional[str]]


   .. py:attribute:: h
      :type:  Mapped[Optional[str]]


   .. py:attribute:: q
      :type:  Mapped[Optional[str]]


   .. py:attribute:: p
      :type:  Mapped[Optional[str]]


   .. py:attribute:: b
      :type:  Mapped[Optional[str]]


   .. py:attribute:: t
      :type:  Mapped[Optional[str]]


   .. py:attribute:: m
      :type:  Mapped[Optional[str]]


   .. py:attribute:: s
      :type:  Mapped[Optional[str]]


   .. py:attribute:: key_major
      :type:  Mapped[str]


   .. py:attribute:: key_minor
      :type:  Mapped[str]


   .. py:attribute:: key_proton
      :type:  Mapped[str]


   .. py:attribute:: reference_compounds
      :type:  Mapped[List[ReferenceCompound]]


   .. py:attribute:: reference_reactive_parts
      :type:  Mapped[List[ReferenceReactivePart]]


   .. py:method:: key()


   .. py:method:: n_protons()


   .. py:method:: charge()


.. py:class:: TaxonomicRank(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: name
      :type:  Mapped[str]


   .. py:attribute:: taxons
      :type:  Mapped[List[Taxon]]


.. py:class:: Taxon(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: parent_id
      :type:  Mapped[Optional[int]]


   .. py:attribute:: parent
      :type:  Mapped[Optional[Taxon]]


   .. py:attribute:: children
      :type:  Mapped[List[Taxon]]


   .. py:attribute:: name
      :type:  Mapped[Optional[str]]


   .. py:attribute:: rank_id
      :type:  Mapped[int]


   .. py:attribute:: rank
      :type:  Mapped[TaxonomicRank]


   .. py:attribute:: genomes
      :type:  Mapped[List[Genome]]


   .. py:attribute:: models
      :type:  Mapped[List[Model]]


   .. py:attribute:: collections
      :type:  Mapped[List[ModelCollection]]


.. py:class:: ModelCollection(**kwargs)

   Bases: :py:obj:`Base`, :py:obj:`BiGGBase`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: bigg_id
      :type:  Mapped[str]


   .. py:attribute:: oneliner
      :type:  Mapped[Optional[str]]


   .. py:attribute:: description
      :type:  Mapped[Optional[str]]


   .. py:attribute:: publication_id
      :type:  Mapped[Optional[int]]


   .. py:attribute:: publication
      :type:  Mapped[Optional[Publication]]


   .. py:attribute:: taxon_id
      :type:  Mapped[Optional[int]]


   .. py:attribute:: taxon
      :type:  Mapped[Optional[Taxon]]


   .. py:attribute:: models
      :type:  Mapped[List[Model]]


   .. py:attribute:: collection_namespace_components
      :type:  Mapped[List[Component]]


   .. py:attribute:: collection_namespace_universal_components
      :type:  Mapped[List[UniversalComponent]]


   .. py:attribute:: collection_namespace_universal_reactions
      :type:  Mapped[List[UniversalReaction]]


   .. py:attribute:: collection_namespace_reactions
      :type:  Mapped[List[Reaction]]


.. py:class:: Genome(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: accession_type
      :type:  Mapped[str]


   .. py:attribute:: accession_value
      :type:  Mapped[str]


   .. py:attribute:: organism
      :type:  Mapped[Optional[str]]


   .. py:attribute:: taxon_id
      :type:  Mapped[Optional[int]]


   .. py:attribute:: taxon
      :type:  Mapped[Optional[Taxon]]


   .. py:attribute:: strain
      :type:  Mapped[Optional[str]]


   .. py:attribute:: ncbi_assembly_id
      :type:  Mapped[Optional[str]]


   .. py:attribute:: chromosomes
      :type:  Mapped[List[Chromosome]]


   .. py:attribute:: models
      :type:  Mapped[List[Model]]


.. py:class:: Chromosome(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: ncbi_accession
      :type:  Mapped[str]


   .. py:attribute:: genome_id
      :type:  Mapped[int]


   .. py:attribute:: genome
      :type:  Mapped[Genome]


   .. py:attribute:: genome_regions
      :type:  Mapped[List[GenomeRegion]]


.. py:class:: GenomeRegion(**kwargs)

   Bases: :py:obj:`Base`, :py:obj:`BiGGBase`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: bigg_id
      :type:  Mapped[str]


   .. py:attribute:: chromosome_id
      :type:  Mapped[Optional[int]]


   .. py:attribute:: chromosome
      :type:  Mapped[Optional[Chromosome]]


   .. py:attribute:: leftpos
      :type:  Mapped[Optional[int]]


   .. py:attribute:: rightpos
      :type:  Mapped[Optional[int]]


   .. py:attribute:: strand
      :type:  Mapped[Optional[str]]


   .. py:attribute:: type
      :type:  Mapped[str]


   .. py:attribute:: dna_sequence
      :type:  Mapped[Optional[str]]


   .. py:attribute:: protein_sequence
      :type:  Mapped[Optional[str]]


.. py:class:: ReferenceCompound(**kwargs)

   Bases: :py:obj:`Base`, :py:obj:`BiGGBase`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: bigg_id
      :type:  Mapped[str]


   .. py:attribute:: name
      :type:  Mapped[str]


   .. py:attribute:: html_name
      :type:  Mapped[Optional[str]]


   .. py:attribute:: compound_type


   .. py:attribute:: charge
      :type:  Mapped[Optional[str]]


   .. py:attribute:: formula
      :type:  Mapped[Optional[str]]


   .. py:attribute:: inchi_id
      :type:  Mapped[Optional[int]]


   .. py:attribute:: inchi
      :type:  Mapped[Optional[InChI]]


   .. py:attribute:: reactive_part_matrix
      :type:  Mapped[List[ReferenceReactivePartMatrix]]


   .. py:attribute:: reaction_participants
      :type:  Mapped[List[ReferenceReactionParticipant]]


   .. py:attribute:: reference_mappings
      :type:  Mapped[List[ComponentReferenceMapping]]


   .. py:attribute:: annotation_mappings
      :type:  Mapped[List[ReferenceCompoundAnnotationMapping]]


   .. py:method:: get_sbo()


.. py:class:: UniversalComponent(**kwargs)

   Bases: :py:obj:`Base`, :py:obj:`BiGGBase`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: bigg_id
      :type:  Mapped[str]


   .. py:attribute:: default_component_id
      :type:  Mapped[Optional[int]]


   .. py:attribute:: default_component
      :type:  Mapped[Optional[Component]]


   .. py:attribute:: allow_flexible_variants
      :type:  Mapped[bool]


   .. py:attribute:: name
      :type:  Mapped[Optional[str]]


   .. py:attribute:: components
      :type:  Mapped[List[Component]]


   .. py:attribute:: reference_mapping
      :type:  Mapped[UniversalComponentReferenceMapping]


   .. py:attribute:: collection_id
      :type:  Mapped[Optional[int]]


   .. py:attribute:: collection
      :type:  Mapped[Optional[ModelCollection]]


   .. py:attribute:: universal_compartmentalized_components
      :type:  Mapped[List[UniversalCompartmentalizedComponent]]


   .. py:attribute:: old_bigg_ids
      :type:  Mapped[List[ComponentIDMapping]]


   .. py:attribute:: reference_mappings
      :type:  Mapped[List[ComponentReferenceMapping]]


.. py:class:: Component(**kwargs)

   Bases: :py:obj:`Base`, :py:obj:`BiGGBase`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: bigg_id
      :type:  Mapped[str]


   .. py:attribute:: universal_component_id
      :type:  Mapped[int]


   .. py:attribute:: universal_component
      :type:  Mapped[UniversalComponent]


   .. py:attribute:: name
      :type:  Mapped[Optional[str]]


   .. py:attribute:: formula
      :type:  Mapped[Optional[str]]


   .. py:attribute:: charge
      :type:  Mapped[int]


   .. py:attribute:: variant
      :type:  Mapped[int]


   .. py:attribute:: collection_id
      :type:  Mapped[Optional[int]]


   .. py:attribute:: collection
      :type:  Mapped[Optional[ModelCollection]]


   .. py:attribute:: compartmentalized_components
      :type:  Mapped[List[CompartmentalizedComponent]]


   .. py:attribute:: reference_mappings
      :type:  Mapped[List[ComponentReferenceMapping]]


   .. py:attribute:: annotation_mappings
      :type:  Mapped[List[ComponentAnnotationMapping]]


   .. py:method:: charge_to_string(coefficient)
      :staticmethod:



.. py:class:: ComponentReferenceMapping(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: component_id
      :type:  Mapped[int]


   .. py:attribute:: component
      :type:  Mapped[Component]


   .. py:attribute:: universal_component_id
      :type:  Mapped[int]


   .. py:attribute:: universal_component
      :type:  Mapped[UniversalComponent]


   .. py:attribute:: reference_compound_id
      :type:  Mapped[int]


   .. py:attribute:: reference_compound
      :type:  Mapped[ReferenceCompound]


   .. py:attribute:: reference_n
      :type:  Mapped[Optional[int]]


   .. py:attribute:: reference_formula_delta
      :type:  Mapped[Optional[str]]


   .. py:attribute:: universal_component_reference_mapping
      :type:  Mapped[Optional[UniversalComponentReferenceMapping]]


.. py:class:: UniversalComponentReferenceMapping(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: universal_component
      :type:  Mapped[UniversalComponent]


   .. py:attribute:: mapping_id
      :type:  Mapped[int]


   .. py:attribute:: mapping
      :type:  Mapped[ComponentReferenceMapping]


.. py:class:: DataSource(**kwargs)

   Bases: :py:obj:`Base`, :py:obj:`BiGGBase`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: bigg_id
      :type:  Mapped[str]


   .. py:attribute:: name
      :type:  Mapped[Optional[str]]


   .. py:attribute:: url_prefix
      :type:  Mapped[Optional[str]]


   .. py:attribute:: synonyms
      :type:  Mapped[List[Synonym]]


   .. py:attribute:: annotations
      :type:  Mapped[List[Annotation]]


   .. py:attribute:: annotation_links
      :type:  Mapped[List[AnnotationLink]]


.. py:class:: Annotation(**kwargs)

   Bases: :py:obj:`Base`, :py:obj:`BiGGBase`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: bigg_id
      :type:  Mapped[str]


   .. py:attribute:: type


   .. py:attribute:: default_data_source_id
      :type:  Mapped[int]


   .. py:attribute:: default_data_source
      :type:  Mapped[DataSource]


   .. py:attribute:: is_obsolete
      :type:  Mapped[bool]


   .. py:attribute:: properties
      :type:  Mapped[List[AnnotationProperty]]


   .. py:attribute:: links
      :type:  Mapped[List[AnnotationLink]]


   .. py:attribute:: component_mappings
      :type:  Mapped[List[ComponentAnnotationMapping]]


   .. py:attribute:: reaction_mappings
      :type:  Mapped[List[ReactionAnnotationMapping]]


   .. py:attribute:: reference_compound_mappings
      :type:  Mapped[List[ReferenceCompoundAnnotationMapping]]


   .. py:attribute:: reference_reaction_mappings
      :type:  Mapped[List[ReferenceReactionAnnotationMapping]]


.. py:class:: AnnotationProperty(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: key
      :type:  Mapped[str]


   .. py:attribute:: value_str
      :type:  Mapped[Optional[str]]


   .. py:attribute:: value_int
      :type:  Mapped[Optional[int]]


   .. py:attribute:: value_float
      :type:  Mapped[Optional[float]]


   .. py:attribute:: type


   .. py:attribute:: annotation_id
      :type:  Mapped[int]


   .. py:attribute:: annotation
      :type:  Mapped[Annotation]


   .. py:method:: value()


.. py:class:: AnnotationLink(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: identifier
      :type:  Mapped[str]


   .. py:attribute:: data_source_id
      :type:  Mapped[int]


   .. py:attribute:: data_source
      :type:  Mapped[DataSource]


   .. py:attribute:: annotation_id
      :type:  Mapped[int]


   .. py:attribute:: annotation
      :type:  Mapped[Annotation]


.. py:class:: ComponentAnnotationMapping(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: component_id
      :type:  Mapped[int]


   .. py:attribute:: component
      :type:  Mapped[Component]


   .. py:attribute:: annotation_id
      :type:  Mapped[int]


   .. py:attribute:: annotation
      :type:  Mapped[Annotation]


   .. py:attribute:: reference_match
      :type:  Mapped[bool]


   .. py:attribute:: bigg_id_match
      :type:  Mapped[Optional[bool]]


   .. py:attribute:: inchi_match
      :type:  Mapped[Optional[bool]]


.. py:class:: ReactionAnnotationMapping(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: reaction_id
      :type:  Mapped[int]


   .. py:attribute:: reaction
      :type:  Mapped[Reaction]


   .. py:attribute:: annotation_id
      :type:  Mapped[int]


   .. py:attribute:: annotation
      :type:  Mapped[Annotation]


   .. py:attribute:: bigg_id_match
      :type:  Mapped[Optional[bool]]


   .. py:attribute:: pattern_match
      :type:  Mapped[Optional[bool]]


.. py:class:: ReferenceCompoundAnnotationMapping(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: reference_compound_id
      :type:  Mapped[int]


   .. py:attribute:: reference_compound
      :type:  Mapped[ReferenceCompound]


   .. py:attribute:: annotation_id
      :type:  Mapped[int]


   .. py:attribute:: annotation
      :type:  Mapped[Annotation]


.. py:class:: ReferenceReactionAnnotationMapping(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: reference_reaction_id
      :type:  Mapped[int]


   .. py:attribute:: reference_reaction
      :type:  Mapped[ReferenceReaction]


   .. py:attribute:: annotation_id
      :type:  Mapped[int]


   .. py:attribute:: annotation
      :type:  Mapped[Annotation]


.. py:class:: Synonym(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: ome_id
      :type:  Mapped[int]


   .. py:attribute:: synonym
      :type:  Mapped[str]


   .. py:attribute:: type


   .. py:attribute:: data_source_id
      :type:  Mapped[int]


   .. py:attribute:: data_source
      :type:  Mapped[DataSource]


.. py:class:: Publication(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: reference_type


   .. py:attribute:: reference_id
      :type:  Mapped[str]


   .. py:attribute:: publication_models
      :type:  Mapped[List[PublicationModel]]


   .. py:attribute:: collections
      :type:  Mapped[List[ModelCollection]]


.. py:class:: PublicationModel(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: model_id
      :type:  Mapped[int]


   .. py:attribute:: model
      :type:  Mapped[Model]


   .. py:attribute:: publication_id
      :type:  Mapped[int]


   .. py:attribute:: publication
      :type:  Mapped[Publication]


.. py:class:: OldIDSynonym(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: type


   .. py:attribute:: synonym_id
      :type:  Mapped[int]


   .. py:attribute:: ome_id
      :type:  Mapped[int]


.. py:class:: GenomeRegionMap(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: genome_region_id_1
      :type:  Mapped[int]


   .. py:attribute:: genome_region_1
      :type:  Mapped[GenomeRegion]


   .. py:attribute:: genome_region_id_2
      :type:  Mapped[int]


   .. py:attribute:: genome_region_2
      :type:  Mapped[GenomeRegion]


   .. py:attribute:: distance
      :type:  Mapped[int]


.. py:class:: DeprecatedID(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: type


   .. py:attribute:: deprecated_id
      :type:  Mapped[str]


   .. py:attribute:: ome_id
      :type:  Mapped[int]


.. py:class:: Model(**kwargs)

   Bases: :py:obj:`Base`, :py:obj:`BiGGBase`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: bigg_id
      :type:  Mapped[str]


   .. py:attribute:: collection_id
      :type:  Mapped[int]


   .. py:attribute:: collection
      :type:  Mapped[ModelCollection]


   .. py:attribute:: base_filename
      :type:  Mapped[Optional[str]]


   .. py:attribute:: genome_id
      :type:  Mapped[int]


   .. py:attribute:: genome
      :type:  Mapped[Genome]


   .. py:attribute:: organism
      :type:  Mapped[Optional[str]]


   .. py:attribute:: taxon_id
      :type:  Mapped[Optional[int]]


   .. py:attribute:: taxon
      :type:  Mapped[Optional[Taxon]]


   .. py:attribute:: published_filename
      :type:  Mapped[Optional[str]]


   .. py:attribute:: date_modified
      :type:  Mapped[datetime.datetime]


   .. py:attribute:: model_genes
      :type:  Mapped[List[ModelGene]]


   .. py:attribute:: model_reactions
      :type:  Mapped[List[ModelReaction]]


   .. py:attribute:: model_compartmentalized_components
      :type:  Mapped[List[ModelCompartmentalizedComponent]]


   .. py:attribute:: model_count
      :type:  Mapped[Optional[ModelCount]]


   .. py:attribute:: publication_models
      :type:  Mapped[List[PublicationModel]]


   .. py:attribute:: escher_maps
      :type:  Mapped[List[EscherMap]]


   .. py:attribute:: memote_results
      :type:  Mapped[List[MemoteResult]]


.. py:class:: ModelGene(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: model_id
      :type:  Mapped[int]


   .. py:attribute:: model
      :type:  Mapped[Model]


   .. py:attribute:: gene_id
      :type:  Mapped[int]


   .. py:attribute:: gene
      :type:  Mapped[Gene]


   .. py:attribute:: reaction_matrix
      :type:  Mapped[List[GeneReactionMatrix]]


   .. py:attribute:: memote_results
      :type:  Mapped[List[MemoteResult]]


.. py:class:: ModelReaction(**kwargs)

   Bases: :py:obj:`Base`, :py:obj:`BiGGBase`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: bigg_id
      :type:  Mapped[str]


   .. py:attribute:: id_in_original_model
      :type:  Mapped[str]


   .. py:attribute:: reaction_id
      :type:  Mapped[int]


   .. py:attribute:: reaction
      :type:  Mapped[Reaction]


   .. py:attribute:: reversed
      :type:  Mapped[bool]


   .. py:attribute:: model_id
      :type:  Mapped[int]


   .. py:attribute:: model
      :type:  Mapped[Model]


   .. py:attribute:: copy_number
      :type:  Mapped[int]


   .. py:attribute:: objective_coefficient
      :type:  Mapped[float]


   .. py:attribute:: lower_bound
      :type:  Mapped[float]


   .. py:attribute:: upper_bound
      :type:  Mapped[float]


   .. py:attribute:: gene_reaction_rule
      :type:  Mapped[str]


   .. py:attribute:: original_gene_reaction_rule
      :type:  Mapped[Optional[str]]


   .. py:attribute:: subsystem
      :type:  Mapped[Optional[str]]


   .. py:attribute:: reaction_matrix
      :type:  Mapped[List[GeneReactionMatrix]]


   .. py:attribute:: memote_results
      :type:  Mapped[List[MemoteResult]]


   .. py:attribute:: escher_mappings
      :type:  Mapped[List[ModelReactionEscherMapping]]


   .. py:method:: create_id(model_id, universal_reaction_id, copy_number)
      :staticmethod:



   .. py:method:: interpret_id(bigg_id)
      :staticmethod:



.. py:class:: GeneReactionMatrix(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: model_gene_id
      :type:  Mapped[int]


   .. py:attribute:: model_gene
      :type:  Mapped[ModelGene]


   .. py:attribute:: model_reaction_id
      :type:  Mapped[int]


   .. py:attribute:: model_reaction
      :type:  Mapped[ModelReaction]


.. py:class:: UniversalCompartmentalizedComponent(**kwargs)

   Bases: :py:obj:`Base`, :py:obj:`BiGGBase`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: bigg_id
      :type:  Mapped[str]


   .. py:attribute:: universal_component_id
      :type:  Mapped[int]


   .. py:attribute:: universal_component
      :type:  Mapped[UniversalComponent]


   .. py:attribute:: compartment_id
      :type:  Mapped[int]


   .. py:attribute:: compartment
      :type:  Mapped[Compartment]


   .. py:attribute:: compartmentalized_components
      :type:  Mapped[List[CompartmentalizedComponent]]


   .. py:attribute:: matrix
      :type:  Mapped[List[UniversalReactionMatrix]]


.. py:class:: CompartmentalizedComponent(**kwargs)

   Bases: :py:obj:`Base`, :py:obj:`BiGGBase`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: bigg_id
      :type:  Mapped[str]


   .. py:attribute:: component_id
      :type:  Mapped[int]


   .. py:attribute:: component
      :type:  Mapped[Component]


   .. py:attribute:: compartment_id
      :type:  Mapped[int]


   .. py:attribute:: compartment
      :type:  Mapped[Compartment]


   .. py:attribute:: universal_compartmentalized_component_id
      :type:  Mapped[int]


   .. py:attribute:: universal_compartmentalized_component
      :type:  Mapped[UniversalCompartmentalizedComponent]


   .. py:attribute:: model_compartmentalized_components
      :type:  Mapped[List[ModelCompartmentalizedComponent]]


   .. py:attribute:: matrix
      :type:  Mapped[List[ReactionMatrix]]


.. py:class:: ModelCompartmentalizedComponent(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: bigg_id
      :type:  Mapped[str]


   .. py:attribute:: id_in_original_model
      :type:  Mapped[str]


   .. py:attribute:: model_id
      :type:  Mapped[int]


   .. py:attribute:: model
      :type:  Mapped[Model]


   .. py:attribute:: compartmentalized_component_id
      :type:  Mapped[int]


   .. py:attribute:: compartmentalized_component
      :type:  Mapped[CompartmentalizedComponent]


   .. py:attribute:: memote_results
      :type:  Mapped[List[MemoteResult]]


.. py:class:: Compartment(**kwargs)

   Bases: :py:obj:`Base`, :py:obj:`BiGGBase`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: bigg_id
      :type:  Mapped[str]


   .. py:attribute:: name
      :type:  Mapped[str]


   .. py:attribute:: universal_compartmentalized_components
      :type:  Mapped[List[UniversalCompartmentalizedComponent]]


   .. py:attribute:: compartmentalized_components
      :type:  Mapped[List[CompartmentalizedComponent]]


.. py:class:: EscherMap(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: map_name
      :type:  Mapped[str]


   .. py:attribute:: map_data
      :type:  Mapped[str]


   .. py:attribute:: model_id
      :type:  Mapped[int]


   .. py:attribute:: model
      :type:  Mapped[Model]


   .. py:attribute:: priority
      :type:  Mapped[int]


   .. py:attribute:: matrix
      :type:  Mapped[List[EscherMapMatrix]]


.. py:class:: EscherMapMatrix(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: ome_id
      :type:  Mapped[int]


   .. py:attribute:: type


   .. py:attribute:: escher_map_id
      :type:  Mapped[int]


   .. py:attribute:: escher_map
      :type:  Mapped[EscherMap]


   .. py:attribute:: escher_map_element_id
      :type:  Mapped[str]


.. py:class:: ModelCount(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: model_id
      :type:  Mapped[int]


   .. py:attribute:: model
      :type:  Mapped[Model]


   .. py:attribute:: reaction_count
      :type:  Mapped[int]


   .. py:attribute:: gene_count
      :type:  Mapped[int]


   .. py:attribute:: metabolite_count
      :type:  Mapped[int]


.. py:class:: Gene(**kwargs)

   Bases: :py:obj:`GenomeRegion`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: name
      :type:  Mapped[Optional[str]]


   .. py:attribute:: locus_tag
      :type:  Mapped[Optional[str]]


   .. py:attribute:: mapped_to_genbank
      :type:  Mapped[bool]


   .. py:attribute:: alternative_transcript_id
      :type:  Mapped[Optional[int]]


   .. py:attribute:: alternative_transcript_of
      :type:  Mapped[Optional[Gene]]


   .. py:attribute:: model_genes
      :type:  Mapped[List[ModelGene]]


.. py:class:: ReferenceReactivePart(**kwargs)

   Bases: :py:obj:`Base`, :py:obj:`BiGGBase`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: bigg_id
      :type:  Mapped[str]


   .. py:attribute:: name
      :type:  Mapped[str]


   .. py:attribute:: html_name
      :type:  Mapped[Optional[str]]


   .. py:attribute:: formula
      :type:  Mapped[Optional[str]]


   .. py:attribute:: charge
      :type:  Mapped[Optional[str]]


   .. py:attribute:: inchi_id
      :type:  Mapped[Optional[int]]


   .. py:attribute:: inchi
      :type:  Mapped[Optional[InChI]]


   .. py:attribute:: matrix
      :type:  Mapped[List[ReferenceReactivePartMatrix]]


.. py:class:: ReferenceReactivePartMatrix(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: compound_id
      :type:  Mapped[int]


   .. py:attribute:: compound
      :type:  Mapped[ReferenceCompound]


   .. py:attribute:: reactive_part_id
      :type:  Mapped[int]


   .. py:attribute:: reactive_part
      :type:  Mapped[ReferenceReactivePart]


.. py:class:: ReferenceReaction(**kwargs)

   Bases: :py:obj:`Base`, :py:obj:`BiGGBase`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: bigg_id
      :type:  Mapped[str]


   .. py:attribute:: name
      :type:  Mapped[Optional[str]]


   .. py:attribute:: equation
      :type:  Mapped[Optional[str]]


   .. py:attribute:: hash
      :type:  Mapped[str]


   .. py:attribute:: reaction_participants
      :type:  Mapped[List[ReferenceReactionParticipant]]


   .. py:attribute:: universal_reactions
      :type:  Mapped[List[UniversalReaction]]


   .. py:attribute:: annotation_mappings
      :type:  Mapped[List[ReferenceReactionAnnotationMapping]]


   .. py:method:: generate_hash(participants, pattern=False)
      :staticmethod:



   .. py:method:: update_hash()


.. py:class:: ReferenceReactionParticipant(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: reaction_id
      :type:  Mapped[int]


   .. py:attribute:: reaction
      :type:  Mapped[ReferenceReaction]


   .. py:attribute:: compound_id
      :type:  Mapped[int]


   .. py:attribute:: compound
      :type:  Mapped[ReferenceCompound]


   .. py:attribute:: side


   .. py:attribute:: coefficient
      :type:  Mapped[str]


   .. py:attribute:: compartment
      :type:  Mapped[str]


   .. py:attribute:: universal_reaction_matrix
      :type:  Mapped[List[UniversalReactionMatrix]]


.. py:class:: UniversalReaction(**kwargs)

   Bases: :py:obj:`Base`, :py:obj:`BiGGBase`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: bigg_id
      :type:  Mapped[str]


   .. py:attribute:: hash
      :type:  Mapped[str]


   .. py:attribute:: name
      :type:  Mapped[Optional[str]]


   .. py:attribute:: is_exchange
      :type:  Mapped[bool]


   .. py:attribute:: is_transport
      :type:  Mapped[bool]


   .. py:attribute:: is_pseudo
      :type:  Mapped[bool]


   .. py:attribute:: collection_id
      :type:  Mapped[Optional[int]]


   .. py:attribute:: collection
      :type:  Mapped[Optional[ModelCollection]]


   .. py:attribute:: reference_id
      :type:  Mapped[Optional[int]]


   .. py:attribute:: reference
      :type:  Mapped[Optional[ReferenceReaction]]


   .. py:attribute:: reactions
      :type:  Mapped[List[Reaction]]


   .. py:attribute:: matrix
      :type:  Mapped[List[UniversalReactionMatrix]]


   .. py:method:: get_sbo(reference)


   .. py:method:: generate_hash(components)
      :staticmethod:



.. py:class:: Reaction(**kwargs)

   Bases: :py:obj:`Base`, :py:obj:`BiGGBase`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: bigg_id
      :type:  Mapped[str]


   .. py:attribute:: hash
      :type:  Mapped[str]


   .. py:attribute:: collection_id
      :type:  Mapped[Optional[int]]


   .. py:attribute:: collection
      :type:  Mapped[Optional[ModelCollection]]


   .. py:attribute:: copy_number
      :type:  Mapped[int]


   .. py:attribute:: universal_reaction_id
      :type:  Mapped[int]


   .. py:attribute:: universal_reaction
      :type:  Mapped[UniversalReaction]


   .. py:attribute:: matrix
      :type:  Mapped[List[ReactionMatrix]]


   .. py:attribute:: model_reactions
      :type:  Mapped[List[ModelReaction]]


   .. py:attribute:: annotation_mappings
      :type:  Mapped[List[ReactionAnnotationMapping]]


   .. py:method:: create_id(universal_id, copy_number)
      :staticmethod:



   .. py:method:: coefficient_to_string(coefficient)
      :staticmethod:



   .. py:method:: generate_hash(components)
      :staticmethod:



.. py:class:: UniversalReactionMatrix(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: universal_reaction_id
      :type:  Mapped[Optional[int]]


   .. py:attribute:: universal_reaction
      :type:  Mapped[Optional[UniversalReaction]]


   .. py:attribute:: reference_reaction_participant_id
      :type:  Mapped[Optional[int]]


   .. py:attribute:: reference_reaction_participant
      :type:  Mapped[Optional[ReferenceReactionParticipant]]


   .. py:attribute:: universal_compartmentalized_component_id
      :type:  Mapped[int]


   .. py:attribute:: universal_compartmentalized_component
      :type:  Mapped[UniversalCompartmentalizedComponent]


   .. py:attribute:: coefficient
      :type:  Mapped[float]


   .. py:attribute:: reaction_matrices
      :type:  Mapped[List[ReactionMatrix]]


.. py:class:: ReactionMatrix(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: reaction_id
      :type:  Mapped[int]


   .. py:attribute:: reaction
      :type:  Mapped[Reaction]


   .. py:attribute:: universal_reaction_matrix_id
      :type:  Mapped[int]


   .. py:attribute:: universal_reaction_matrix
      :type:  Mapped[UniversalReactionMatrix]


   .. py:attribute:: compartmentalized_component_id
      :type:  Mapped[int]


   .. py:attribute:: compartmentalized_component
      :type:  Mapped[CompartmentalizedComponent]


.. py:class:: ComponentIDMapping(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: old_bigg_id
      :type:  Mapped[str]


   .. py:attribute:: new_id
      :type:  Mapped[int]


   .. py:attribute:: new_universal_component
      :type:  Mapped[UniversalComponent]


.. py:class:: MemoteTest(**kwargs)

   Bases: :py:obj:`Base`, :py:obj:`BiGGBase`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: bigg_id
      :type:  Mapped[str]


   .. py:attribute:: name
      :type:  Mapped[str]


   .. py:attribute:: summary
      :type:  Mapped[Optional[str]]


   .. py:attribute:: format_type
      :type:  Mapped[str]


   .. py:attribute:: invert
      :type:  Mapped[Optional[bool]]


   .. py:attribute:: invert_result
      :type:  Mapped[Optional[bool]]


   .. py:attribute:: field
      :type:  Mapped[Optional[str]]


   .. py:attribute:: results
      :type:  Mapped[List[MemoteResult]]


.. py:class:: MemoteResult(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: model_id
      :type:  Mapped[int]


   .. py:attribute:: model
      :type:  Mapped[Model]


   .. py:attribute:: test_id
      :type:  Mapped[int]


   .. py:attribute:: test
      :type:  Mapped[MemoteTest]


   .. py:attribute:: model_reaction_id
      :type:  Mapped[Optional[int]]


   .. py:attribute:: model_reaction
      :type:  Mapped[Optional[ModelReaction]]


   .. py:attribute:: model_compartmentalized_component_id
      :type:  Mapped[Optional[int]]


   .. py:attribute:: model_compartmentalized_component
      :type:  Mapped[Optional[ModelCompartmentalizedComponent]]


   .. py:attribute:: model_gene_id
      :type:  Mapped[Optional[int]]


   .. py:attribute:: model_gene
      :type:  Mapped[Optional[ModelGene]]


   .. py:attribute:: message
      :type:  Mapped[Optional[str]]


   .. py:attribute:: data
      :type:  Mapped[Optional[float]]


   .. py:attribute:: duration
      :type:  Mapped[Optional[float]]


   .. py:attribute:: metric
      :type:  Mapped[Optional[float]]


   .. py:attribute:: result


   .. py:attribute:: data_count
      :type:  Mapped[Optional[int]]


.. py:class:: EscherModule(**kwargs)

   Bases: :py:obj:`Base`, :py:obj:`BiGGBase`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: bigg_id
      :type:  Mapped[str]


   .. py:attribute:: name
      :type:  Mapped[str]


   .. py:attribute:: description
      :type:  Mapped[str]


   .. py:attribute:: model_reaction_mappings
      :type:  Mapped[List[ModelReactionEscherMapping]]


.. py:class:: ModelReactionEscherMapping(**kwargs)

   Bases: :py:obj:`Base`


   .. py:attribute:: id
      :type:  Mapped[int]


   .. py:attribute:: model_reaction_id
      :type:  Mapped[int]


   .. py:attribute:: model_reaction
      :type:  Mapped[ModelReaction]


   .. py:attribute:: escher_module_id
      :type:  Mapped[int]


   .. py:attribute:: escher_module
      :type:  Mapped[EscherModule]


