biocrnpyler.mechanisms.OneStepGeneExpression

class biocrnpyler.mechanisms.OneStepGeneExpression(name='gene_expression', mechanism_type='transcription')[source]

Bases: Mechanism

Single-step gene expression mechanism without explicit TX-TL steps.

A ‘transcription’ mechanism that models gene expression as a single direct reaction from DNA to protein, without explicitly modeling transcription and translation as separate steps. This simplified mechanism is useful for models where the intermediate mRNA dynamics are not important.

The reaction follows the schema:

\[{\text{G}} \rightarrow {\text{G}} + {\text{P}} \]

where G is the gene (DNA) and P is the protein product.

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

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

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

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

See also

SimpleTranscription

Explicit transcription mechanism.

SimpleTranslation

Explicit translation mechanism.

Mechanism

Base class for all mechanisms.

Notes

This mechanism is appropriate for modeling scenarios where:

  • mRNA dynamics are much faster than protein dynamics

  • The model focuses on protein-level behavior

  • Computational efficiency is prioritized over mechanistic detail

The single-step abstraction combines transcription and translation into a single effective rate constant. This is often used in coarse-grained models of gene regulatory networks.

Common applications include:

  • Simplified gene regulatory network models

  • Steady-state or quasi-steady-state analyses

  • Systems where mRNA lifetime is negligible

  • High-level circuit design and prototyping

Required parameters for this mechanism:

  • ‘kexpress’ : Combined expression rate constant

Examples

Model simple gene expression in a minimal system:

>>> gene = bcp.DNAassembly(
...     name='gfp', promoter='pconst', protein='GFP',
... )
>>> mechanism = bcp.OneStepGeneExpression()
>>> mixture = bcp.Mixture(
...     components=[gene],
...     mechanisms={
...         'transcription': mechanism,
...     },
...     parameters={'kexpress': 0.1}
... )
>>> mixture.compile_crn()

Methods

update_reactions

Generate reactions for one-step gene expression.

update_species

Generate species for one-step gene expression.

update_reactions(dna, component=None, kexpress=None, protein=None, transcript=None, part_id=None, **kwargs)[source]

Generate reactions for one-step gene expression.

Creates a single mass-action reaction representing direct gene expression from DNA to protein without intermediate transcript.

Parameters:
  • dna (Species) – The DNA species (gene) that expresses the protein.

  • component (Component, optional) – Component containing parameter values. Required if kexpress is not provided directly.

  • kexpress (Parameter or float, optional) – Expression rate constant. If None, retrieved from component parameters.

  • protein (Species, optional) – The protein species produced. If None, no reactions are generated.

  • transcript (Species, optional) – Transcript species (unused in this mechanism, accepted for API consistency).

  • part_id (str, optional) – Identifier for parameter lookup in the component’s parameter database.

  • **kwargs – Additional keyword arguments (unused).

Returns:

List containing a single mass-action reaction for gene expression if protein is not None, otherwise empty list.

Return type:

list of Reaction

Raises:

ValueError – If component is None and kexpress is not provided.

Notes

The reaction has the form:

\[{\text{DNA}} \rightarrow {\text{DNA}} + {\text{Protein}} \quad ({\text{rate}} = {\text{kexpress}}) \]

The DNA is catalytic and appears on both sides of the reaction.

update_species(dna, transcript=None, protein=None, **kwargs)[source]

Generate species for one-step gene expression.

Returns the DNA and protein species involved in the expression reaction.

Parameters:
  • dna (Species) – The DNA species (gene) that expresses the protein.

  • transcript (Species, optional) – Transcript species (unused in this mechanism, accepted for API consistency).

  • protein (Species) – The protein species produced by expression. If None, no species are returned.

  • **kwargs – Additional keyword arguments (unused).

Returns:

List containing [dna, protein] if protein is not None, otherwise [dna].

Return type:

list of Species