admiral

The dplyr for the pharmaceutical industry?

Stefan Thoma
Edoardo Mancini

2024-10-28

Another side to “Big Pharma”?

What is ADaM, and why {admiral}?

  • In 2016 CDISC introduced the Analysis Data Model (ADaM). This is a therapeutic-area-agnostic set of guidelines for clinical trial dataset structure.
  • ADaM lends itself to a modular tool for dataset generation.

{admiral}

  • Modular functions extending dplyr, and manuals and templates
    • Core functionality that can be extended to specific therapeutic areas
    • Specific to very standardized data and processes
  • Created by users for users

{admiral} code example

adae_dates <- ae %>%
  # join ADSL to AE
  derive_vars_merged(
    dataset_add = adsl,
    new_vars = adsl_derv_vars,
    by_vars = get_admiral_option("subject_keys")
  ) %>%
  # analysis end date/time (AENDTM), imputation flags (AENDTF/AENTMF)
  slice_derivation(
    derivation = derive_vars_dtm,
    args = params(
      dtc = AEENDTC,
      new_vars_prefix = "AEN",
      date_imputation = "last",
      time_imputation = "last",
      preserve = TRUE
    ),
    derivation_slice(
      filter = AEOUT == "FATAL",
      args = params(
        highest_imputation = "Y",
        max_dates = exprs(DTHDT)
      )
    ),
    derivation_slice(
      filter = TRUE,
      args = params(
        highest_imputation = "M",
        max_dates = NULL
      )
    )
  )

{admiral} code example

adae_dates <- ae %>%
  # join ADSL to AE
  derive_vars_merged(
    dataset_add = adsl,
    new_vars = adsl_derv_vars,
    by_vars = get_admiral_option("subject_keys")
  ) %>%
  # analysis end date/time (AENDTM), imputation flags (AENDTF/AENTMF)
  slice_derivation(
    derivation = derive_vars_dtm,
    args = params(
      dtc = AEENDTC,
      new_vars_prefix = "AEN",
      date_imputation = "last",
      time_imputation = "last",
      preserve = TRUE
    ),
    derivation_slice(
      filter = AEOUT == "FATAL",
      args = params(
        highest_imputation = "Y",
        max_dates = exprs(DTHDT)
      )
    ),
    derivation_slice(
      filter = TRUE,
      args = params(
        highest_imputation = "M",
        max_dates = NULL
      )
    )
  )

Goal of {admiral}

  • Establish {admiral} workflow as the standard for ADaM creation by …

    • building trust in {admiral}
    • encouraging R adoption across the industry
  • 15 pharma/biotech companies are already using {admiral}

  • Part of overall effort to have an open source workflow for clinical data science, what we call the pharmaverse

Building trust

  • Started as a collaboration of GSK and Roche
    • Permissive license, free to use for anyone
    • Commitment and funding from both Roche and GSK makes it hard to ignore
    • Hard for either company to monetize
    • Ensures that the package stays open source and free to use
    • Maintenance
  • Open source from the start
  • Involve community early on
    • Serve the needs of many, not just of one company

Extension packages

  • Same user “feel” & language
  • Same development practices
  • Compatible modularity
  • Stability and trust
    • Below par {admiral} extension package harms reputation of {admiral}
    • Less trust means fewer users and less adoption of open source in the industry

Setting them up for success

  • Instructions
    • {admiraldev} rules & templates
    • Git Structure & CICD
    • One core member representative
  • Expectation management:
    • Small scope!
    • Effort required
    • Assigned FTE

A success story: {admiralvaccine}

  • The COVID-19 pandemic was a worldwide catastrophe, but it was also an opportunity to collaborate further within pharma…
  • … Enter {admiralvaccine}!

{admiral}: Looking ahead

Training models on {admiral} documentation: could genAI be the next frontier?

Q&A and resources