bayflux.core.reactionNetwork

Module Contents

Classes

ReactionNetwork

ReactionNetwork contains a genome scale model with atom transitions.

EnhancedReaction

like a cobra.Reaction, but with atom transitions.

AtomTransition

Class for storing atom transitions associated with a reaction.

class bayflux.core.reactionNetwork.ReactionNetwork(cobrapyModel)

Bases: 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.

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.

writeFluxConstraints(outputFileName, format='csv', exchangesOnly=True)
readFluxConstraints(inputFileName, format='csv')
writeAtomTransitions(outputFileName, format='bayflux')
readAtomTransitions(inputFileName, format='bayflux')
class bayflux.core.reactionNetwork.EnhancedReaction(cobrapyReaction, transitions=None)

Bases: 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.

_repr_html_()
class bayflux.core.reactionNetwork.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.

reverse()
__repr__()

Return repr(self).