@@ -12,10 +12,7 @@ struct JumpProblemNetwork
12
12
prob_data # additional problem data, stored as a Dict
13
13
end
14
14
15
- """
16
- DNA negative feedback autoregulatory model. Protein acts as repressor.
17
- """
18
- rs = @reaction_network ptype begin
15
+ dna_rs = @reaction_network ptype begin
19
16
k1, DNA --> mRNA + DNA
20
17
k2, mRNA --> mRNA + P
21
18
k3, mRNA --> 0
@@ -30,13 +27,12 @@ prob = DiscreteProblem(u0, (0.0, tf), rates)
30
27
Nsims = 8000
31
28
expected_avg = 5.926553750000000e+02
32
29
prob_data = Dict (" num_sims_for_mean" => Nsims, " expected_mean" => expected_avg)
33
- prob_jump_dnarepressor = JumpProblemNetwork (rs, rates, tf, u0, prob, prob_data)
34
-
35
-
36
30
"""
37
- Simple constant production with degradation example
31
+ DNA negative feedback autoregulatory model. Protein acts as repressor.
38
32
"""
39
- rs = @reaction_network pdtype begin
33
+ prob_jump_dnarepressor = JumpProblemNetwork (dna_rs, rates, tf, u0, prob, prob_data)
34
+
35
+ bd_rs = @reaction_network pdtype begin
40
36
k1, 0 --> A
41
37
k2, A --> 0
42
38
end k1 k2
@@ -47,13 +43,12 @@ prob = DiscreteProblem(u0, (0., tf), rates)
47
43
Nsims = 16000
48
44
expected_avg = t -> rates[1 ] / rates[2 ] .* ( 1. - exp .(- rates[2 ] * t))
49
45
prob_data = Dict (" num_sims_for_mean" => Nsims, " expected_mean_at_t" => expected_avg)
50
- prob_jump_constproduct = JumpProblemNetwork (rs, rates, tf, u0, prob, prob_data)
51
-
52
-
53
46
"""
54
- Example with a mix of nonlinear reactions, including third order
47
+ Simple birth-death process with constant production and degradation.
55
48
"""
56
- rs = @reaction_network dtype begin
49
+ prob_jump_constproduct = JumpProblemNetwork (bd_rs, rates, tf, u0, prob, prob_data)
50
+
51
+ nonlin_rs = @reaction_network dtype begin
57
52
k1, 2 A --> B
58
53
k2, B --> 2 A
59
54
k3, A + B --> C
@@ -67,13 +62,13 @@ prob = DiscreteProblem(u0, (0., tf), rates)
67
62
Nsims = 32000
68
63
expected_avg = 84.876015624999994
69
64
prob_data = Dict (" num_sims_for_mean" => Nsims, " expected_mean" => expected_avg)
70
- prob_jump_nonlinrxs = JumpProblemNetwork (rs, rates, tf, u0, prob, prob_data)
71
-
72
-
73
65
"""
74
- Oscillatory system, uses a mixture of jump types.
66
+ Example with a mix of nonlinear reactions, including third order
75
67
"""
76
- rs = @reaction_network rnoscType begin
68
+ prob_jump_nonlinrxs = JumpProblemNetwork (nonlin_rs, rates, tf, u0, prob, prob_data)
69
+
70
+
71
+ oscil_rs = @reaction_network rnoscType begin
77
72
0.01 , (X,Y,Z) --> 0
78
73
hill (X,3. ,100. ,- 4 ), 0 --> Y
79
74
hill (Y,3. ,100. ,- 4 ), 0 --> Z
88
83
u0 = [200. ,60. ,120. ,100. ,50. ,50. ,50. ] # Hill equations force use of floats!
89
84
tf = 4000.
90
85
prob = DiscreteProblem (u0, (0. ,tf))
91
- prob_jump_osc_mixed_jumptypes = JumpProblemNetwork (rs, nothing , tf, u0, prob, nothing )
92
-
93
-
94
86
"""
95
- Multistate model from Gupta and Mendes,
96
- "An Overview of Network-Based and -Free Approaches for Stochastic Simulation of Biochemical Systems",
97
- Computation 2018, 6, 9; doi:10.3390/computation6010009
98
- Translated from supplementary data file: Models/Multi-state/fixed_multistate.xml
87
+ Oscillatory system, uses a mixture of jump types.
99
88
"""
89
+ prob_jump_osc_mixed_jumptypes = JumpProblemNetwork (oscil_rs, nothing , tf, u0, prob, nothing )
90
+
91
+
100
92
specs_sym_to_name = Dict (
101
93
:S1 => " R(a,l)" ,
102
94
:S2 => " L(r)" ,
@@ -139,15 +131,16 @@ u0[ findfirst(rs.syms, :S2) ] = params[2]
139
131
u0[ findfirst (rs. syms, :S3 ) ] = params[3 ]
140
132
tf = 100.
141
133
prob = DiscreteProblem (u0, (0. , tf), rates)
134
+ """
135
+ Multistate model from Gupta and Mendes,
136
+ "An Overview of Network-Based and -Free Approaches for Stochastic Simulation of Biochemical Systems",
137
+ Computation 2018, 6, 9; doi:10.3390/computation6010009
138
+ Translated from supplementary data file: Models/Multi-state/fixed_multistate.xml
139
+ """
142
140
prob_jump_multistate = JumpProblemNetwork (rs, rates, tf, u0, prob,
143
141
Dict (" specs_to_sym_name" => specs_sym_to_name, " rates_sym_to_idx" => rates_sym_to_idx, " params" => params))
144
142
145
143
146
- """
147
- Twenty-gene model from McCollum et al,
148
- "The sorting direct method for stochastic simulation of biochemical systems with varying reaction execution behavior"
149
- Comp. Bio. and Chem., 30, pg. 39-49 (2006).
150
- """
151
144
# generate the network
152
145
N = 10 # number of genes
153
146
genenetwork = " @reaction_network twentgtype begin\n "
@@ -173,15 +166,14 @@ for i = 1:(2*N)
173
166
end
174
167
tf = 2000.0
175
168
prob = DiscreteProblem (u0, (0.0 , tf))
169
+ """
170
+ Twenty-gene model from McCollum et al,
171
+ "The sorting direct method for stochastic simulation of biochemical systems with varying reaction execution behavior"
172
+ Comp. Bio. and Chem., 30, pg. 39-49 (2006).
173
+ """
176
174
prob_jump_twentygenes = JumpProblemNetwork (rs, nothing , tf, u0, prob, nothing )
177
175
178
176
179
- """
180
- Negative feedback autoregulatory gene expression model. Dimer is the repressor.
181
- Taken from Marchetti, Priami and Thanh,
182
- "Simulation Algorithms for Comptuational Systems Biology",
183
- Springer (2017).
184
- """
185
177
rn = @reaction_network gnrdtype begin
186
178
c1, G --> G + M
187
179
c2, M --> M + P
@@ -197,16 +189,16 @@ varlabels = ["G", "M", "P", "P2","P2G"]
197
189
u0 = [1000 , 0 , 0 , 0 ,0 ]
198
190
tf = 4000.
199
191
prob = DiscreteProblem (u0, (0.0 , tf), rnpar)
192
+ """
193
+ Negative feedback autoregulatory gene expression model. Dimer is the repressor.
194
+ Taken from Marchetti, Priami and Thanh,
195
+ "Simulation Algorithms for Comptuational Systems Biology",
196
+ Springer (2017).
197
+ """
200
198
prob_jump_dnadimer_repressor = JumpProblemNetwork (rn, rnpar, tf, u0, prob,
201
199
Dict (" specs_names" => varlabels))
202
200
203
201
204
- """
205
- Continuous time random walk (i.e. diffusion approximation) example.
206
- Here the network in the JumpProblemNetwork is a function that returns a
207
- network given the number of lattice sites.
208
- u0 is a similar function that returns the initial condition vector.
209
- """
210
202
# diffusion model
211
203
function getDiffNetwork (N)
212
204
diffnetwork = " @reaction_network dpldifftype begin\n "
@@ -223,4 +215,10 @@ function getDiffu0(N)
223
215
10 * ones (Int64, N)
224
216
end
225
217
tf = 10.
226
- prob_jump_diffnetwork = JumpProblemNetwork (getDiffNetwork, params, tf, getDiffu0, nothing , nothing )
218
+ """
219
+ Continuous time random walk (i.e. diffusion approximation) example.
220
+ Here the network in the JumpProblemNetwork is a function that returns a
221
+ network given the number of lattice sites.
222
+ u0 is a similar function that returns the initial condition vector.
223
+ """
224
+ prob_jump_diffnetwork = JumpProblemNetwork (getDiffNetwork, params, tf, getDiffu0, nothing , nothing )
0 commit comments