biocrnpyler.mechanisms.Degradation_mRNA_MM

class biocrnpyler.mechanisms.Degradation_mRNA_MM(nuclease, name='rna_degradation_mm', mechanism_type='rna_degradation', default_on=False, recursive_species_filtering=True, filter_dict=None, **kwargs)[source]

Bases: GlobalMechanism, MichaelisMenten

Michaelis-Menten mRNA degradation by endonucleases.

A ‘rna_degradation’ mechanism that uses Michaelis-Menten kinetics to model the enzymatic degradation of mRNA by endonucleases. All species with material_type ‘rna’ are degraded, including those within ComplexSpecies.

The degradation reaction scheme is

\[{\text{mRNA}} + {\text{Endo}} \rightleftharpoons {\text{mRNA}}\mathord{:}{\text{Endo}} \rightarrow {\text{Endo}} \]

where mRNA is any RNA species and Endo is the endonuclease.

Parameters:
  • nuclease (Species) – The endonuclease species that degrades mRNA.

  • name (str, default 'rna_degradation_mm') – Name identifier for this mechanism instance.

  • mechanism_type (str, default 'rna_degradation') – Type classification of this mechanism.

  • default_on (bool, default False) – If True, mechanism acts on all species not filtered. If False, only acts on filtered species.

  • recursive_species_filtering (bool, default True) – If True, searches for RNA within ComplexSpecies recursively. If False, only acts on top-level species.

  • filter_dict (dict, optional) – Dictionary for filtering species. Default is {‘rna’: True, ‘notdegradable’: False} to degrade RNA but not species marked as not degradable.

  • **kwargs – Additional keyword arguments passed to parent classes.

Attributes:
  • nuclease (Species) – The endonuclease species.

  • name (str) – Name of the mechanism instance.

  • mechanism_type (str) – Type classification (‘rna_degradation’).

  • filter_dict (dict) – Dictionary for filtering species.

  • default_on (bool) – Default behavior for unfiltered species.

  • recursive_species_filtering (bool) – Whether to filter ComplexSpecies recursively.

See also

MichaelisMenten

Base enzyme kinetics mechanism.

Deg_Tagged_Degradation

Targeted protein degradation.

GlobalMechanism

Base class for global mechanisms.

Notes

This mechanism handles three cases:

  1. Pure RNA species: Degraded completely (RNA \(\rightarrow\) \(\emptyset\))

  2. RNA in ComplexSpecies: Complex is broken apart, RNA is degraded, non-RNA components are released

  3. OrderedPolymerSpecies: Not affected by this mechanism

The mechanism generates Michaelis-Menten reactions with three rate constants per species. ComplexSpecies containing RNA are separated during degradation, including embedded ComplexSpecies. However, OrderedPolymerSpecies (like DNA or assembled proteins) are ignored.

Required parameters for this mechanism:

  • ‘kdeg’ : Catalytic rate constant for RNA degradation

  • ‘kb’ : Forward binding rate for nuclease-RNA association

  • ‘ku’ : Reverse unbinding rate for nuclease-RNA dissociation

The default filter_dict applies degradation to all ‘rna’ species but excludes any species with the ‘notdegradable’ attribute, allowing fine-grained control over which RNA species are degraded.

Examples

Model global mRNA degradation in a cell-free system:

>>> rnase = bcp.Protein('RNase')
>>> mrna = bcp.RNA('mRNA')
>>> degradation = bcp.Degradation_mRNA_MM(nuclease=rnase.species)
>>> mixture = bcp.Mixture(
...     components=[rnase, mrna],
...     mechanisms={'rna_degradation': degradation},
...     parameters={'kdeg': 0.1, 'kb': 1.0, 'ku': 0.5}
... )

Protect specific RNAs from degradation:

>>> rnase = bcp.Protein('RNase')
>>> stable_rna = bcp.RNA('stable', attributes=['notdegradable'])
>>> unstable_rna = bcp.RNA('unstable')
>>> degradation = bcp.Degradation_mRNA_MM(nuclease=rnase.species)
>>> mixture = bcp.Mixture(
...     components=[rnase, stable_rna, unstable_rna],
...     mechanisms={'rna_degradation': degradation},
...     parameters={'kdeg': 0.1, 'kb': 1.0, 'ku': 0.5}
... )

Methods

apply_filter

Determine if the global mechanism should act on a species.

