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

Generates a waterfall plot displaying genomic lesions and gene expression levels across subjects for a selected gene. Subjects are grouped according to lesion status and ordered by expression level within each lesion group.

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 "gene.lsn.exp" with subject IDs, lesion groups, and expression values for the selected gene; "lsns" with genomic lesions overlapping the gene; "stats" with the corresponding Kruskal-Wallis lesion-expression association results; and "gene.ID" with the gene symbol or Ensembl gene ID used to label the plot.

lsn.data

A data frame containing genomic lesion data in GRIN-compatible format. It must contain the columns "ID", "chrom", "loc.start", "loc.end", and "lsn.type".

lsn.clrs

Optional named vector specifying colors for lesion groups. Names must correspond to lesion types represented in the data. If NULL, colors for individual lesion types are assigned using default.grin.colors, with additional colors assigned to "none" and "multiple" groups.

delta

Numeric value controlling the genomic spacing around the gene locus displayed in the DNA lesion panel. The default is 0.5.

Details

The left portion of the waterfall plot displays genomic lesions overlapping the selected gene, with lesion types distinguished by color. The genomic coordinates of the gene are indicated by vertical reference lines.

The right portion displays gene expression for the same subjects. Subjects are first grouped alphabetically according to lesion group and then ordered by expression level within each group. For each subject, expression is shown relative to the median expression of the corresponding lesion group.

Colors may be supplied through lsn.clrs. When colors are not supplied, lesion-specific colors are assigned automatically using default.grin.colors.

Value

Generates a waterfall plot showing genomic lesion status and gene expression for the selected gene.

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 Aug. 22, 2026, 5:09 p.m.