:py:mod:`bayflux.core.reactionNetwork` ====================================== .. py:module:: bayflux.core.reactionNetwork Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: bayflux.core.reactionNetwork.ReactionNetwork bayflux.core.reactionNetwork.EnhancedReaction bayflux.core.reactionNetwork.AtomTransition .. py:class:: ReactionNetwork(cobrapyModel) Bases: :py:obj:`cobra.Model` ReactionNetwork contains a genome scale model with atom transitions. This inherits from a cobra.Model but reactions are replaced with EnhancedReaction to add in atom transitions. Args: cobrapyModel (cobra.Model): A cobra.Model to inherit from. .. py:method:: copy() Provides a partial 'deepcopy' of the Model. All of the Metabolite, Gene, and Reaction objects are created anew but in a faster fashion than deepcopy This code was taken verbatim from cobrapy, but modified to add EnhancedReactions. .. py:method:: writeFluxConstraints(outputFileName, format='csv', exchangesOnly=True) .. py:method:: readFluxConstraints(inputFileName, format='csv') .. py:method:: writeAtomTransitions(outputFileName, format='bayflux') .. py:method:: readAtomTransitions(inputFileName, format='bayflux') .. py:class:: EnhancedReaction(cobrapyReaction, transitions=None) Bases: :py:obj:`cobra.Reaction` like a cobra.Reaction, but with atom transitions. See the attributes for cobra.Reaction in cobrapy Args: cobrapyReaction (cobra.Reaction): a cobra.Reaction object to inherit from. transitions (list, optional): a list of AtomTransition objects. Attributes: transitions (list, optional): a list of AtomTransition objects. .. py:method:: _repr_html_() .. py:class:: AtomTransition(reactants, products) Class for storing atom transitions associated with a reaction. Overview reactant and product transitions are stored as a tuple of two value tuples where the first value of each two value tuple is a cobra.Metabolite and the second value is a tuple of integers where the position in the tuple represents an atom (in left to right order) from the canonical SMILES representation of the metabolite, and the values in the tuples are integers, whereby the same atom in a product and reactant have the same integer label. Specific values of the integers are arbitrary. Special cases: Reactions with multiple atom transitions MetaCyc reaction SUCCCOASYN-RXN is an example with multiple atom transitions. We accommodate this by associating multiple atom transition objects with the same EnhancedReaction. Equivalent atoms Biochemically indistinguishable atoms should be represented with the same integer value in the atom transition tuple. This will be used to generate a set of equivalent EMUs. Args: reactants (tuple): A tuple of two valued tuples as described above. products (tuple): A tuple of two valued tuples as described above. Attributes: reactants (tuple): A tuple of two valued tuples as described above. products (tuple): A tuple of two valued tuples as described above. .. py:method:: reverse() .. py:method:: __repr__() Return repr(self).