Skip to content

Commit 7a12846

Browse files
committed
updated mechanisms and parameters for PURE
1 parent 36918a9 commit 7a12846

8 files changed

Lines changed: 161 additions & 32 deletions

File tree

biocrnpyler/components/basic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from ..core.reaction import Reaction
88
from ..core.species import Complex, Species
99
from ..mechanisms.binding import One_Step_Binding
10-
from ..mechanisms.enzyme import BasicCatalysis
10+
from ..mechanisms.enzyme import MichaelisMenten
1111
from ..mechanisms.metabolite import OneStepPathway
1212

1313

@@ -794,7 +794,7 @@ def __init__(
794794
Component.__init__(
795795
self=self,
796796
name=self.enzyme.name,
797-
default_mechanism=BasicCatalysis(),
797+
default_mechanism=MichaelisMenten(),
798798
**kwargs,
799799
)
800800

biocrnpyler/mechanisms/binding_parameters.tsv

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ mechanism_id part_id param_name param_val units comments
2727
# multiplying by 1e-6.
2828

2929
# Chemical complex binding (aTc to TetR)
30-
binding chemical_complex kb 2.00 /uM/sec SK07, Table 1, Reaction 6
31-
binding chemical_complex ku 0.001 /sec SK07, Table 1, Reaction 8
30+
binding chemical_complex kb 2.00 /uM/sec SK07, Table 1, R6
31+
binding chemical_complex ku 0.001 /sec SK07, Table 1, R8
3232

3333
# Protein-DNA binding (TetR2 to DNA)
34-
binding dna_protein kb 2.86 /uM/sec SK07, Table 1, Reaction 23
35-
binding dna_protein ku 5.11e-4 /sec SK07, Table 1, Reaction 24
34+
binding dna_protein kb 2.86 /uM/sec SK07, Table 1, R23
35+
binding dna_protein ku 5.11e-4 /sec SK07, Table 1, R24
3636

3737
# Default cooperativity
3838
binding cooperativity 2 number of binding modules to bind simultaneously

biocrnpyler/mechanisms/enzyme_parameters.tsv

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
mechanism_id part_id param_name param_val units comments
77

88
# Basic (Michaelis-Menten) catalysis parameters
9-
catalysis kb 100 /sec assuming 10 ms to diffuse across 1 um (characteristic cell size)
10-
catalysis ku 10 uM/sec 90% binding
11-
# catalysis kcat 1
9+
catalysis kb 100 /uM/sec assuming 10 ms to diffuse across 1 um (characteristic cell size)
10+
catalysis ku 10 /sec 90% binding
11+
# catalysis kcat 1 /sec
1212

1313
# Reversible Michaelis-Menten catalysis parameters
14-
catalysis kb1 100 /sec assuming 10 ms to diffuse across 1 um (characteristic cell size)
15-
catalysis ku1 10 uM/sec 90% binding
14+
catalysis kb1 100 /uM/sec assuming 10 ms to diffuse across 1 um (characteristic cell size)
15+
catalysis ku1 10 sec 90% binding
1616
catalysis kb2 100 /sec assuming 10 ms to diffuse across 1 um (characteristic cell size)
1717
catalysis ku2 10 uM/sec 90% binding
1818
catalysis kcat_rev 0.01

biocrnpyler/mechanisms/txtl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1983,7 +1983,7 @@ def __init__(
19831983
else:
19841984
raise ValueError("Fuels must be a list of Species!")
19851985

1986-
if all([isinstance(s, Species) for s in fuels]):
1986+
if all([isinstance(s, Species) for s in wastes]):
19871987
self.wastes = wastes
19881988
else:
19891989
raise ValueError("wastes must be a list of Species!")

biocrnpyler/mechanisms/txtl_parameters.tsv

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,22 @@ translation ktl 0.05 /sec 15 aa/s and protein length of 300 aa
3131
# multiplying by 1e-6. Dissociation constaints are computed by dividing
3232
# unbinding rate by the binding rate.
3333

34-
transcription K 5e-4 uM SK07, Table 1, R8 / R6
35-
transcription k 0.05 /sec ktx from transcription_mm
34+
transcription K 1.33e-3 uM SK01 -> BFS formulas w/ RNAP = 1.3 (PURE)
35+
transcription k 2.5e-2 /sec hand-tuned to match MM in gfp_expression.py (TODO)
3636
transcription n 2 cooperativity
3737
transcription kleak 0.013 /sec SK07, Table 1, R37
3838

3939
# Transcription_MM and Translation_MM
4040
transcription_mm ktx 0.05 /sec 50 nt/s and transcript length of 1000 nt
41-
transcription_mm kb 8.6e-6 /uM/sec SK07, Table 1, R31
41+
transcription_mm kb 8.6 /uM/sec SK07, Table 1, R31
4242
transcription_mm ku 0.01 /sec SK07, Table 1, R32
4343
translation_mm ktl 0.05 /sec 15 aa/s and protein length of 300 aa
4444
translation_mm kb 0.1 /uM/sec SK07, Table 1, R45
4545
translation_mm ku 100 /sec SK07, Table 1, R46
4646

4747
# Energy_Transcription_MM and Energy_Translation_MM
4848
energy_transcription_mm ktx 50 /sec 50 nt/s (rate will be divided by length)
49-
energy_transcription_mm kb 8.6e-6 /uM/sec SK07, Table 1, R31
49+
energy_transcription_mm kb 8.6 /uM/sec SK07, Table 1, R31
5050
energy_transcription_mm ku 0.01 /sec SK07, Table 1, R32
5151
energy_transcription_mm kb_ntps 10 /uM/sec fast binding of NTPs to RNAP:DNA complex (TODO)
5252
energy_transcription_mm ku_ntps 1e-6 /sec slow unbinding of NTPs to RNAP:DNA complex (TODO)

biocrnpyler/mixtures/pure.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,9 @@ def __init__(
172172
ntps='NTPs',
173173
ndps='NDPs',
174174
amino_acids='AAs',
175-
fuel='ATP',
175+
atp='ATP',
176+
adp='ADP',
177+
fuel='Fuel_CP',
176178
parameter_file='mixtures/pure_parameters.tsv',
177179
**kwargs,
178180
):
@@ -190,8 +192,14 @@ def __init__(
190192
if not include_resources:
191193
raise ValueError("include_fuel requires include_resources")
192194
self.fuel = Metabolite(fuel)
193-
self.add_components([self.fuel])
195+
self.adp = Metabolite(adp)
196+
self.atp = Metabolite(
197+
atp, precursors=[self.fuel, self.adp], products=[self.adp]
198+
) # fuel becomes ATP, and ATP is degraded
199+
self.add_components([self.atp]) # includes ADP, fuel
194200
else:
201+
self.atp = None
202+
self.adp = None
195203
self.fuel = None
196204

197205
if include_machinery:
@@ -224,9 +232,9 @@ def __init__(
224232
if include_fuel:
225233
default_mechanisms['translation'] = Energy_Translation_MM(
226234
ribosome=self.ribosome.get_species(),
227-
fuels=4 * [self.fuel.get_species()]
235+
fuels=4 * [self.atp.get_species()]
228236
+ [self.amino_acids.get_species()],
229-
wastes=[],
237+
wastes=4 * [self.adp.get_species()],
230238
)
231239
else:
232240
default_mechanisms['translation'] = Energy_Translation_MM(

biocrnpyler/mixtures/pure_parameters.tsv

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,8 @@ energy_translation_mm ku 0.003 /sec Singhal et al. Table S2
5858
energy_translation_mm kb_fuel 10 /uM/sec fast binding of NTPs to RNAP:DNA complex (TODO)
5959
energy_translation_mm ku_fuel 1e-6 /sec slow unbinding of NTPs to RNAP:DNA complex (TODO)
6060
energy_translation_mm length 300 aa default length of a protein (for resource uasge)
61+
62+
# Parameters for energy regeneration
63+
initial concentration Fuel_CP 16666 uM 50 mM small molecule * 3/10 in final mix
64+
one_step_pathway ATP_production k 0.02 /uM/sec alpha_atp, Singhal et al. Table S2 (TODO)
65+
one_step_pathway ATP_degradation k 0.0000177 /sec Delta_ATP, Singhal et al. Table S2 (TODO)

examples/gfp_expression.py

Lines changed: 128 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
name='gfp', promoter='pconst', rbs='rbs_strong', protein='GFP'
1818
)
1919

20-
# Simulation parmaters
20+
# Simulation parameters
2121
initial_conditions = {'dna_gfp': 1 * nM}
2222
timepts = np.linspace(0, 6 * hrs, 1000)
2323

@@ -253,66 +253,68 @@
253253
# PURE mixtures
254254
#
255255

256+
pure_timepts = np.linspace(0, 180 * min)
257+
256258
simple_mixture = bcp.PURE(
257259
name='simple', components=[gfp_dna, cfp_dna],
258260
include_machinery=False, include_resources=False, include_fuel=False)
259261
simple_crn = simple_mixture.compile_crn()
260262
simple_res = simple_crn.simulate_with_bioscrape_via_sbml(
261-
timepts, initial_condition_dict=cfp_initial_conditions
263+
pure_timepts, initial_condition_dict=cfp_initial_conditions
262264
)
263265

264266
machinery_mixture = bcp.PURE(
265267
name='machinery', components=[gfp_dna, cfp_dna],
266268
include_machinery=True, include_resources=False, include_fuel=False)
267269
machinery_crn = machinery_mixture.compile_crn()
268270
machinery_res = machinery_crn.simulate_with_bioscrape_via_sbml(
269-
timepts, initial_condition_dict=cfp_initial_conditions
271+
pure_timepts, initial_condition_dict=cfp_initial_conditions
270272
)
271273

272274
resource_mixture = bcp.PURE(
273275
name='resources', components=[gfp_dna, cfp_dna],
274276
include_machinery=True, include_resources=True, include_fuel=False)
275277
resource_crn = resource_mixture.compile_crn()
276278
resource_res = resource_crn.simulate_with_bioscrape_via_sbml(
277-
timepts, initial_condition_dict=cfp_initial_conditions
279+
pure_timepts, initial_condition_dict=cfp_initial_conditions
278280
)
279281

280282
energy_mixture = bcp.PURE(
281283
name='energy', components=[gfp_dna, cfp_dna],
282284
include_machinery=True, include_resources=True, include_fuel=True)
283285
energy_crn = energy_mixture.compile_crn()
284286
energy_res = energy_crn.simulate_with_bioscrape_via_sbml(
285-
timepts, initial_condition_dict=cfp_initial_conditions
287+
pure_timepts, initial_condition_dict=cfp_initial_conditions
286288
)
287289

288290
energy_mixture_gfp = bcp.PURE(
289291
name='energy', components=[gfp_dna],
290292
include_machinery=True, include_resources=True, include_fuel=True)
291293
energy_crn_gfp = energy_mixture_gfp.compile_crn()
292294
energy_res_gfp = energy_crn_gfp.simulate_with_bioscrape_via_sbml(
293-
timepts, initial_condition_dict=initial_conditions
295+
pure_timepts, initial_condition_dict=initial_conditions
294296
)
295297

296298
plt.figure(6)
297299
plt.clf()
298300

299301
plt.plot(
300-
timepts / min, simple_res['protein_GFP'] / uM,
302+
pure_timepts / min, simple_res['protein_GFP'] / uM,
301303
label='GFP+CFP, simple')
302304
plt.plot(
303-
timepts / min, machinery_res['protein_GFP'] / uM,
305+
pure_timepts / min, machinery_res['protein_GFP'] / uM,
304306
label='GFP+CFP, machinery')
305307
plt.plot(
306-
timepts / min, resource_res['protein_GFP'] / uM,
308+
pure_timepts / min, resource_res['protein_GFP'] / uM,
307309
label='GFP+CFP, resources')
308310
plt.plot(
309-
timepts / min, energy_res['protein_GFP'] / uM,
311+
pure_timepts / min, energy_res['protein_GFP'] / uM,
310312
label='GFP+CFP, energy')
311313
plt.plot(
312-
timepts / min, energy_res_gfp['protein_GFP'] / uM,
314+
pure_timepts / min, energy_res_gfp['protein_GFP'] / uM,
313315
label='GFP only, energy')
314316
plt.plot(
315-
timepts / min, pure_res['protein_GFP'] + 0.1 / uM, '--',
317+
timepts[0:50] / min, pure_res['protein_GFP'][0:50] + 0.1 / uM, '--',
316318
label='GFP only + 0.1, basic')
317319

318320
plt.ylim([0, 12])
@@ -321,3 +323,117 @@
321323
plt.xlabel("Time [min]")
322324
plt.ylabel("Concentration [uM]")
323325
plt.legend()
326+
327+
#
328+
# Activators and repressors
329+
#
330+
331+
TetR = bcp.Protein('TetR')
332+
aTc = bcp.Species('aTc')
333+
TetR_inactive = bcp.ChemicalComplex(
334+
[TetR.species, aTc], mechanisms={'binding': bcp.One_Step_Binding()}
335+
)
336+
ptet_repressed = bcp.RepressiblePromoter('ptet', TetR)
337+
dna_GFP_repressed = bcp.DNAassembly(
338+
'GFP', promoter=ptet_repressed, rbs='RBS', protein='GFP', length=714
339+
)
340+
341+
initial_conditions = {'dna_GFP': 1 * nM, 'protein_TetR': 30 * uM}
342+
repressed_mixture = bcp.PURE(
343+
name='repressed',
344+
components=[dna_GFP_repressed, TetR_inactive],
345+
include_machinery=True,
346+
include_resources=True,
347+
include_fuel=True,
348+
)
349+
repressed_crn = repressed_mixture.compile_crn()
350+
351+
TetR = bcp.Protein('TetR')
352+
aTc = bcp.Species('aTc')
353+
TetR_inactive = bcp.ChemicalComplex(
354+
[TetR.species, aTc], mechanisms={'binding': bcp.One_Step_Binding()}
355+
)
356+
ptet_regulated = bcp.RegulatedPromoter('ptet', TetR)
357+
dna_GFP_regulated = bcp.DNAassembly(
358+
'GFP', promoter=ptet_regulated, rbs='RBS', protein='GFP'
359+
)
360+
regulated_parameters = {
361+
('transcription', 'ptet_leak', 'ktx'): 50, # unbound
362+
('transcription', 'ptet_TetR', 'ktx'): 0.001, # bound
363+
}
364+
365+
regulated_mixture = bcp.PURE(
366+
name='regulated',
367+
components=[dna_GFP_regulated, TetR_inactive],
368+
include_machinery=True,
369+
include_resources=True,
370+
include_fuel=True,
371+
parameters=regulated_parameters,
372+
)
373+
regulated_crn = regulated_mixture.compile_crn()
374+
375+
plt.figure(7)
376+
plt.clf()
377+
378+
offset = -0.01
379+
TetR_0 = initial_conditions['protein_TetR']
380+
for aTc_0 in np.linspace(0, 50*uM, 5):
381+
# aTc_0 = 0
382+
# for TetR_0 in np.linspace(0, 20*uM, 5):
383+
repressed_res = repressed_crn.simulate_with_bioscrape_via_sbml(
384+
pure_timepts, initial_condition_dict=initial_conditions
385+
| {'aTc': aTc_0} | {'protein_TetR': TetR_0}
386+
)
387+
lines = plt.plot(
388+
pure_timepts / min,
389+
repressed_res['protein_GFP'] / uM + offset,
390+
label=f"aTc={aTc_0 / uM} uM, TetR={TetR_0 / uM} uM",
391+
)
392+
393+
regulated_res = regulated_crn.simulate_with_bioscrape_via_sbml(
394+
pure_timepts, initial_condition_dict=initial_conditions
395+
| {'aTc': aTc_0} | {'protein_TetR': TetR_0}
396+
)
397+
plt.plot(
398+
pure_timepts / min,
399+
regulated_res['protein_GFP'] / uM + offset,
400+
color=lines[0].get_color(),
401+
linestyle='--',
402+
)
403+
404+
offset += 0.05
405+
406+
plt.title("Represssed (-) versus Regulated (--)")
407+
plt.xlabel("Time [min]")
408+
plt.ylabel("Concentration [uM]")
409+
plt.legend()
410+
411+
#
412+
# PURE debugging
413+
#
414+
415+
repressed_res = repressed_crn.simulate_with_bioscrape_via_sbml(
416+
pure_timepts, initial_condition_dict=initial_conditions
417+
| {'aTc': 37.5 * uM} | {'protein_TetR': 30 * uM}
418+
)
419+
420+
plt.figure(8)
421+
plt.clf()
422+
bcp.plot_gene_expression_data(
423+
repressed_res, repressed_crn, dna_GFP_repressed,
424+
trace_offset=[0.01, 0.002, 0.1, 0.1])
425+
plt.suptitle("Gene expression, repressed", fontsize='large')
426+
plt.tight_layout()
427+
428+
regulated_res = regulated_crn.simulate_with_bioscrape_via_sbml(
429+
pure_timepts, initial_condition_dict=initial_conditions
430+
| {'aTc': 37.5 * uM} | {'protein_TetR': 30 * uM}
431+
)
432+
433+
plt.figure(9)
434+
plt.clf()
435+
bcp.plot_gene_expression_data(
436+
regulated_res, regulated_crn, dna_GFP_regulated,
437+
trace_offset=[0.01, 0.002, 0.1, 0.1])
438+
plt.suptitle("Gene expression, regulated", fontsize='large')
439+
plt.tight_layout()

0 commit comments

Comments
 (0)