grin.barplt: GRIN Lesion Stacked Bar Plot

View source: R/grin.barplt.R

grin.barpltR Documentation

GRIN Lesion Stacked Bar Plot

Description

Generates a horizontal stacked bar plot showing the number of patients affected by different genomic lesion types across a user-specified set of genes, based on GRIN analysis results.

Usage

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

Arguments

grin.res

GRIN results object, typically the output from the grin.stats function.

count.genes

A character vector of gene names to include in the plot. Only genes present in the GRIN results are displayed.

lsn.colors

A named vector of colors assigned to lesion types. If NULL, colors are automatically assigned using default.grin.colors.

Details

The function extracts the number of patients affected by each lesion type from grin.res$gene.hits for the genes specified in count.genes.

Each horizontal bar represents a gene and is divided into segments corresponding to different lesion types. The length of each segment represents the number of patients affected by that lesion type, and the number of affected patients is displayed within each non-zero segment.

Genes are ordered according to the total number of lesion-type-specific affected-patient counts across the lesion categories displayed in the plot. This visualization can be used to compare the relative burden and distribution of different genomic lesion types across candidate driver genes or other genes of interest.

Value

A ggplot object containing a horizontal stacked bar plot. Each bar represents a selected gene, bar segments represent lesion types, and segment lengths represent the corresponding number of affected patients.

Author(s)

Abdelrahman Elsayed abdelrahman.elsayed@stjude.org

References

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

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 genes of interest to include in the stacked bar plot
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 stacked bar plot showing the distribution of lesion types
# across the selected genes
grin.barplt(grin.results,
            count.genes)


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