Example: ODE with timeseries data

In this example, we provide the PEtab and PEtab Select files for a model selection problem involving an ordinary differential equation (ODE) model and timeseries data. All files are available for download.

The ODE model

The model is describes the dynamics of two biochemical species: x1 and x2. There are three hypothetical reactions:

  1. import of x1 at a constant rate \(k_1\) (\(\varnothing \rightarrow x_1\)),

  2. conversion of x1 into x2 at rate \(k_2 x_1\) (\(x_1 \rightarrow x_2\)), and

  3. export of both species through their interaction at rate \(k_3 x_1 x_2\) (\(x_1 + x_2 \rightarrow \varnothing\)).

Assuming mass-action kinetics, the the ordinary differential equation (ODE) model is

\[\begin{split}\frac{\mathrm{d}x_1}{\mathrm{d}t} &= k_1 - k_2 x_1 - k_3 x_1 x_2, \\ \frac{\mathrm{d}x_2}{\mathrm{d}t} &= k_2 x_1 - k_3 x_1 x_2,\end{split}\]

where \(t\) is time. The initial condition is \(x_1(0) = x_2(0) = 0\).

Hence, the three hypothetical reactions are each controlled by a single parameter (\(k_1\), \(k_2\), or \(k_3\)) and the model selection problem is to identify the raections (parameters) that are sufficient to explain the data.

In the files, the model is encoded in SBML, named model.xml.

The data

The (synthetic) experiment was conducted by collecting measurements of \(x_2\) at six time points.

The PEtab measurement table is:

observableId

simulationConditionId

measurement

time

obs_x2

0

0

obs_x2

0.19421762

1

obs_x2

0.0484032

5

obs_x2

0.61288016

10

obs_x2

4.07930835

30

obs_x2

10.12008893

60

The observable model

As \(x_2\) is observed with measurement noise, we include a noise model.

The observable is

\[y_{\text{obs\_x2}} = x_2.\]

The measurements are assumed to be the observable plus some Gaussian-distributed noise:

\[\bar{y} = y_{\text{obs\_x2}} + \varepsilon, \qquad \varepsilon \sim \mathcal{N}(0, \sigma_{x2}^2),\]

where the Gaussian standard deviation \(\sigma_{x2}\) is an estimated parameted. This Gaussian noise model is what defines the likelihood that PEtab Select uses to compute model selection criteria.

The PEtab observable table is:

observableId

observableFormula

noiseFormula

obs_x2

x2

sigma_x2

The estimated parameters

Each of the estimated parameters are specified in the PEtab parameters table.

parameterId

parameterName

parameterScale

lowerBound

upperBound

nominalValue

estimate

k1

k_{1}

lin

0

1e3

0.2

1

k2

k_{2}

lin

0

1e3

0.1

1

k3

k_{3}

lin

0

1e3

0

1

sigma_x2

sigma_{x2}

lin

1e-5

1e3

0.15

1

This table is adapted by PEtab Select to represent the different models in the model space. For example, the model M1_0 in the model space table does not estimate \(k_2\) and instead sets it to 0. PEtab Select implements this by changing the nominalValue of k2 to 0, and turning off parameter estimation for k2 by setting estimate to 0.

The model selection problem

The PEtab parameter table (parameters.tsv) contains the rate constants \(k_1, k_2, k_3\) (and the noise parameter \(\sigma_{x2}\), which is always estimated).

The model selection problem is to determine which of the parameters \(k_1\), \(k_2\), and \(k_3\) should be estimated in order to explain the data well.

This is encoded in the model space file. Each row is a candidate model (a model subspace), and the columns k1, k2, k3 give the value each parameter takes: either a fixed value, or estimate to indicate that the parameter should be estimated.

model_subspace_id

model_subspace_petab_yaml

k1

k2

k3

M1_0

petab_problem.yaml

0

0

0

M1_1

petab_problem.yaml

0.2

0.1

estimate

M1_2

petab_problem.yaml

0.2

estimate

0

M1_3

petab_problem.yaml

estimate

0.1

0

M1_4

petab_problem.yaml

0.2

estimate

estimate

M1_5

petab_problem.yaml

estimate

0.1

estimate

M1_6

petab_problem.yaml

estimate

estimate

0

M1_7

petab_problem.yaml

estimate

estimate

estimate

For example, M1_0 fixes all three rate constants to 0 (in this model, this means the associated reactions are turn off), M1_7 estimates all three, and the middle rows encode models that estimate different subsets. When a parameter is not estimated, it is fixed to a value (e.g. k1 = 0.2, k2 = 0.1, k3 = 0).

In this example, we implement a single model per model subspace. A more concise definition of the model space is presented in Model selection with non-SBML models and unsupported calibration tools.

The PEtab Select problem YAML combines all files and remaining information required to define the model selection problem.

format_version: 1.0.0
criterion: AIC
method: forward
model_space_files:
- model_space.tsv
candidate_space_arguments: {}

Here, models are compared by the Akaike information criterion (AIC), and the model space is explored with the forward method — starting from the smallest model and iteratively adding estimated parameters as long as the AIC improves.