WriteCloseByAllRegions: Extract clusters of CpG probes located closely

Description Usage Arguments Details Value Examples

View source: R/WriteCloseByAllRegions.R

Description

Extract clusters of CpG probes located closely

Usage

1
2
3
4
5
6
7
8
9
WriteCloseByAllRegions(
  fileName,
  regions,
  genome = c("hg19", "hg38"),
  arrayType = c("450k", "EPIC"),
  maxGap = 200,
  minCpGs = 3,
  ...
)

Arguments

fileName

Name of the RDS file where the output genomic regions will be saved.

regions

GRanges of input genomic regions

genome

Human genome of reference hg19 or hg38

arrayType

Type of array, can be "450k" or "EPIC"

maxGap

an integer, genomic locations within maxGap from each other are placed into the same cluster

minCpGs

an integer, minimum number of CpGs for each resulting region

...

Dots for internal arguments. Currently unused.

Details

For maxGap = 200 and minCpGs = 3, we already calculated the clusters of CpGs. They are saved in folder /inst/extdata/.

Value

a file with the genomic regions containing CpGs located closely within each inputting pre-defined genomic region

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
regions <- GenomicRanges::GRanges(
  seqnames = c("chr4","chr6","chr16","chr16","chr22","chr19"),
  ranges = c(
    "174202697-174203520","28226203-28227482","89572934-89574634",
    "67232460-67234167","38244199-38245362","39402823-39403373"
  )
)


  WriteCloseByAllRegions(
    regions = regions, arrayType = "EPIC", maxGap = 50,
    minCpGs = 3, fileName = "closeByRegions.rds"
  )

lissettegomez/coMethDMR documentation built on April 25, 2021, 1:10 p.m.