View source: R/compute.gw.coordinates.R
compute.gw.coordinates | R Documentation |
Computes and assigns genome-wide plotting coordinates to lesion, gene, and chromosome data for use in genome-wide lesion plots.
compute.gw.coordinates(grin.res, scl = 1e+06)
grin.res |
GRIN results, typically the output of the |
scl |
Chromosome unit length in base pairs. Default is 1,000,000, meaning each chromosome is divided into segments of 1 million base pairs for plotting. |
This function processes the GRIN results to add genome-wide x-axis coordinates necessary for plotting lesions and genes across all chromosomes. It divides each chromosome into segments based on the specified scl
value and computes cumulative start and end positions across chromosomes to ensure a continuous x-axis. Specifically:
Chromosome sizes are updated to include x.start
and x.end
columns, where each chromosome starts where the previous one ends.
Gene and lesion data are similarly updated with x.start
and x.end
coordinates, scaled by scl
, and adjusted for cumulative chromosome positions.
A list identical in structure to the original grin.res
object, with the following additions:
Unchanged. GRIN gene-level summary statistics, including hit counts and p/q-values.
Unchanged. Gene-lesion overlaps showing which lesion affects which gene for each patient.
Input lesion data with added x.start
and x.end
columns for genome-wide coordinates.
Input gene annotation data with added x.start
and x.end
columns for genome-wide coordinates.
Chromosome size table (22 autosomes + X and Y) with added x.start
and x.end
columns for plotting.
Mapping of gene.lsn.data
rows to their corresponding chromosomes.
Mapping of gene.lsn.data
rows to their corresponding lesions.
Abdelrahman Elsayed abdelrahman.elsayed@stjude.org, 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
data(lesion_data)
data(hg38_gene_annotation)
data(hg38_chrom_size)
# Run GRIN model
grin.results <- grin.stats(lesion_data,
hg38_gene_annotation,
hg38_chrom_size)
# Assign genome-wide coordinates for plotting
genome.coord <- compute.gw.coordinates(grin.results)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.