View source: R/grin.oncoprint.mtx.R
grin.oncoprint.mtx | R Documentation |
Prepares a binary lesion matrix based on GRIN analysis results that can be directly used as input for the oncoPrint
function from the ComplexHeatmap package. This matrix summarizes the presence or absence of lesion types across patients for a user-defined list of genes.
grin.oncoprint.mtx(grin.res, oncoprint.genes)
grin.res |
A data frame of GRIN results, typically generated by the |
oncoprint.genes |
A character vector of Ensembl gene IDs specifying the genes to include in the OncoPrint. |
This function filters the GRIN results for a specified set of genes (using their Ensembl IDs), and constructs a gene-by-patient binary matrix indicating the presence of one or more lesion types per gene. Each row represents a gene, each column a patient, and the matrix values reflect whether that gene is affected by any lesion in the given patient.
The output matrix is fully compatible with the oncoPrint()
function from the ComplexHeatmap package and allows visualization of lesion patterns across a defined gene set.
This is particularly useful for visualizing mutation, copy number alterations and other structural rearrangements in driver genes or genes selected by statistical criteria (e.g., significance threshold from GRIN results).
A binary data frame (matrix) of dimensions length(oncoprint.genes)
and number of patients
, suitable for use with the oncoPrint()
function.
Abdelrahman Elsayed abdelrahman.elsayed@stjude.org and Stanley Pounds stanley.pounds@stjude.org
Cao, X., Elsayed, A. H., & Pounds, S. B. (2023). Statistical Methods Inspired by Challenges in Pediatric Cancer Multi-omics.
grin.stats
, oncoPrint
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 (using Ensembl IDs) to include in the OncoPrint
oncoprint.genes <- c("ENSG00000148400", "ENSG00000171862", "ENSG00000171843",
"ENSG00000156531", "ENSG00000162367", "ENSG00000096968",
"ENSG00000105639", "ENSG00000118513", "ENSG00000102974",
"ENSG00000133703")
# Alternatively, select genes with multiple lesion types and significant q-values
genes.const <- grin.results$gene.hits[grin.results$gene.hits$q2.nsubj < 0.01, ]
selected.genes <- as.vector(genes.const$gene)
# Generate OncoPrint-compatible lesion matrix
oncoprint.mtx <- grin.oncoprint.mtx(grin.results, oncoprint.genes)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.