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.
To process your own extracts you need:
- An .mzML file containing MS1 data along with at least one auxiliary chromatographic detector trace (PDA, ELSD, or CAD). See wiki/How-to-create-a-compliant-mzML-file.
- A .csv feature table exported from mzmine.
- A .tsv annotation table from TIMA.
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.
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.
- Network-dependent functions:
generate_ids()queries the live Wikidata SPARQL endpoint (query.wikidata.org, falling back to QLever), andgenerate_tables()downloads the LOTUS snapshot archive from Zenodo on first run unless already cached undertools::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.
To cite cascade in publications, run citation("cascade"):
Depending on the steps in your workflow, please also cite the upstream tools and resources used:
- mzmine: https://doi.org/10.1038/s41587-023-01690-2
- SIRIUS (https://doi.org/10.1038/s41592-019-0344-8), CSI:FingerId (https://doi.org/10.1073/pnas.1509788112), ZODIAC (https://doi.org/10.1038/s42256-020-00234-6), CANOPUS (https://doi.org/10.1038/s41587-020-0740-8), COSMIC (https://doi.org/10.1038/s41587-021-01045-9)
- LOTUS (https://doi.org/10.7554/eLife.70780); note the snapshot DOI you used: https://doi.org/10.5281/zenodo.5794106
- ISDB (https://doi.org/10.1021/acs.analchem.5b04804); note the version DOI you used: https://doi.org/10.5281/zenodo.5607185
- TIMA (https://doi.org/10.3389/fpls.2019.01329); note the version DOI you used: https://doi.org/10.5281/zenodo.5797920
- NPClassifier: https://doi.org/10.1021/acs.jnatprod.1c00399
Core R package dependencies declared in DESCRIPTION: baseline, curl,
data.table, ggplot2, gt, mzR, and plotly.
