Skip to content
AdafedePublic

CASCADE

Lifecycle: experimental R-CMD-check Codecov test coverage r-universe badge DOI

Contextualizing untargeted Annotation with Semi-quantitative Charged Aerosol Detection for pertinent characterization of natural Extracts.

cascade is an R package for analyzing natural-product extracts by linking untargeted LC-HRMS/MS feature tables and taxonomically informed metabolite annotations with semi-quantitative universal detectors (CAD, PDA, ELSD). It provides Fourier low-pass filtering, derivative-based peak sharpening, exponential-Gaussian hybrid (EGH) peak fitting, trapezoidal integration, MS1 extracted ion chromatogram correlation, LOTUS/Wikidata chemotaxonomic summaries, and interactive plots.

The original method is described at https://doi.org/10.1021/acs.jafc.3c03099.

Workflow

Input Requirements

To process your own extracts you need:

Installation

cascade is not on CRAN. Requires R (>= 4.5.0) and NetCDF system libraries for mzR (brew install netcdf on macOS; libnetcdf-dev on Debian/Ubuntu).

Install from source on GitHub:

# Using pak
pak::pak("adafede/cascade")

# Or using remotes
remotes::install_github("adafede/cascade")

Or install prebuilt binaries when available via r-universe:

install.packages(
  "cascade",
  repos = c(
    "https://adafede.r-universe.dev",
    "https://cran.r-universe.dev",
    "https://bioc.r-universe.dev"
  )
)

Because the package bundles roughly 45 MB of bzip2-compressed example datasets under data/, initial source installation takes several minutes.

Quickstart

All bundled examples use Swertia chirayita LC-CAD-HRMS/MS data and run offline with show_example = TRUE:

library(cascade)

# Inspect detector retention-time alignment and peak integration
check_chromatograms_alignment(show_example = TRUE)
check_peaks_integration(show_example = TRUE)

# Integrate detector peaks and correlate with MS1 extracted ion chromatograms
peaks <- process_compare_peaks(show_example = TRUE)

# Build interactive pseudochromatograms and treemaps from TIMA annotations
plots <- generate_pseudochromatograms(show_example = TRUE)

# Visualize standalone TIMA annotation outputs
prepare_tima_annotations(show_example = TRUE) |>
  plot_tima()

Further step-by-step examples are available in the articles.

Scope and Limitations

  • Network-dependent functions: generate_ids() queries the live Wikidata SPARQL endpoint (query.wikidata.org, falling back to QLever), and generate_tables() downloads the LOTUS snapshot archive from Zenodo on first run unless already cached under tools::R_user_dir("cascade", "cache").
  • Detector assumptions: process_compare_peaks() correlates MS1 XICs against a chosen trace ("CAD", "PDA", or "ELSD"); trace quality and retention-time offset (cad_shift, pda_shift, or "auto") affect feature-to-peak matching.
  • Bundled data coverage: Built-in examples illustrate Swertia chirayita positive- and negative-mode extracts; external files must follow mzmine CSV and TIMA TSV column schemas.

Citations and Dependencies

To cite cascade in publications, run citation("cascade"):

Depending on the steps in your workflow, please also cite the upstream tools and resources used:

Core R package dependencies declared in DESCRIPTION: baseline, curl, data.table, ggplot2, gt, mzR, and plotly.