psamm.metabolicmodel – Metabolic model representation

Representation of metabolic network models.

class psamm.metabolicmodel.FlipableFluxBounds(view, reaction)

FluxBounds object for a FlipableModelView.

This object is used internally in the FlipableModelView to represent the bounds of flux on a reaction that can be flipped.

lower

Lower bound

upper

Upper bound

class psamm.metabolicmodel.FlipableLimitsView(view)

Provides a limits view that flips with the flipable model view.

This object is used internally in FlipableModelView to expose a limits view that flips the bounds of all flipped reactions.

class psamm.metabolicmodel.FlipableModelView(model, flipped=set([]))

Proxy wrapper of model objects allowing a flipped set of reactions.

The proxy will forward all properties normally except that flipped reactions will appear to have stoichiometric values negated in the matrix property, and have bounds in the limits property flipped. This view is needed for some algorithms.

class psamm.metabolicmodel.FlipableStoichiometricMatrixView(view)

Provides a matrix view that flips with the flipable model view.

This object is used internally in FlipableModelView to expose a matrix view that negates the stoichiometric values of flipped reactions.

class psamm.metabolicmodel.FluxBounds(model, reaction)

Represents lower and upper bounds of flux as a mutable object

This object is used internally in the model representation. Changing the state of the object will change the underlying model parameters. Deleting a value will reset that value to the defaults.

__eq__(other)

Equality test

__iter__()

Iterator over lower and upper value

__ne__(other)

Inequality test

bounds

Bounds as a tuple

lower

Lower bound

upper

Upper bound

class psamm.metabolicmodel.LimitsView(model)

Provides a view of the flux bounds defined in the model

This object is used internally in MetabolicModel to expose a dictonary view of the FluxBounds associated with the model reactions.

class psamm.metabolicmodel.MetabolicModel(database, v_max=1000)

Represents a metabolic model containing a set of reactions

The model contains a list of reactions referencing the reactions in the associated database.

add_all_database_reactions(compartments)

Add all reactions from database that occur in given compartments

add_all_exchange_reactions(compartment, allow_duplicates=False)

Add all exchange reactions to database and to model

add_all_transport_reactions(compartment, allow_duplicates=False)

Add all transport reactions to database and to model

add_reaction(reaction_id)

Add reaction to model

copy()

Return copy of model

get_compound_reactions(compound_id)

Iterate over all reaction ids the includes the given compound

get_reaction_values(reaction_id)

Return stoichiometric values of reaction as a dictionary

is_exchange(reaction_id)

Whether the given reaction is an exchange reaction.

is_reversible(reaction_id)

Whether the given reaction is reversible

classmethod load_model(database, reaction_iter=None, medium=None, limits=None, v_max=None)

Get model from reaction name iterator

The model will contain all reactions of the iterator.

remove_reaction(reaction)

Remove reaction from model