1
- """
1
+ using DiffEqBase, DiffEqBiological
2
+ # Jump Example Problems
3
+ export prob_jump_dnarepressor, prob_jump_constproduct, prob_jump_nonlinrxs,
4
+ # examples mixing mass action and constant rate jumps
5
+ prob_jump_osc_mixed_jumptypes,
6
+ # examples used in published benchmarks / comparisions
7
+ prob_jump_multistate, prob_jump_twentygenes, prob_jump_dnadimer_repressor,
8
+ # examples approximating diffusion by continuous time random walks
9
+ prob_jump_diffnetwork
10
+
11
+ """
2
12
General structure to hold JumpProblem info. Needed since
3
- the JumpProblem constructor requires the algorithm, so we
13
+ the JumpProblem constructor requires the algorithm, so we
4
14
don't create the JumpProblem here.
5
15
"""
6
- struct JumpProblemNetwork
16
+ struct JumpProblemNetwork
7
17
network # DiffEqBiological network
8
18
rates # vector of rate constants or nothing
9
19
tstop # time to end simulation
@@ -28,7 +38,7 @@ Nsims = 8000
28
38
expected_avg = 5.926553750000000e+02
29
39
prob_data = Dict (" num_sims_for_mean" => Nsims, " expected_mean" => expected_avg)
30
40
"""
31
- DNA negative feedback autoregulatory model. Protein acts as repressor.
41
+ DNA negative feedback autoregulatory model. Protein acts as repressor.
32
42
"""
33
43
prob_jump_dnarepressor = JumpProblemNetwork (dna_rs, rates, tf, u0, prob, prob_data)
34
44
@@ -50,7 +60,7 @@ prob_jump_constproduct = JumpProblemNetwork(bd_rs, rates, tf, u0, prob, prob_dat
50
60
51
61
nonlin_rs = @reaction_network dtype begin
52
62
k1, 2 A --> B
53
- k2, B --> 2 A
63
+ k2, B --> 2 A
54
64
k3, A + B --> C
55
65
k4, C --> A + B
56
66
k5, 3 C --> 3 A
@@ -132,12 +142,12 @@ u0[ findfirst(rs.syms, :S3) ] = params[3]
132
142
tf = 100.
133
143
prob = DiscreteProblem (u0, (0. , tf), rates)
134
144
"""
135
- Multistate model from Gupta and Mendes,
145
+ Multistate model from Gupta and Mendes,
136
146
"An Overview of Network-Based and -Free Approaches for Stochastic Simulation of Biochemical Systems",
137
147
Computation 2018, 6, 9; doi:10.3390/computation6010009
138
148
Translated from supplementary data file: Models/Multi-state/fixed_multistate.xml
139
149
"""
140
- prob_jump_multistate = JumpProblemNetwork (rs, rates, tf, u0, prob,
150
+ prob_jump_multistate = JumpProblemNetwork (rs, rates, tf, u0, prob,
141
151
Dict (" specs_to_sym_name" => specs_sym_to_name, " rates_sym_to_idx" => rates_sym_to_idx, " params" => params))
142
152
143
153
@@ -162,14 +172,14 @@ genenetwork *= "end"
162
172
rs = eval ( parse (genenetwork) )
163
173
u0 = zeros (Int, length (rs. syms))
164
174
for i = 1 : (2 * N)
165
- u0[findfirst (rs. syms, Symbol (" G$(i) " ))] = 1
175
+ u0[findfirst (rs. syms, Symbol (" G$(i) " ))] = 1
166
176
end
167
177
tf = 2000.0
168
178
prob = DiscreteProblem (u0, (0.0 , tf))
169
179
"""
170
- Twenty-gene model from McCollum et al,
180
+ Twenty-gene model from McCollum et al,
171
181
"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).
182
+ Comp. Bio. and Chem., 30, pg. 39-49 (2006).
173
183
"""
174
184
prob_jump_twentygenes = JumpProblemNetwork (rs, nothing , tf, u0, prob, nothing )
175
185
@@ -191,11 +201,11 @@ tf = 4000.
191
201
prob = DiscreteProblem (u0, (0.0 , tf), rnpar)
192
202
"""
193
203
Negative feedback autoregulatory gene expression model. Dimer is the repressor.
194
- Taken from Marchetti, Priami and Thanh,
195
- "Simulation Algorithms for Comptuational Systems Biology",
204
+ Taken from Marchetti, Priami and Thanh,
205
+ "Simulation Algorithms for Comptuational Systems Biology",
196
206
Springer (2017).
197
207
"""
198
- prob_jump_dnadimer_repressor = JumpProblemNetwork (rn, rnpar, tf, u0, prob,
208
+ prob_jump_dnadimer_repressor = JumpProblemNetwork (rn, rnpar, tf, u0, prob,
199
209
Dict (" specs_names" => varlabels))
200
210
201
211
217
227
tf = 10.
218
228
"""
219
229
Continuous time random walk (i.e. diffusion approximation) example.
220
- Here the network in the JumpProblemNetwork is a function that returns a
230
+ Here the network in the JumpProblemNetwork is a function that returns a
221
231
network given the number of lattice sites.
222
232
u0 is a similar function that returns the initial condition vector.
223
233
"""
0 commit comments