biocrnpyler.mechanisms.global_mechanisms

Classes

AnitDilutionConstiutiveCreation([name, ...])

Global Mechanism to Constitutively Create Certain Species at the rate of dilution.

Deg_Tagged_Degredation(degredase[, deg_tag, ...])

Michaelis Menten Degredation of deg-tagged proteins by degredase (such as proteases) Species_degtagged + degredase <--> Species_degtagged:degredase --> degredase All species with the attribute degtagged and material_type protein are degraded.

Degredation_mRNA_MM(nuclease[, name, ...])

Michaelis Menten mRNA Degredation by Endonucleases mRNA + Endo <--> mRNA:Endo --> Endo All species of type "rna" are degraded by this mechanisms, including those inside of a ComplexSpecies.

Dilution([name, mechanism_type, ...])

A global mechanism to represent dilution.

GlobalMechanism(name[, mechanism_type, ...])

Global mechanisms are a lot like mechanisms.

class biocrnpyler.mechanisms.global_mechanisms.AnitDilutionConstiutiveCreation(name='anti_dilution_constiuitive_creation', material_type='dilution', filter_dict=None, default_on=True, recursive_species_filtering=True)[source]

Global Mechanism to Constitutively Create Certain Species at the rate of dilution.

Useful for keeping machinery species like ribosomes and polymerases at a constant concentration.

Creates a GlobalMechanisms instance.

If the species’s name, material type, and attributes are all not in the filter_dict, the GlobalMechanism will be called if default_on == True and not called if default_on == False.

Parameters:
  • name – name of the GlobalMechanism

  • mechanism_type

  • filter_dict – filter_dict[species.material_type / species.attributes] = True / False For each species, its material type or attributes are sent through the

filter_dict. If True is returned, the GlobalMechanism will act on the species. If False is returned, the the GlobalMechanism will not be called. If filter_dict[attribute] is different from filter_dict[material_type], filter_dict[attribute] takes precedent. If multiple filter_dict[attribute] contradict for different attributes, an error is raised. Note that the above filtering is done automatically. Any parameters needed by the global mechanism must be in the Mixture’s parameter dictionary. These methods are assumed to take a single species as input. :param default_on: what to do if a species doesn’t come up in the filter dict. Also used for as the default if there is a filterdict conflict :param recursive_species_filtering: keyword determines how the material_type and name of ComplexSpecies is defined. If True: the filter based upon all subspecies.type and name recursively going through all ComplexSpecies. If False: the filter dict will act only on the ComplexSpecies. By default, this is False.

apply_filter(s: Species)[source]

applies the filter dictionary to determine if a global mechanism acts on a species.

Parameters:

s – Species

Returns:

update_reactions(s, mixture)[source]

All global mechanisms must use update_reactions functions with these inputs.

Parameters:
  • s

  • mixture

Returns:

update_species(s: Species, mixture)[source]

All global mechanisms must use update_species functions with these inputs.

Parameters:

s – Species instance

Returns:

class biocrnpyler.mechanisms.global_mechanisms.Deg_Tagged_Degredation(degredase, deg_tag='degtagged', name='deg_tagged_degredation', mechanism_type='degredation', filter_dict=None, recursive_species_filtering=False, default_on=False, **keywords)[source]

Michaelis Menten Degredation of deg-tagged proteins by degredase (such as proteases) Species_degtagged + degredase <–> Species_degtagged:degredase –> degredase All species with the attribute degtagged and material_type protein are degraded. The method is not recursive.

Creates a GlobalMechanisms instance.

If the species’s name, material type, and attributes are all not in the filter_dict, the GlobalMechanism will be called if default_on == True and not called if default_on == False.

Parameters:
  • name – name of the GlobalMechanism

  • mechanism_type

  • filter_dict – filter_dict[species.material_type / species.attributes] = True / False For each species, its material type or attributes are sent through the

filter_dict. If True is returned, the GlobalMechanism will act on the species. If False is returned, the the GlobalMechanism will not be called. If filter_dict[attribute] is different from filter_dict[material_type], filter_dict[attribute] takes precedent. If multiple filter_dict[attribute] contradict for different attributes, an error is raised. Note that the above filtering is done automatically. Any parameters needed by the global mechanism must be in the Mixture’s parameter dictionary. These methods are assumed to take a single species as input. :param default_on: what to do if a species doesn’t come up in the filter dict. Also used for as the default if there is a filterdict conflict :param recursive_species_filtering: keyword determines how the material_type and name of ComplexSpecies is defined. If True: the filter based upon all subspecies.type and name recursively going through all ComplexSpecies. If False: the filter dict will act only on the ComplexSpecies. By default, this is False.

apply_filter(s: Species)[source]

applies the filter dictionary to determine if a global mechanism acts on a species.

Parameters:

s – Species

Returns:

update_reactions(s, mixture)[source]

All global mechanisms must use update_reactions functions with these inputs.

Parameters:
  • s

  • mixture

Returns:

update_species(s, mixture)[source]

All global mechanisms must use update_species functions with these inputs.

Parameters:

s – Species instance

Returns:

class biocrnpyler.mechanisms.global_mechanisms.Degredation_mRNA_MM(nuclease, name='rna_degredation_mm', mechanism_type='rna_degredation', default_on=False, recursive_species_filtering=True, filter_dict=None, **keywords)[source]

Michaelis Menten mRNA Degredation by Endonucleases mRNA + Endo <–> mRNA:Endo –> Endo All species of type “rna” are degraded by this mechanisms, including those inside of a ComplexSpecies. ComplexSpecies are seperated by this process, including embedded ComplexSpecies. OrderedPolymerSpecies are ignored.

Creates a GlobalMechanisms instance.

