alex.waterfall.plot: Generate Waterfall Plot of Lesion and Expression Data

View source: R/alex.waterfall.plot.R

alex.waterfall.plotR Documentation

Generate Waterfall Plot of Lesion and Expression Data

Description

Creates a waterfall plot displaying gene expression levels grouped by lesion status for a selected gene.

Usage

alex.waterfall.plot(waterfall.prep, lsn.data, lsn.clrs = NULL, delta = 0.5)

Arguments

waterfall.prep

Output from alex.waterfall.prep. A list containing three data tables: "gene.lsn.exp" with patient IDs, lesion types, and expression levels for the gene of interest; "lsns" with all lesions affecting the gene (GRIN-compatible format); and "stats" with the Kruskal Wallis test result (from KW.hit.express).

lsn.data

Lesion data in GRIN-compatible format.

lsn.clrs

Named vector of colors for lesion types. If not provided, default colors will be automatically assigned using default.grin.colors().

delta

Spacing argument for the waterfall plot (default is 0.5).

Details

This function generates a waterfall-style plot that visualizes gene expression across patients, grouped by lesion category. Patients are grouped by lesion type (sorted alphabetically), and within each group, expression levels are ordered from lowest to highest. The median expression level appears at the center of each group, allowing intuitive comparison between lesion categories.

Value

A side-by-side graphical representation of lesion status and gene expression for each patient, grouped by lesion type.

Author(s)

Abdelrahman Elsayed abdelrahman.elsayed@stjude.org, Stanley Pounds stanley.pounds@stjude.org

References

Cao, X., Elsayed, A. H., & Pounds, S. B. (2023). Statistical Methods Inspired by Challenges in Pediatric Cancer Multi-omics.

See Also

alex.prep.lsn.expr, KW.hit.express, alex.waterfall.prep

Examples

data(expr_data)
data(lesion_data)
data(hg38_gene_annotation)

# Prepare expression and lesion data
alex.data <- alex.prep.lsn.expr(expr_data, lesion_data,
                                hg38_gene_annotation, min.expr = 1, min.pts.lsn = 5)

# Run Kruskal Wallis test
alex.kw.results <- KW.hit.express(alex.data, hg38_gene_annotation, min.grp.size = 5)

# Prepare data for the WT1 gene
WT1.waterfall.prep <- alex.waterfall.prep(alex.data, alex.kw.results, "WT1", lesion_data)

# Generate waterfall plot for WT1
alex.waterfall.plot(WT1.waterfall.prep, lesion_data)

GRIN2 documentation built on June 17, 2025, 9:11 a.m.