You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Within `dMod`, models are typically defined in a tabular or by a sequence of `addReaction` commands. The model for the JAK-STAT pathway is saved in a file `topology.csv` which is imported into R and converted to an equation list.
35
+
Within `dMod`, models are typically defined in a tabular or by a sequence of `addReaction` commands. The model for the JAK-STAT pathway is defined reaction by reaction in the following code chunk.
37
36
38
37
```{r}
39
38
# Generate the ODE model
40
-
reactions <- as.eqnlist(read.csv("topology.csv"))
41
-
print(reactions)
39
+
r <- NULL
40
+
r <- addReaction(r, "STAT", "pSTAT", "p1*pEpoR*STAT", "STAT phosphoyrl.")
41
+
r <- addReaction(r, "2*pSTAT", "pSTATdimer", "p2*pSTAT^2", "pSTAT dimerization")
42
+
r <- addReaction(r, "pSTATdimer", "npSTATdimer", "p3*pSTATdimer", "pSTAT dimer import")
43
+
r <- addReaction(r, "npSTATdimer", "2*nSTAT", "p4*npSTATdimer", "dimer dissociation")
44
+
r <- addReaction(r, "nSTAT", "STAT", "p5*nSTAT", "nuclear export")
45
+
46
+
print(r)
42
47
```
43
48
44
49
The first reaction contains the phosphorylated Epo-receptor which is not modeled mechanistically but should be replaced by an algebraic function that can describe the activation of the receptor. Therefore, we replace `pEpoR` in the rates:
Next, the equation list representing the ODE is translated into the ODE model `model0`. The function calls `as.eqnvec()` to generate the vector of (ordinary differential) equations, translates them into C code, derives sensitivity equations, etc. Integrating sensitivity equations can increase the integration time. Therefore, it is recommended to tell `odemodel()` which of the parameters will take fixed values and will not be estimated based on experimental data.
To predict the observables, observation and prediction function need to be concatenated. What mathematically looks like $(g\circ x)(t, p)$ is translated into code using the `*` operator.
99
101
100
102
```{r, fig.width = 6, fig.height = 2.5}
101
103
# Make a prediction of the observables based on random parameter values
pars <- structure(runif(length(parameters), 0, 1), names = parameters)
104
106
times <- seq(0, 10, len = 100)
105
107
prediction <- (g*x)(times, pars)
@@ -111,15 +113,14 @@ plot(prediction)
111
113
Parameter transformations can for example be used to fix initial values or perform a log-transform. The basic object is again an equation vector containing the equations which express the inner model parameters as functions of other parameters. The names of the other parameters can coincide with the inner parameters.
0 commit comments