compute.gw.coordinates: Compute Genome-wide Plotting Coordinates

View source: R/compute.gw.coordinates.R

compute.gw.coordinatesR Documentation

Compute Genome-wide Plotting Coordinates

Description

Computes and adds continuous genome-wide plotting coordinates to chromosome, gene, and lesion data for use in genome-wide lesion plots.

Usage

compute.gw.coordinates(grin.res, scl = 1000000)

Arguments

grin.res

GRIN results, typically the output of the grin.stats function.

scl

Numeric; number of base pairs represented by one plotting unit. Default is 1,000,000, so genome-wide coordinates are expressed in megabase units.

Details

This function adds x.start and x.end coordinates that place genomic positions from all chromosomes on a continuous genome-wide plotting axis. The original chromosome-specific genomic coordinates in loc.start and loc.end are retained unchanged.

Chromosome lengths and genomic positions are scaled according to scl. Cumulative chromosome lengths are then used to offset the coordinates of each chromosome so that chromosomes are positioned consecutively along a continuous genome-wide axis.

Specifically:

  • The chromosome size table is updated with x.start and x.end columns defining the genome-wide plotting boundaries of each chromosome.

  • Gene coordinates in gene.data and gene.hits are updated with corresponding x.start and x.end plotting coordinates.

  • Lesion coordinates in lsn.data are updated with corresponding x.start and x.end plotting coordinates.

Value

A GRIN results list containing the original components with genome-wide plotting coordinates added to the relevant chromosome, gene, and lesion data:

gene.hits

GRIN gene-level summary statistics with added x.start and x.end plotting coordinates.

gene.lsn.data

Unchanged gene-lesion overlap data.

lsn.data

Lesion data with added x.start and x.end plotting coordinates.

gene.data

Gene annotation data with added x.start and x.end plotting coordinates.

chr.size

Chromosome size table with added x.start and x.end coordinates defining chromosome positions on the genome-wide plotting axis.

gene.index

Unchanged chromosome index used to identify chromosome-specific rows in the gene data.

lsn.index

Unchanged chromosome index used to identify chromosome-specific rows in the lesion data.

Author(s)

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

References

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.

See Also

grin.stats, genomewide.lsn.plot

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)

# Add genome-wide coordinates for plotting
genome.coord <- compute.gw.coordinates(grin.results)


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