alex.pathway: Visualize Lesion and Expression Data by Pathway

View source: R/alex.pathway.R

alex.pathwayR Documentation

Visualize Lesion and Expression Data by Pathway

Description

Visualizes lesion and expression data for genes associated with a selected biological pathway. Subjects are ordered by hierarchical clustering based on their lesion profiles across pathway genes, and pathway genes are ordered based on similarities in their lesion profiles.

The function generates two aligned panels showing lesion and expression data and returns the corresponding ordered data.

Usage

alex.pathway(
  alex.data,
  lsn.clrs = NULL,
  lsn.data,
  pathways,
  selected.pathway
)

Arguments

alex.data

Output from the alex.prep.lsn.expr function. A list containing "alex.expr" (expression data), "alex.lsn" (lesion-group data), and "alex.row.mtch" (matched Ensembl gene IDs). The expression and lesion data contain genes in rows and subjects in columns, with matching row and column order.

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.

lsn.data

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

pathways

A data frame containing pathway annotations with the columns "gene.name" (gene symbol), "ensembl.id" (Ensembl gene ID), and "pathway" (pathway name).

selected.pathway

A character string specifying the pathway to visualize. The value must match a pathway in the "pathway" column of pathways.

Details

Genes annotated to selected.pathway are identified from pathways, and their lesion and expression data are extracted from alex.data.

Pairwise lesion-profile distances are calculated using dist.lsn. Hierarchical clustering is then used to order both pathway genes and subjects. Subjects are clustered using lesion profiles across the selected pathway genes. The same subject and gene ordering is used in both visualization panels.

The upper panel displays lesion groups using lesion-specific colors. The lower panel displays standardized gene expression values, with lower expression represented in blue, expression near the gene mean represented in white, and higher expression represented in red.

Gene symbols are used as row labels when available. If a gene symbol is unavailable, the Ensembl gene ID is used instead.

Value

A list containing:

ordered.path.data

A data frame containing lesion and expression data for the selected pathway genes. Columns represent subjects in the order determined by hierarchical clustering. Rows contain lesion data followed by expression data and are labeled with "_lsn" and "_expr", respectively.

The function also generates a figure with two aligned panels showing lesion and expression data for the selected pathway genes. Both panels use the same hierarchical clustering-based ordering.

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, hclust

Examples

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

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

# Visualize pathway-level lesion and expression data using the JAK pathway
alex.path <- alex.pathway(alex.data,
                          lsn.data = lesion_data,
                          pathways = pathways,
                          selected.pathway = "Jak_Pathway")

# Access the ordered data matrix used in the plot
alex.path$ordered.path.data[1:6,1:6]

GRIN2 documentation built on Aug. 22, 2026, 5:09 p.m.