If the species’s name, material type, and attributes are all not in the filter_dict, the GlobalMechanism will be called if default_on == True and not called if default_on == False.

Parameters:
  • name – name of the GlobalMechanism

  • mechanism_type

  • filter_dict – filter_dict[species.material_type / species.attributes] = True / False For each species, its material type or attributes are sent through the

filter_dict. If True is returned, the GlobalMechanism will act on the species. If False is returned, the the GlobalMechanism will not be called. If filter_dict[attribute] is different from filter_dict[material_type], filter_dict[attribute] takes precedent. If multiple filter_dict[attribute] contradict for different attributes, an error is raised. Note that the above filtering is done automatically. Any parameters needed by the global mechanism must be in the Mixture’s parameter dictionary. These methods are assumed to take a single species as input. :param default_on: what to do if a species doesn’t come up in the filter dict. Also used for as the default if there is a filterdict conflict :param recursive_species_filtering: keyword determines how the material_type and name of ComplexSpecies is defined. If True: the filter based upon all subspecies.type and name recursively going through all ComplexSpecies. If False: the filter dict will act only on the ComplexSpecies. By default, this is False.

apply_filter(s: Species)[source]

applies the filter dictionary to determine if a global mechanism acts on a species.

Parameters:

s – Species

Returns:

update_reactions(s, mixture)[source]

All global mechanisms must use update_reactions functions with these inputs.

Parameters:
  • s

  • mixture

Returns:

update_species(s, mixture)[source]

All global mechanisms must use update_species functions with these inputs.

Parameters:

s – Species instance

Returns:

class biocrnpyler.mechanisms.global_mechanisms.Dilution(name='global_degredation_via_dilution', mechanism_type='dilution', filter_dict=None, default_on=True, recursive_species_filtering=True)[source]

A global mechanism to represent dilution.

Creates a GlobalMechanisms instance.

If the species’s name, material type, and attributes are all not in the filter_dict, the GlobalMechanism will be called if default_on == True and not called if default_on == False.

Parameters:
  • name – name of the GlobalMechanism

  • mechanism_type

  • filter_dict – filter_dict[species.material_type / species.attributes] = True / False For each species, its material type or attributes are sent through the

filter_dict. If True is returned, the GlobalMechanism will act on the species. If False is returned, the the GlobalMechanism will not be called. If filter_dict[attribute] is different from filter_dict[material_type], filter_dict[attribute] takes precedent. If multiple filter_dict[attribute] contradict for different attributes, an error is raised. Note that the above filtering is done automatically. Any parameters needed by the global mechanism must be in the Mixture’s parameter dictionary. These methods are assumed to take a single species as input. :param default_on: what to do if a species doesn’t come up in the filter dict. Also used for as the default if there is a filterdict conflict :param recursive_species_filtering: keyword determines how the material_type and name of ComplexSpecies is defined. If True: the filter based upon all subspecies.type and name recursively going through all ComplexSpecies. If False: the filter dict will act only on the ComplexSpecies. By default, this is False.

apply_filter(s: Species)[source]

applies the filter dictionary to determine if a global mechanism acts on a species.

Parameters:

s – Species

Returns:

update_reactions(s: Species, mixture)[source]

All global mechanisms must use update_reactions functions with these inputs.

Parameters:
  • s

  • mixture

Returns:

update_species(s: Species, mixture)[source]

All global mechanisms must use update_species functions with these inputs.

Parameters:

s – Species instance

Returns:

class biocrnpyler.mechanisms.global_mechanisms.GlobalMechanism(name: str, mechanism_type: str = '', filter_dict: Dict = None, default_on: bool = False, recursive_species_filtering: bool = False)[source]

Global mechanisms are a lot like mechanisms. They are called only by mixtures on a list of all species have been generated by components. Global mechanisms are meant to work as universal mechanisms that function on each species or all species of some material type or with some attribute. Global mechanisms may only act on one species at a time.

In order to decide which species a global mechanism acts upon, the filter_dict is used.

An example of a global mechanism is degradation via dilution which is demonstrated in the Tests folder.

GlobalMechanisms should be used cautiously or avoided alltogether - the order in which they are called may have to be carefully user-defined in the subclasses of Mixture in order to ensure expected behavior.

Creates a GlobalMechanisms instance.

If the species’s name, material type, and attributes are all not in the filter_dict, the GlobalMechanism will be called if default_on == True and not called if default_on == False.

Parameters:
  • name – name of the GlobalMechanism

  • mechanism_type

  • filter_dict – filter_dict[species.material_type / species.attributes] = True / False For each species, its material type or attributes are sent through the

filter_dict. If True is returned, the GlobalMechanism will act on the species. If False is returned, the the GlobalMechanism will not be called. If filter_dict[attribute] is different from filter_dict[material_type], filter_dict[attribute] takes precedent. If multiple filter_dict[attribute] contradict for different attributes, an error is raised. Note that the above filtering is done automatically. Any parameters needed by the global mechanism must be in the Mixture’s parameter dictionary. These methods are assumed to take a single species as input. :param default_on: what to do if a species doesn’t come up in the filter dict. Also used for as the default if there is a filterdict conflict :param recursive_species_filtering: keyword determines how the material_type and name of ComplexSpecies is defined. If True: the filter based upon all subspecies.type and name recursively going through all ComplexSpecies. If False: the filter dict will act only on the ComplexSpecies. By default, this is False.

apply_filter(s: Species)[source]

applies the filter dictionary to determine if a global mechanism acts on a species.

Parameters:

s – Species

Returns:

update_reactions(s, mixture)[source]

All global mechanisms must use update_reactions functions with these inputs.

Parameters:
  • s

  • mixture

Returns:

update_species(s: Species, mixture)[source]

All global mechanisms must use update_species functions with these inputs.

Parameters:

s – Species instance

Returns: