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

Computes pairwise distances between subjects based on lesion profiles in genes associated with a specified pathway, and returns a figure with two panels: one showing lesion data and another showing expression data, both ordered based on the computed distances (useful for hierarchical clustering). It also returns the corresponding ordered data.

Usage

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

Arguments

alex.data

Output of the alex.prep.lsn.expr function. A list of three data tables: "row.mtch", "alex.expr" (expression matrix), and "alex.lsn" (lesion matrix). Rows in both matrices are ordered by Ensembl gene IDs; columns represent patient IDs.

lsn.clrs

Optional. A named vector of colors for lesion types. If not specified, default colors will be assigned using default.grin.colors().

lsn.data

A data frame of lesion data in GRIN-compatible format with the following columns: "ID" (patient ID), "chrom" (chromosome), "loc.start" (lesion start), "loc.end" (lesion end), and "lsn.type" (e.g., gain, loss, mutation, fusion).

pathways

A data frame with three columns: "gene.name" (gene symbol), "ensembl.id" (Ensembl gene ID), and "pathway" (pathway name).

selected.pathway

A character string indicating the pathway of interest.

Details

This function identifies all genes associated with the specified pathway, extracts lesion and expression data for those genes, and computes pairwise distances between subjects based on their lesion profiles. It uses hierarchical clustering to order the subjects and visualizes lesion and expression matrices in two aligned panels. It also returns a data frame containing the ordered expression and lesion data for all genes in the pathway.

Value

A list with the following element:

ordered.path.data

A data frame with lesion and expression data for pathway genes, ordered according to hierarchical clustering (matching the order used in the plot).

A figure with two panels will also be generated showing:

  1. Lesion data of pathway genes across subjects

  2. Expression data of the same genes across subjects

Both panels are ordered by subject similarity based on lesion profiles.

Author(s)

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

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 association using JAK pathway as an example
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
head(alex.path$ordered.path.data)

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