Skip to content

Commit 892bfc5

Browse files
committed
create customizable PURE mixture
1 parent 8869b5d commit 892bfc5

4 files changed

Lines changed: 327 additions & 49 deletions

File tree

biocrnpyler/mixtures/pure.py

Lines changed: 240 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,238 @@
55
from ..core.mixture import Mixture
66
from ..mechanisms.binding import One_Step_Binding
77
from ..mechanisms.enzyme import MichaelisMenten
8-
from ..mechanisms.txtl import Energy_Transcription_MM, Energy_Translation_MM
8+
from ..mechanisms.txtl import (
9+
Energy_Transcription_MM,
10+
Energy_Translation_MM,
11+
SimpleTranscription,
12+
SimpleTranslation,
13+
Transcription_MM,
14+
Translation_MM,
15+
)
16+
17+
18+
class PURE(Mixture):
19+
"""PURE cell-free protein synthesis system with customizable mechanisms.
20+
21+
A mixture that models the PURE (Protein synthesis Using Recombinant
22+
Elements) reconstituted cell-free transcription-translation system with
23+
customizable mechanisms.
24+
25+
Parameters
26+
----------
27+
name : str, default='PURE'
28+
Name identifier for the mixture.
29+
include_machinery : bool, default=True
30+
Include components and mechanisms for RNAP and ribosomes.
31+
include_resources : bool, default=True
32+
Include components and mechanisms for NTP and amino acid utilization.
33+
Requires `include_machinery` to be true.
34+
include_fuel : bool, default=True
35+
Include fuel component and energy utilization mechanism. Requires that
36+
`include_machinery` and `include_resources` be True.
37+
rnap : str, default='RNAP'
38+
Name for the RNA polymerase protein species.
39+
ribosome : str, default='Ribo'
40+
Name for the ribosome protein species.
41+
ntps : str, default='NTPs'
42+
Name for the nucleotide triphosphate species (lumped NTPs excluding
43+
ATP).
44+
ndps : str, default='NDPs'
45+
Name for the nucleotide diphosphate species (lumped NDPs).
46+
amino_acids : str, default='AAs'
47+
Name for the amino acid species (lumped amino acids).
48+
fuel : str, default='ATP'
49+
Name for the primary energy carrier species (ATP).
50+
parameter_file : str, default='mixtures/pure_parameters.tsv'
51+
Path to file containing default parameter values for the PURE
52+
system.
53+
**kwargs
54+
Additional keyword arguments passed to the parent Mixture class.
55+
56+
Attributes
57+
----------
58+
rnap : Protein
59+
RNA polymerase component.
60+
ribosome : Protein
61+
Ribosome component.
62+
ntps : Metabolite
63+
Nucleotide triphosphate metabolite component (excluding ATP).
64+
amino_acids : Metabolite
65+
Amino acid metabolite component.
66+
fuel : Metabolite
67+
Fuel metabolite component (ATP).
68+
name : str
69+
Name of the mixture.
70+
71+
See Also
72+
--------
73+
EnergyTxTlExtract : TX-TL with fuel regeneration.
74+
TxTlExtract : TX-TL with machinery but no energy.
75+
Energy_Transcription_MM : Mechanism for energy-consuming transcription.
76+
Energy_Translation_MM : Mechanism for energy-consuming translation.
77+
Mixture : Base class for all mixtures.
78+
79+
Notes
80+
-----
81+
This mixture automatically adds the following components:
82+
83+
- RNA polymerase (RNAP)
84+
- Ribosome
85+
- Amino acids (lumped)
86+
- NTPs (nucleotide triphosphates excluding ATP, lumped)
87+
- NDPs (nucleotide diphosphates, lumped)
88+
- Fuel (ATP for energy)
89+
90+
Default mechanisms included:
91+
92+
- 'transcription' : `Energy_Transcription_MM` - Michaelis-Menten
93+
transcription with length-dependent ATP and NTP consumption
94+
- 'translation' : `Energy_Translation_MM` - Michaelis-Menten translation
95+
with length-dependent amino acid and ATP consumption
96+
- 'catalysis' : `MichaelisMenten` - General Michaelis-Menten enzyme
97+
catalysis for user-defined enzymatic reactions
98+
- 'binding' : `One_Step_Binding` - Simple multi-species binding for
99+
forming complexes
100+
101+
Key features of this mixture:
102+
103+
- Explicit modeling of PURE system components
104+
- Length-dependent energy consumption (realistic stoichiometry)
105+
- No fuel regeneration mechanisms (finite resource pool)
106+
- Resource competition effects (genes compete for RNAP and ribosomes)
107+
- Resource depletion dynamics (ATP, NTPs, amino acids deplete)
108+
- Enzyme sequestration in complexes
109+
- Separate tracking of ATP vs other NTPs
110+
- Suitable for modeling batch-mode PURE reactions
111+
112+
Energy model details:
113+
114+
- Transcription: Consumes L NTPs and L ATPs per mRNA of length L
115+
- Translation: Consumes L amino acids and 4L ATPs per protein of length
116+
L (4 ATPs per amino acid reflect GTP hydrolysis during elongation)
117+
- No regeneration: ATP, NTPs, and amino acids are consumed but not
118+
regenerated
119+
- Energy depletion: Expression stops when resources are exhausted
120+
- Length parameter L: Represents gene/protein length in appropriate
121+
units
122+
- Lumped species: Different nucleotides lumped into NTPs, different
123+
amino acids lumped into single species
124+
- Separate ATP: ATP tracked separately from other NTPs for independent
125+
energy accounting
126+
127+
Differences from `EnergyTxTlExtract`:
128+
129+
- No fuel regeneration pathway (no NTP regeneration from 3PGA or other
130+
fuel sources)
131+
- ATP modeled as separate fuel species rather than included in NTPs
132+
- Default parameter file points to PURE-specific parameters
133+
- Intended for modeling finite-resource batch reactions
134+
- More realistic for in vitro PURE systems
135+
136+
Common applications include:
137+
138+
- PURE cell-free TX-TL systems
139+
- Resource-limited gene expression modeling
140+
- TX-TL system optimization with fixed resource budgets
141+
- Batch mode TX-TL reactions
142+
- Energy budget and resource allocation studies
143+
- Multi-gene expression burden analysis
144+
- In vitro synthetic biology applications
145+
146+
Examples
147+
--------
148+
Create a PURE mixture for GFP expression:
149+
150+
>>> gfp_gene = bcp.DNAassembly(
151+
... name='gfp_construct',
152+
... promoter='pconst',
153+
... rbs='bcd2',
154+
... transcript='gfp_mrna',
155+
... protein='GFP'
156+
... )
157+
>>> mixture = bcp.BasicPURE(
158+
... name='pure_mixture',
159+
... components=[gfp_gene],
160+
... parameter_file='mixtures/pure_parameters.tsv'
161+
... )
162+
>>> crn = mixture.compile_crn()
163+
164+
"""
165+
166+
def __init__(
167+
self,
168+
include_machinery=True,
169+
include_resources=True,
170+
include_fuel=True,
171+
name='PURE',
172+
rnap='RNAP',
173+
ribosome='Ribo',
174+
ntps='NTPs',
175+
ndps='NDPs',
176+
amino_acids='AAs',
177+
fuel='ATP',
178+
parameter_file='mixtures/pure_parameters.tsv',
179+
**kwargs,
180+
):
181+
Mixture.__init__(
182+
self, name=name, parameter_file=parameter_file, **kwargs
183+
)
184+
185+
# Start with basic mechansims for transcription and translation
186+
default_mechanisms = {
187+
'transcription': SimpleTranscription(),
188+
'translation': SimpleTranslation(),
189+
}
190+
191+
if include_fuel:
192+
if not include_resources:
193+
raise ValueError("include_fuel requires include_resources")
194+
self.fuel = Metabolite(fuel)
195+
self.add_components([self.fuel])
196+
else:
197+
self.fuel = None
198+
199+
if include_machinery:
200+
self.rnap = Protein(rnap)
201+
self.ribosome = Protein(ribosome)
202+
self.add_components([self.rnap, self.ribosome])
203+
204+
default_mechanisms |= {
205+
'transcription': Transcription_MM(rnap=self.rnap.species),
206+
'translation': Translation_MM(ribosome=self.ribosome.species),
207+
}
208+
209+
if include_resources:
210+
if not include_machinery:
211+
raise ValueError(
212+
"include_resources requires include_machinery"
213+
)
214+
215+
# create default Components to represent cellular machinery
216+
self.ntps = Metabolite(ntps)
217+
self.amino_acids = Metabolite(amino_acids)
218+
self.add_components([self.amino_acids, self.ntps])
219+
220+
# Create default TX-TL Mechanisms
221+
default_mechanisms['transcription'] = Energy_Transcription_MM(
222+
rnap=self.rnap.get_species(),
223+
fuels=[self.ntps.get_species()],
224+
wastes=[],
225+
)
226+
if include_fuel:
227+
default_mechanisms['translation'] = Energy_Translation_MM(
228+
ribosome=self.ribosome.get_species(),
229+
fuels=4 * [self.fuel.get_species()]
230+
+ [self.amino_acids.get_species()],
231+
wastes=[],
232+
)
233+
else:
234+
default_mechanisms['translation'] = Energy_Translation_MM(
235+
ribosome=self.ribosome.get_species(),
236+
fuels=[self.amino_acids.get_species()],
237+
wastes=[],
238+
)
239+
self.add_mechanisms(mechanisms=default_mechanisms, overwrite=False)
9240

