Simulating clinical trials for model-informed precision dosing: Using warfarin treatment as a use case
This GitHub repository serves as documentation and reproduction source for the results published in Frontiers in Pharmacology, 14, 1270443. It contains the raw data, the data derived during the analysis, the model specifications (SBML format) and executable scripts (Python scripts as well as Jupyter notebooks).
The results are documented by multiple notebooks. To open the notebooks, please follow the links below:
To inspect the scripts used to generate data, implement models and to estimate model parameters, please follow the links below:
Clinical dataset published by Warfarin Consortium (March 2008):
Simulated measurements:
- Clinical trial phase I [Data-generating script]
- Clinical trial phase II [Data-generating script]
- Clinical trial phase III [Data-generating script]
- MIPD trial cohort [Data-generating script]
- MIPD trial results: Regression model [Data-generating script]
- MIPD trial results: Deep RL model [Data-generating script]
- MIPD trial results: PKPD model [Data-generating script]
- Warfarin clinical trial model [SBML file (in vivo model)] [SBML file (INR test model)] [Parameters]
- Regression model [Training script] [Model weights]
- Deep RL model [Training script] [Model weights]
- PKPD model [SBML file] [Inference script (CTI)] [Inference script (CTII)] [Inference script (CTIII)] [Posterior distribution]
Scripts used in all MIPD trial simulations:
Scripts specific to the different MIPD models:
To reproduce the results, the GitHub repository can be cloned, and the scripts
can be executed locally. For ease of execution, we prepared a Makefile
that
runs the scripts in the correct order. Please find a step-by-step instruction
how to install the dependencies and how to reproduce the results, once the
repostory has been cloned.
- 1.1 Install CVODE (myokit uses CVODE to solve ODEs)
For Ubuntu:
apt-get update && apt-get install libsundials-dev
For MacOS:
brew update-reset && brew install sundials
For Windows: No action required. Myokit installs CVODE automatically.
- 1.2 Install Python dependencies
pip install -r requirements.txt
You can reproduce the results using the Makefile. First install nbconvert
which helps to execute the notebooks from the terminal
pip install nbconvert
You can now reproduce all data and figures in the article using
make all
This may take a while (hours to days), because you are re-running all scripts sequentially.
To reproduce only the plots from the existing data you can run
make run_mipd_trial_deep_rl_model
You can also run each script individually, but be aware that some scripts are dependent on the data derived in other scripts.