Metabolism : The Enzyme class

class PyFBA.metabolism.Enzyme(name)
The enzyme class has a few components:
  • The subunit(s) that make up the enzyme
  • The genes that encode those subunit(s)
  • The reactions that this enzyme is connected to.
Variables:
  • name – the name of the enzyme object
  • roles – the set of roles associated with the enzyme object
  • pegs – a dict of pegs associated with the enzyme object and their associated roles
  • roles_w_pegs – a dict of roles associated with the enzyme and their pegs
  • reactions – a set of reaction IDs that this enzyme connects to
add_a_peg(peg, role)

Add a single peg and the role that it connects to.

Parameters:
  • peg (str) – The peg id
  • role (str) – The role it connects to
Raises:

KeyError

add_pegs(pegs)

Add a hash of pegs and roles. Keys must be pegs, values must be roles.

Will throw a KeyError if the Role is not present

Parameters:pegs (dict) – A hash of pegs and roles that encode the enzyme (e.g. from the assigned functions file)
Raises:KeyError
add_reaction(reaction)

Add a reaction that this enzyme is inolved in.

Parameters:reaction (Reaction) – The reaction object that this is involved with
add_roles(roles)

Add roles to this enzyme or complex

Parameters:roles (set) – A set of functional roles that encode the enzyme
has_peg_for_role(role)

Do we have at least one peg for this role?

Parameters:role (str) – The role we are looking for
Returns:If a peg is present
Return type:bool
has_role(role)

Does this enzyme have this role?

Parameters:role (str) – A functional role
Returns:A boolean
Return type:bool
number_of_pegs()

The number of pegs assocaited with this enzyme.

Return type:int
number_of_reactions()

The number of reactions that this enzyme is involved in

Return type:int
number_of_roles()

How many roles does this enzyme have?

Return type:int
number_of_roles_with_pegs()

How many of our roles have pegs associated with them?

Return type:int
probability()

The probability that this reaction occurs in the cell. Currently the number of pegs/number of roles. Thus if most of the pegs are present then the enzyme is likely to function

Returns:the probability that this reaction is complete
Return type:float