10241

11242
class BasicPURE(Mixture):
@@ -176,45 +407,12 @@ def __init__(
176407
parameter_file='mixtures/pure_parameters.tsv',
177408
**kwargs,
178409
):
179-
Mixture.__init__(
180-
self, name=name, parameter_file=parameter_file, **kwargs
181-
)
182-
183-
# create default Components to represent cellular machinery
184-
self.rnap = Protein(rnap)
185-
self.ribosome = Protein(ribosome)
186-
self.ntps = Metabolite(ntps)
187-
self.amino_acids = Metabolite(amino_acids)
188-
self.fuel = Metabolite(fuel)
189-
190-
default_components = [
191-
self.rnap,
192-
self.ribosome,
193-
self.amino_acids,
194-
self.ntps,
195-
self.fuel,
196-
]
197-
self.add_components(default_components)
198-
199-
# Create default TX-TL Mechanisms
200-
mech_tx = Energy_Transcription_MM(
201-
rnap=self.rnap.get_species(),
202-
fuels=[self.ntps.get_species()],
203-
wastes=[],
204-
)
205-
mech_tl = Energy_Translation_MM(
206-
ribosome=self.ribosome.get_species(),
207-
fuels=4 * [self.fuel.get_species()]
208-
+ [self.amino_acids.get_species()],
209-
wastes=[],
410+
PURE.__init__(
411+
self,
412+
name=name,
413+
parameter_file=parameter_file,
414+
include_machinery=True,
415+
include_resources=True,
416+
include_fuel=True,
417+
**kwargs,
210418
)
211-
mech_cat = MichaelisMenten()
212-
mech_bind = One_Step_Binding()
213-
214-
default_mechanisms = {
215-
mech_tx.mechanism_type: mech_tx,
216-
mech_tl.mechanism_type: mech_tl,
217-
mech_cat.mechanism_type: mech_cat,
218-
mech_bind.mechanism_type: mech_bind,
219-
}
220-
self.add_mechanisms(default_mechanisms, overwrite=None)

biocrnpyler/mixtures/pure_parameters.tsv

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ initial concentration ATP 1000 uM [ATP/GTP] - [CTP/UTP]
3939
initial concentration NTPs 4000 uM [CTP/UTP] * 4 (NTPs)
4040
initial concentration AAs 6000 uM 0.3 mM (upper bound) * 20 AAs
4141

42+
transcription_mm kb 4.48 /uM/sec txtlsim S3: pol_{Flac}
43+
transcription_mm ku 2.5E-06 /sec default_parameters.txt; source unclear (TODO)
44+
45+
translation_mm kb 0.819 /uM/sec Singhal et al. Table S2
46+
translation_mm ku 0.003 /sec Singhal et al. Table S2
47+
4248
energy_transcription_mm ktx 50 /sec 50 nt/s (rate will be divided by length)
4349
energy_transcription_mm kb 4.48 /uM/sec txtlsim S3: pol_{Flac}
4450
energy_transcription_mm ku 2.5E-06 /sec default_parameters.txt; source unclear (TODO)

docs/_autogen_mixtures.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,6 @@ Pure
4949
:nosignatures:
5050
:recursive:
5151

52+
PURE
5253
BasicPURE
5354

0 commit comments

Comments
 (0)