Extract probe IDs for CpGs located in a genomic region

GetCpGsInRegion(
  regionName_char,
  region_gr = NULL,
  genome = c("hg19", "hg38"),
  arrayType = c("450k", "EPIC"),
  manifest_gr = NULL,
  ignoreStrand = TRUE
)

Arguments

regionName_char

character string with location information for one region in the format "chrxx:xxxxxx-xxxxxx"

region_gr

An object of class GRanges with location information for one region. If this argument is NULL, then the region in regionName_char is used.

genome

human genome of reference hg19 (default) or hg38

arrayType

Type of array, 450k or EPIC

manifest_gr

A GRanges object with the genome manifest (as returned by ExperimentHub or by ImportSesameData). This function by default ignores this argument in favour of the genome and arrayType arguments.

ignoreStrand

Whether strand can be ignored, default is TRUE

Value

vector of CpG probe IDs mapped to the genomic region

Examples

   
   myRegion_gr <- RegionsToRanges("chr22:18267969-18268249")
   
   GetCpGsInRegion(
     region_gr = myRegion_gr,
     genome = "hg19",
     arrayType = "450k",
     ignoreStrand = TRUE
   )
#> snapshotDate(): 2021-05-18
#> see ?sesameData and browseVignettes('sesameData') for documentation
#> snapshotDate(): 2021-05-18
#> see ?sesameData and browseVignettes('sesameData') for documentation
#> [1] "cg18370151" "cg12460175" "cg14086922" "cg21463605"