Description Usage Format Simulation Source Examples
This PDMP models a gene regulation mechanism similar to
genePolyF
, where we have one gene and a positive feedback loop.
The difference is that in both discrete states transcription takes place, but
with different rates a_0, a_1, where a_0 < a_1. Transcription and
translation are considered as one step and are not modeled separately. In
PROM, this model is referred to as Model BF+, therefore it is named
genePdmpBF
and genePolyBF
here.
1 2 3 |
genePdmpBF
is an object of class pdmpModel
,
genePolyBF
is an object of class polyPdmpModel
.
The simulations in PROM were done with slot times
set to
from = 0, to = 1000, by = 0.1.
The following parameter sets were simulated:
k01 = 0.02, k10 = 0.02, a = 1, b = 0.2
k01 = 0.02, k10 = 0.02, a = 7, b = 0.2
The parameter values do not rely on real data.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | library(spray)
#------ code to generate the pdmpModel version -----
genePdmpBF <- new("pdmpModel",
descr = "Model BF: positive feedback with basal transcription",
parms = list(b = 0.5, a0 = 1, a1 = 3, k10 = 1, k01 = 0.5),
init = c(f = 1, d = 1),
discStates = list(d = 0:1),
dynfunc = function(t, x, parms) {
df <- with(as.list(c(x, parms)), {
switch(d+1, a0 - b*f, a1 - b*f)
})
return(c(df, 0))
},
ratefunc = function(t, x, parms) {
return(with(as.list(c(x, parms)), switch(d + 1, k01*f, k10)))
},
jumpfunc = function(t, x, parms, jtype) {
c(x[1], 1 - x[2])
},
times = c(from = 0, to = 100, by = 0.1),
solver = "lsodar")
#------ code to generate the polyPdmpModel version -----
genePolyBF <- new("polyPdmpModel",
descr = "Model BF: pos. feedback with basal transcription (polynomial version)",
parms = list(b = 0.5, a0 = 1, a1 = 3, k10 = 1, k01 = 0.5),
init = c(f = 1, d = 1),
discStates = list(d = 0:1),
dynpolys = quote(list(
list(overall = -b*lone(1,2),
specific = list(a0, a1))
)),
ratepolys = quote(list(
list(k01*lone(1,2), k10)
)),
jumpfunc = function(t, x, parms, jtype) {
c(x[1], 1 - x[2])
},
times = c(from = 0, to = 100, by = 0.1),
solver = "lsodar")
#------- comparison of the models --------------
identical(sim(genePdmpBF, outSlot = FALSE, seed = 20),
sim(genePolyBF, outSlot = FALSE, seed = 20))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.