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+ """
212 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
414 don't create the JumpProblem here.
515"""
6- struct JumpProblemNetwork
16+ struct JumpProblemNetwork
717 network # DiffEqBiological network
818 rates # vector of rate constants or nothing
919 tstop # time to end simulation
@@ -28,7 +38,7 @@ Nsims = 8000
2838expected_avg = 5.926553750000000e+02
2939prob_data = Dict (" num_sims_for_mean" => Nsims, " expected_mean" => expected_avg)
3040"""
31- DNA negative feedback autoregulatory model. Protein acts as repressor.
41+ DNA negative feedback autoregulatory model. Protein acts as repressor.
3242"""
3343prob_jump_dnarepressor = JumpProblemNetwork (dna_rs, rates, tf, u0, prob, prob_data)
3444
@@ -50,7 +60,7 @@ prob_jump_constproduct = JumpProblemNetwork(bd_rs, rates, tf, u0, prob, prob_dat
5060
5161nonlin_rs = @reaction_network dtype begin
5262 k1, 2 A --> B
53- k2, B --> 2 A
63+ k2, B --> 2 A
5464 k3, A + B --> C
5565 k4, C --> A + B
5666 k5, 3 C --> 3 A
@@ -132,12 +142,12 @@ u0[ findfirst(rs.syms, :S3) ] = params[3]
132142tf = 100.
133143prob = DiscreteProblem (u0, (0. , tf), rates)
134144"""
135- Multistate model from Gupta and Mendes,
145+ Multistate model from Gupta and Mendes,
136146 "An Overview of Network-Based and -Free Approaches for Stochastic Simulation of Biochemical Systems",
137147 Computation 2018, 6, 9; doi:10.3390/computation6010009
138148 Translated from supplementary data file: Models/Multi-state/fixed_multistate.xml
139149"""
140- prob_jump_multistate = JumpProblemNetwork (rs, rates, tf, u0, prob,
150+ prob_jump_multistate = JumpProblemNetwork (rs, rates, tf, u0, prob,
141151 Dict (" specs_to_sym_name" => specs_sym_to_name, " rates_sym_to_idx" => rates_sym_to_idx, " params" => params))
142152
143153
@@ -162,14 +172,14 @@ genenetwork *= "end"
162172rs = eval ( parse (genenetwork) )
163173u0 = zeros (Int, length (rs. syms))
164174for i = 1 : (2 * N)
165- u0[findfirst (rs. syms, Symbol (" G$(i) " ))] = 1
175+ u0[findfirst (rs. syms, Symbol (" G$(i) " ))] = 1
166176end
167177tf = 2000.0
168178prob = DiscreteProblem (u0, (0.0 , tf))
169179"""
170- Twenty-gene model from McCollum et al,
180+ Twenty-gene model from McCollum et al,
171181 "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).
173183"""
174184prob_jump_twentygenes = JumpProblemNetwork (rs, nothing , tf, u0, prob, nothing )
175185
@@ -191,11 +201,11 @@ tf = 4000.
191201prob = DiscreteProblem (u0, (0.0 , tf), rnpar)
192202"""
193203 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",
196206 Springer (2017).
197207"""
198- prob_jump_dnadimer_repressor = JumpProblemNetwork (rn, rnpar, tf, u0, prob,
208+ prob_jump_dnadimer_repressor = JumpProblemNetwork (rn, rnpar, tf, u0, prob,
199209 Dict (" specs_names" => varlabels))
200210
201211
217227tf = 10.
218228"""
219229 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
221231 network given the number of lattice sites.
222232 u0 is a similar function that returns the initial condition vector.
223233"""
0 commit comments