Skip to content

esqLABS/cts

Repository files navigation

cts

The {cts} (Contraceptives DDI Trial Simulation Platform) package provides a comprehensive R-based framework for designing and simulating drug-drug interactions (DDI) involving contraceptive drugs using physiologically based pharmacokinetic (PBPK) models. This package allows researchers to conduct in silico DDI simulations programmatically, enabling more automated and reproducible workflows. This is particularly useful for performing batch simulations, and integrating DDI modeling into larger R-based data analysis pipelines, thus enhancing flexibility and efficiency in model development and simulation.

Key Features

  • Import and Explore Compound Models: Retrieve compound models snapshots from the OSP model library, a URL, or a local file in JSON format.
  • Simulate DDIs: Design and run DDI simulations between compounds, specifying dosing protocols, individual characteristics, and other simulation parameters.
  • Analyze Results: In addition to simulation results, this packages provides an immediate and first glance at the data by providing basic plots and tables.
  • Seamless Integration: Supports the export of simulation snapshots compatible with PK-Sim, enabling further configuration, exploration and analysis.

Installation

You can install the development version of cts from GitHub with:

# install.packages("pak")
pak::pak("esqLABS/cts")

Get Started

The {cts} package offers a streamlined workflow for drug-drug interaction (DDI) simulations. Here’s a quick overview of the main steps:

1. Import Compound Models

library(cts)

# List available compounds in the OSP model library
list_compounds()

# Import compounds from the OSP model library
rifampicin <- compound("Rifampicin")
midazolam <- compound("Midazolam")

# Alternatively, import from URL or local file
# compound("https://raw.githubusercontent.com/Open-Systems-Pharmacology/Alfentanil-Model/v2.2/Alfentanil-Model.json")
# compound("path/to/Alfentanil-Model.json")

2. Create a DDI Project

# Create a DDI project with victim and perpetrator compounds
myDDI <- create_ddi(
  victim = rifampicin, 
  midazolam,
  options = list(
    create_ddi_simulation = TRUE  # Automatically create a generic simulation
  )
)

3. Run Simulations and Analyze Results

# Run simulations
results <- run_ddi(myDDI)

# Calculate PK parameters
pk_analysis <- run_pk_analysis(myDDI)

# Generate plots
plots <- plot_ddi_results(myDDI)

# View a specific plot
plots$`Generic DDI simulation`

4. Export for Further Analysis

# Export the DDI project to a JSON file for use in PK-Sim
export_ddi(myDDI, "path/to/Rifampicin-Midazolam-DDI.json")

Learn More

For detailed information on using the {cts} package, please refer to the vignettes:

# Browse all vignettes
vignette(package = "cts")

# View a specific vignette
vignette("working-with-compounds", package = "cts")
vignette("create-building-blocks", package = "cts")
vignette("simulations", package = "cts")
vignette("creating-ddi-projects", package = "cts")

About

Clinical Trial Simulator for DDI for Contraceptives

Topics

Resources

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors