# 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.

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_reaction(reaction_id)

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, exchange=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

psamm.metabolicmodel.create_exchange_id(existing_ids, compound)

Create unique ID for exchange of compound.

psamm.metabolicmodel.create_transport_id(existing_ids, compound_1, compound_2)

Create unique ID for transport reaction of compounds.