Skip to contents

Retrieves and sorts genomic location annotations for the specified methylation array platform and genome version. Performs liftOver if necessary. The function caches the results.

Usage

getSortedGenomicLocs(
  array = c("450K", "27K", "EPIC", "EPICv2", "Mouse"),
  genome = c("hg38", "hg19", "hs1", "mm10", "mm39"),
  locations_file = NULL
)

Arguments

array

Character. Array platform type (supported: "450K", "EPIC", "EPICv2", "27K", "Mouse", 'NULL'), ignored when locations_file is provided. Must be 'NULL' when the experiment is not array-based.

genome

Character. Genome version (supported: "hg38", "hg19", "hs1", "mm10", "mm39"), ignored if locations_file is provided

locations_file

Character. Optional path to a precomputed locations file (RDS format). If provided, this file will be used directly (default: NULL)

Value

A data frame containing sorted genomic locations with rownames as site IDs and columns:

  • chr: Chromosome

  • start: Genomic position

  • start: Start position (same as start)

  • end: End position (start + 1)

Examples

# Get sorted locations for 450K array (hg38)
locs_450k <- getSortedGenomicLocs("450K")

# Get sorted locations for EPIC array with hg38
# locs_epic <- getSortedGenomicLocs("EPIC", "hg38")

# Get sorted locations for EPICv2 array
# locs_epicv2 <- getSortedGenomicLocs("EPICv2", "hg38")