Skip to content

Commit 21f5a76

Browse files
authored
Merge pull request #23 from isaacsas/new-jump-problems
added jump examples used in benchmarking
2 parents 8036db6 + 29d5c1a commit 21f5a76

File tree

2 files changed

+61
-2
lines changed

2 files changed

+61
-2
lines changed

src/DiffEqProblemLibrary.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,6 @@ export prob_jump_dnarepressor, prob_jump_constproduct, prob_jump_nonlinrxs,
5151
# examples mixing mass action and constant rate jumps
5252
prob_jump_osc_mixed_jumptypes,
5353
# examples used in published benchmarks / comparisions
54-
prob_jump_multistate
54+
prob_jump_multistate, prob_jump_twentygenes, prob_jump_dnadimer_repressor
5555

5656
end # module

src/jump_premade_problems.jl

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ prob_jump_nonlinrxs = JumpProblemNetwork(rs, rates, tf, u0, prob, prob_data)
7373
"""
7474
Oscillatory system, uses a mixture of jump types.
7575
"""
76-
rs = @reaction_network rnType begin
76+
rs = @reaction_network rnoscType begin
7777
0.01, (X,Y,Z) --> 0
7878
hill(X,3.,100.,-4), 0 --> Y
7979
hill(Y,3.,100.,-4), 0 --> Z
@@ -141,3 +141,62 @@ tf = 100.
141141
prob = DiscreteProblem(u0, (0., tf), rates)
142142
prob_jump_multistate = JumpProblemNetwork(rs, rates, tf, u0, prob,
143143
Dict("specs_to_sym_name" => specs_sym_to_name, "rates_sym_to_idx" => rates_sym_to_idx, "params" => params))
144+
145+
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+
# generate the network
152+
N = 10 # number of genes
153+
genenetwork = "@reaction_network twentgtype begin\n"
154+
for i in 1:N
155+
genenetwork *= "\t 10.0, G$(2*i-1) --> G$(2*i-1) + M$(2*i-1)\n"
156+
genenetwork *= "\t 10.0, M$(2*i-1) --> M$(2*i-1) + P$(2*i-1)\n"
157+
genenetwork *= "\t 1.0, M$(2*i-1) --> 0\n"
158+
genenetwork *= "\t 1.0, P$(2*i-1) --> 0\n"
159+
160+
genenetwork *= "\t 5.0, G$(2*i) --> G$(2*i) + M$(2*i)\n"
161+
genenetwork *= "\t 5.0, M$(2*i) --> M$(2*i) + P$(2*i)\n"
162+
genenetwork *= "\t 1.0, M$(2*i) --> 0\n"
163+
genenetwork *= "\t 1.0, P$(2*i) --> 0\n"
164+
165+
genenetwork *= "\t 0.0001, G$(2*i) + P$(2*i-1) --> G$(2*i)_ind \n"
166+
genenetwork *= "\t 100., G$(2*i)_ind --> G$(2*i)_ind + M$(2*i)\n"
167+
end
168+
genenetwork *= "end"
169+
rs = eval( parse(genenetwork) )
170+
u0 = zeros(Int, length(rs.syms))
171+
for i = 1:(2*N)
172+
u0[findfirst(rs.syms, Symbol("G$(i)"))] = 1
173+
end
174+
tf = 2000.0
175+
prob = DiscreteProblem(u0, (0.0, tf))
176+
prob_jump_twentygenes = JumpProblemNetwork(rs, nothing, tf, u0, prob, nothing)
177+
178+
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+
rn = @reaction_network gnrdtype begin
186+
c1, G --> G + M
187+
c2, M --> M + P
188+
c3, M --> 0
189+
c4, P --> 0
190+
c5, 2P --> P2
191+
c6, P2 --> 2P
192+
c7, P2 + G --> P2G
193+
c8, P2G --> P2 + G
194+
end c1 c2 c3 c4 c5 c6 c7 c8
195+
rnpar = [.09, .05, .001, .0009, .00001, .0005, .005, .9]
196+
varlabels = ["G", "M", "P", "P2","P2G"]
197+
u0 = [1000, 0, 0, 0,0]
198+
tf = 4000.
199+
prob = DiscreteProblem(u0, (0.0, tf), rnpar)
200+
prob_jump_dnadimer_repressor = JumpProblemNetwork(rn, rnpar, tf, u0, prob,
201+
Dict("specs_names" => varlabels))
202+

0 commit comments

Comments
 (0)