'teal' Modules for Hy's Law Monitoring and Evaluation of Drug-Induced Serious Hepatotoxicity (eDISH) Plots

Provides open-source 'teal' modules and reusable builders for exploratory monitoring of Hy's Law (Hyman Zimmerman's observation that hepatocellular injury with jaundice predicts severe drug-induced liver injury) from Clinical Data Interchange Standards Consortium (CDISC) Analysis Data Model (ADaM) subject-level analysis dataset (ADSL) and laboratory analysis dataset (ADLB) records. Peak evaluation of Drug-Induced Serious Hepatotoxicity (eDISH), modified evaluation of Drug-Induced Serious Hepatotoxicity (mDISH; on-treatment peaks divided by baseline), and cholestatic screening plots are produced, and concurrent alanine aminotransferase (ALT) or aspartate aminotransferase (AST) plus bilirubin elevations, with optional alkaline phosphatase (ALP) exclusion, are classified without a study-specific drug-induced liver injury analysis dataset (ADDILI). Table and plot builders can be called without launching 'shiny'. Hy's Law and eDISH criteria are discussed by Temple (2006) , the United States Food and Drug Administration (2009) "Drug-Induced Liver Injury: Premarketing Clinical Evaluation" < https://www.fda.gov/media/116737/download>, and Watkins et al. (2011) . Baseline-scaled mDISH plots follow the fold-baseline display in Lin et al. (2012) .


tm.hyslaw

R-CMD-check pkgdown

Teal modules and reusable builders for exploratory Hy's Law monitoring from CDISC ADaM-style ADSL + ADLB.

This is a review aid, not a submission TFL. It does not implement alternative-cause exclusion (pre-existing liver disease, obstruction, alcohol). Admiral ADLBHY derives ADaM flags; dv.edish and hep-explorer are interactive eDISH apps on other stacks. This package sits in between: table/plot builders with no Shiny, plus optional teal modules.

Peak eDISH maxima are not the same as biochemical potential Hy's Law. The scatter uses on-treatment peaks that need not occur on the same day. Red open circles mark concurrent-window cases (optional ALP exclusion). Study-specific ADDILI is not an input; the package documents the ADLB algorithm instead.

Design rule

Layer What it answers Default
Peak eDISH On-treatment max ALT or AST / ULN vs max BILI / ULN (may be different days) Lines at 3x and 2x ULN; operator >=
mDISH Same peaks divided by baseline Same 3x / 2x cuts on the baseline scale
Cholestatic screen Peak ALP / ULN vs peak BILI / ULN Lines at 2x and 2x ULN
Concurrent Hy's Law BILI meeting the bilirubin cut on or after ALT/AST meeting the AT cut window_days = 14 (admiral vignette)
ALP exclusion Concurrent cases with ALP meeting the ALP cut in the same window On; set exclude_alp = FALSE to turn off
Threshold operator >= (package default) vs > (FDA 2009 / many CSR shells) compare = ">="

Peak eDISH can look like Hy's Law when the two peaks are weeks apart. Concurrent-window classification is the monitoring rule. window_days = 7 or 30 can match a SAP. Missing ALP is not imputed.

Install and run

# from the package root
pkgload::load_all()
shiny::runApp("app.R")

Or call the builders without Shiny:

library(tm.hyslaw)

data <- make_synthetic_hyslaw_data()
classified <- classify_hyslaw(data$ADSL, data$ADLB)
build_hyslaw_table(classified = classified)
build_liver_elevation_table(classified = classified)
plot_edish(classified = classified)
plot_edish(classified = classified, which = "mdish")
plot_edish(classified = classified, which = "cholestatic")
hyslaw_listing(classified = classified)

Teal column selectors

tm_g_edish() and tm_t_hyslaw() choose the treatment column and the population flag with teal.picks::variables() on ADSL. Both selectors are a single column (multiple = FALSE). Defaults are TRT01A and SAFFL. The control shows each column's label from the data.

population_value stays "Y" and is not a selector. Window, threshold operator, plot type, color, facet, and the checkboxes are unchanged.

A named character vector can still be passed as group_vars or population_choices. That form warns and is converted to teal.picks::variables(choices, selected).

What is calculated

Always (subject-level):

  • On-treatment peak ALT / ULN, AST / ULN, ALT or AST / ULN, BILI / ULN, ALP / ULN
  • Baseline peaks and peak / baseline (mDISH) when ABLFL or ADY <= 0 is present
  • eDISH quadrant: Hy's Law, Temple's corollary, Cholestasis, or Normal or near normal
  • Cholestatic ALP-vs-BILI quadrant
  • Concurrent Hy's Law flag and dates; concurrent cholestatic flag
  • ALP-elevated-in-window, missing-ALP, potential Hy's Law after optional ALP exclusion
  • R-ratio and hepatocellular / mixed / cholestatic pattern

The default summary table has two sections: four peak-quadrant counts (ST&F-style maximal abnormalities) and biochemical concurrent counts. build_liver_elevation_table() adds nested 3/5/10/20x and 1.5/2x elevations plus the combination row split by ALP. The listing adds R-ratio; symptoms and alternative causes are not in ADLB and are not filled.

Data dependencies

Dataset Required Recommended
ADSL USUBJID, arm/group (e.g. TRT01A) SAFFL, ITTFL
ADLB USUBJID, PARAMCD, AVAL, ULN (ANRHI or Pilot A1HI) ADT / ADY, ONTRTFL, ABLFL, ALP or ALKPH

PARAMCD values: ALT, AST, BILI, and ALP (ALKPH is accepted). Study-specific ADDILI is not required.

Demo / test data

Unit tests use synthetic ADLB so all four quadrants and the peak-vs-window distinction are guaranteed. Alzheimer / Xanomeline public studies rarely contain true Hy's Law cases.

Public ADaM is for integration tests and the demo app only (exploratory; attribute to the data owner; not a submission TFL):

  1. pharmaverseadam adsl + adlb (demo preferred)
  2. CDISC Pilot 01 adsl.xpt + adlbc.xpt via source("data-raw/process_data.R") (gitignored XPTs)
  3. random.cdisc.data when available as a Suggests fallback in other packages; this demo prefers synthetic if public data are missing

pharmaverseadam::adlbhy can be compared as an admiral-derived HYSLAW parameter. Counts are not required to match this package.

Development quality gates

This repository is set up for the standard R package release loop:

devtools::document()
testthat::test_local()
devtools::check(error_on = "never")
pkgdown::build_site()

GitHub Actions runs R CMD check on Ubuntu with the current release of R for pushes to main and for pull requests into main. Suggested packages on CRAN are installed, so a missing Suggests dependency fails the check. A separate pkgdown workflow builds the reference site on pushes to main and on manual dispatch, then publishes it to the gh-pages branch. After the first successful run, set GitHub Pages to deploy from the gh-pages branch root (https://ygma-bitc.github.io/tm.hyslaw/). .lintr is for local use. Coverage is intentionally not a release gate for this early package.

Related work

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.