get_parameter

Retrieve a parameter value from the mixture for a given species.

update_reactions

Generate Michaelis-Menten degradation reactions for mRNA.

update_reactions_global

Apply mechanism's update_reactions to filtered species in a list.

update_species

Generate species for mRNA degradation reactions.

update_species_global

Apply mechanism's update_species to filtered species in a list.

apply_filter(s: Species)[source]

Determine if the global mechanism should act on a species.

Checks the species’s material_type, attributes, and name against the filter dictionary to decide if the mechanism should be applied.

Parameters:

s (Species) – The species to check against the filter dictionary.

Returns:

True if the mechanism should act on this species, False otherwise.

Return type:

bool

Notes

The filtering logic follows this hierarchy:

  1. Checks all attributes and material_type of the species (and subspecies if recursive_species_filtering is True)

  2. If any match is found in filter_dict, uses that boolean value

  3. If conflicts occur (different attributes give different results), issues a warning and uses default_on

  4. If no match is found, uses default_on

get_parameter(species, param_name, mixture)[source]

Retrieve a parameter value from the mixture for a given species.

Parameters:
  • species (Species) – The species for which to retrieve the parameter. Used as the part_id for parameter lookup.

  • param_name (str) – Name of the parameter to retrieve.

  • mixture (Mixture) – The mixture containing the parameters.

Returns:

The parameter value retrieved from the mixture.

Return type:

Parameter or float

Raises:

ValueError – If no parameter matching the (mechanism, species, param_name) combination can be found.

update_reactions(s, mixture)[source]

Generate Michaelis-Menten degradation reactions for mRNA.

Creates two mass-action reactions implementing Michaelis-Menten kinetics for RNA degradation: reversible binding and irreversible catalysis.

Parameters:
  • s (Species) – The species to check for RNA degradation.

  • mixture (Mixture) – The mixture containing parameters ‘kdeg’, ‘kb’, and ‘ku’.

Returns:

List of reactions for RNA degradation. Empty list if species should not be degraded.

Return type:

list of Reaction

Notes

Generates standard Michaelis-Menten reactions:

  1. RNA + nuclease \(\rightleftharpoons\) RNA:nuclease (rates ‘kb’ and ‘ku’)

  2. RNA:nuclease \(\rightarrow\) nuclease (rate ‘kdeg’)

For ComplexSpecies containing RNA, non-RNA components are released in the catalytic step instead of being degraded.

update_reactions_global(species_list: List[Species], mixture, compartment=None)[source]

Apply mechanism’s update_reactions to filtered species in a list.

Iterates through all species in the list, applies the filter to determine which species the mechanism acts upon, and calls update_reactions for each applicable species.

Parameters:
  • species_list (list of Species) – List of all species to potentially act upon.

  • mixture (Mixture) – The mixture containing parameters and other context.

  • compartment (Compartment, optional) – If provided, assigns this compartment to species that have the default compartment before generating reactions.

Returns:

List of all new reactions generated by the mechanism.

Return type:

list of Reaction

update_species(s, mixture)[source]

Generate species for mRNA degradation reactions.

Creates enzyme-substrate complexes needed for Michaelis-Menten degradation kinetics. Handles RNA in ComplexSpecies by identifying non-RNA components that will be released.

Parameters:
  • s (Species) – The species to check for RNA degradation.

  • mixture (Mixture) – The mixture containing parameters.

Returns:

List of new species (enzyme-substrate complexes) generated for degradation reactions. Empty list if species should not be degraded.

Return type:

list of Species

Notes

Behavior depends on species type:

  • Pure RNA species: Creates nuclease:RNA complex

  • ComplexSpecies containing RNA: Creates nuclease:complex complex, identifies non-RNA products to be released

  • OrderedPolymerSpecies: Returns empty list (not degraded)

update_species_global(species_list: List[Species], mixture, compartment=None)[source]

Apply mechanism’s update_species to filtered species in a list.

Iterates through all species in the list, applies the filter to determine which species the mechanism acts upon, and calls update_species for each applicable species.

Parameters:
  • species_list (list of Species) – List of all species to potentially act upon.

  • mixture (Mixture) – The mixture containing parameters and other context.

  • compartment (Compartment, optional) – If provided, assigns this compartment to any new species that have the default compartment.

Returns:

List of all new species generated by the mechanism.

Return type:

list of Species