grin.barplt: GRIN Lesion Stacked Bar Plot

View source: R/grin.barplt.R

grin.barpltR Documentation

GRIN Lesion Stacked Bar Plot

Description

Generates a stacked bar plot showing the number of patients affected by different types of genomic lesions in a user-specified list of genes of interest, based on GRIN analysis results.

Usage

grin.barplt(grin.res, count.genes, lsn.colors = NULL)

Arguments

grin.res

A data frame of GRIN results, typically the output from the grin.stats function.

count.genes

A character vector of gene names to include in the bar plot. Only genes present in the GRIN results table will be used.

lsn.colors

(Optional) A named vector specifying colors for each lesion type. If not provided, default lesion colors will be automatically assigned using the default.grin.colors function.

Details

The function subsets the GRIN results to the genes specified in count.genes, extracts the number of patients affected by each lesion type for each gene, and visualizes the data as a horizontal stacked bar plot. Each bar represents a gene and is segmented by lesion type (e.g., gain, loss, mutation), with segment size proportional to the number of affected patients.

This visualization is useful for highlighting the burden and distribution of different lesion types across key driver genes or other genes of interest.

Value

A ggplot2-based stacked bar plot showing lesion type distribution across the selected genes.

Author(s)

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

See Also

grin.stats, default.grin.colors

Examples

data(lesion_data)
data(hg38_gene_annotation)
data(hg38_chrom_size)

# Run GRIN analysis
grin.results <- grin.stats(lesion_data,
                           hg38_gene_annotation,
                           hg38_chrom_size)

# Define a list of genes to be included in the bar plot (e.g., candidate driver genes)
count.genes <- c("TAL1", "FBXW7", "PTEN", "IRF8", "NRAS",
                 "BCL11B", "MYB", "LEF1", "RB1", "MLLT3",
                 "EZH2", "ETV6", "CTCF", "JAK1", "KRAS",
                 "RUNX1", "IKZF1", "KMT2A", "RPL11", "TCF7",
                 "WT1", "JAK2", "JAK3", "FLT3")

# Generate the bar plot
grin.barplt(grin.results, count.genes)

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