Skip to content

Latest commit

 

History

History
113 lines (93 loc) · 6.87 KB

README.md

File metadata and controls

113 lines (93 loc) · 6.87 KB

Integrating Pharmacokinetics and Quantitative Systems Pharmacology Approaches in Generative Drug Design

This repository contains the code used to generate the data and figures for the manuscript "Integrating Pharmacokinetics and Quantitative Systems Pharmacology Approaches in Generative Drug Design" by Helle W. van den Maagdenberg, Jikke de Mol van Otterloo, J.G. Coen van Hasselt, Piet H. van der Graaf, and Gerard J.P. van Westen

Installation

The python code was run with Python 3.10.14. To install the required packages, run the following command:

pip install -r requirements.txt

The R code was run with R version 4.4.0. To install the required packages, run the following command:

install.packages(c("psych", "gridExtra", "cowplot", "lubridate", "forcats", "stringr",
"purr", "readr", "tidyr", "tibble", "tidyverse", "dplyr", "data.table", "ggpubr",
"ggplot2", "rxode2"))

Usage

Required data

The following data is required to run the scripts:

Note. Papyrus dataset for A2AR QSAR model is automatically downloaded by the script 01_data_creation.py in the 01_A2ARDataset folder.

Running the scripts

After downloading the required data a config.json file should be created to specify the paths to the data directories. The config.json should have the following structure:

{
    "BASE_DIR": "path/to/root/directory",
    "RAW_DATA_DIR": "01_raw",
    "PROCESSED_DATA_DIR": "02_processed",
    "FIGURES_DIR": "03_figures",
}

Where the raw data directory contains the downloaded data. The processed data directory will contain data generated by the scripts and the figures directory will contain the generated figures.

Each python script has a command line interface to specify the path to the config.json file and other parameters. To see the available options run the script with the --help flag. For example:

python 01_A2ARDataset/01_dataset_creation.py --help

All scripts have the --config_file flag to specify the path to the config.json file. For example:

python 01_A2ARDataset/01_dataset_creation.py --config_file path/to/config.json

In the R scripts, the path to the config.json should be specified in the config variable near the beginning of the script. For example:

config <- jsonlite::fromJSON("../config.json") # set to the location of the config file

The scripts should be run in numerical order to generate the data and figures.

Structure

The data was generated with the following scripts:

01_A2ARDataset

Downloading and preprocessing the A2AR dataset:

  • 01_data_creation.py: Download the A2AR dataset from Papyrus, filters and saves the dataset
  • 02_dataset_figures.ipynb: Generate the figures for the A2AR dataset

02_PKDataset

Preprocessing the PK dataset:

  • 01_data_creation.py: Preprocess the Lombardo, et al. 2018 dataset and save the dataset
  • 02_dataset_figures.ipynb: Generate the figures for the PK dataset

03_QSPR

Preparing datasets for modelling, training and evaluating the QSPR models:

  • 01_dataset_preparation.py: Prepare datasets for QSPR models by transforming the target properties and calculating and filtering features.
  • 02_hyperparameter_optimization.py: Perform grid search over different descriptors, filters, algorithms, and hyperparameters to find the best model. Adds best model and data name to config file.
  • 03_model_training.py: Train models with the best hyperparameters found in the grid search and peform bootstrapping to evaluate the model and applicability domain. Also, calculates permutation importance.
  • 04_model_figures.ipynb: Generate the figures for the QSPR models.

04_DNDD

Performs fine-tuning, grid search, and training and evaluation of the DNDD models:

  • _drugex_environment.py: Contains the environment for the DrugEx model.
  • 01_finetuning.py: Finetunes pre-trained models on the respective A2AR or PK dataset.
  • 02_grid_search.py: Performs grid search over different hyperparameters to find the best model on the task of maximizing A2AR affinity and the FU (unbound fraction).
  • 03_reinforcement_learning.py: Trains the DNDD model with the best hyperparameters found in the grid search for each optimization task.
  • 04_generate.py: Generates compounds with the trained DNDD model.
  • 05_make_umaps.py: Calculates UMAP coordinates for the generated compounds.
  • 06_grid_search_figures.ipynb: Generate the figures for the grid search.
  • 07_dndd_figures.ipynb: Generate the figures for the DNDD models.

05_QSP_modelling

Recreating the simulations from Voronova et al., 2021 and simulating the generated compounds:

  • models/: Contains the RxODE models for the simulations.
    • TME_model_voronova_rewrite.R: The model from Voronova et al., 2021. in RxODE format.
    • TME_model_1comp.R: The Voronova model adapted for simulations with generated compounds.
  • 01_RxODE_voronova_rewrite.R: Recreates the simulations from Voronova et al., 2021.
  • 02_example_simulations.R: Simulates tumor growth for four example compounds.
  • 03_simulations_generated_compounds.R: Simulates tumor growth for the generated compounds.

Paper figures and tables

The figures and tables are generated with the following notebooks:

  • 01_A2ARDataset/02_dataset_figures.ipynb: Supplementary Figure S1
  • 02_PKDataset/02_dataset_figures.ipynb: Supplementary Figure S2 and S8
  • 03_QSPR/04_model_figures.ipynb: Figure 2 and 3, Supplementary Table S2, and Supplementary Figure S3
  • 04_DNDD/06_grid_search_figures.ipynb: Supplementary Table S3
  • 04_DNDD/07_dndd_figures.ipynb: Figure 4, 5, 6, 7, Table 2, Supplementary Table S1, and Supplementary Figure S5, S6 and S7
  • 05_QSP_modelling/02_example_sims.ipynb: Figure 8B
  • 05_QSP_modelling/03_simulations_generated_compounds.R: Figure 8C

References

  • Lombardo, F., Berellini, G., & Obach, R. S. (2018). Trend Analysis of a Database of Intravenous Pharmacokinetic Parameters in Humans for 1352 Drug Compounds. Drug Metabolism and Disposition, 46(11), 1466–1477. https://doi.org/10.1124/dmd.118.082966
  • Voronova, V., Peskov, K., Kosinsky, Y., Helmlinger, G., Chu, L., Borodovsky, A., Woessner, R., Sachsenmeier, K., Shao, W., Kumar, R., Pouliot, G., Merchant, M., Kimko, H., & Mugundu, G. (2021). Evaluation of Combination Strategies for the A2AR Inhibitor AZD4635 Across Tumor Microenvironment Conditions via a Systems Pharmacology Model. Frontiers in Immunology, 12, 617316. https://doi.org/10.3389/fimmu.2021.617316