View source: R/genomewide.lsn.plot.R
| genomewide.lsn.plot | R Documentation |
Generates a genome-wide lesion plot displaying genomic lesions across chromosomes and patients, together with lesion recurrence and statistical significance from the GRIN analysis.
genomewide.lsn.plot(grin.res,
ordered = FALSE,
pt.order = NULL,
lsn.colors = NULL,
max.log10q = NULL)
grin.res |
GRIN results (output from the |
ordered |
Logical; if |
pt.order |
A data frame with two columns: |
lsn.colors |
A named vector of colors assigned to lesion types. Names
must correspond to lesion types in the GRIN results. If |
max.log10q |
Numeric; optional maximum value of -log10(q-value) displayed
in the left panel. Values greater than |
The function first uses compute.gw.coordinates to convert
chromosome-specific genomic coordinates into continuous genome-wide
coordinates used for plotting lesions across the genome.
The resulting plot contains three aligned panels. The center panel displays genomic lesions across patients and chromosomes. Each patient occupies one column, and lesions are colored according to lesion type. The left panel displays the -log10(q-value) for each gene-lesion type combination from the GRIN analysis, whereas the right panel displays the corresponding number of affected patients.
By default, patients are ordered alphabetically by patient ID. A user-defined
patient order can instead be supplied through pt.order by setting
ordered = TRUE.
Generates a genome-wide lesion plot on the active graphics device and
invisibly returns NULL. The plot consists of three aligned panels:
Left panel: Displays the statistical significance of lesion recurrence for each gene and lesion type as -log10(q-value). Horizontal lines are colored by lesion type, with longer lines representing greater statistical significance.
Middle panel: Displays the genome-wide distribution of lesions across chromosomes and patients. Each column represents a patient, chromosomes are arranged consecutively along the vertical axis, and lesions are colored according to lesion type.
Right panel: Displays the number of patients affected by each lesion type at each gene. Horizontal lines are colored by lesion type, with longer lines representing a greater number of affected patients.
Abdelrahman Elsayed abdelrahman.elsayed@stjude.org and Stanley Pounds stanley.pounds@stjude.org
Pounds, S., et al. (2013). A genomic random interval model for statistical analysis of genomic lesion data.
Cao, X., Elsayed, A. H., & Pounds, S. B. (2023). Statistical Methods Inspired by Challenges in Pediatric Cancer Multi-omics.
grin.stats,
compute.gw.coordinates,
default.grin.colors
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)
# Generate genome-wide lesion plot with alphabetical patient ordering
genomewide.lsn.plot(grin.results,
max.log10q = 50)
# Generate plot using a user-defined patient order, such as grouping patients
patient.ids <- sort(unique(lesion_data$ID))
pt.order <- data.frame(ID = patient.ids,
pts.order = seq_along(patient.ids))
genomewide.lsn.plot(grin.results,
ordered = TRUE,
pt.order = pt.order,
max.log10q = 50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.