WriteCloseByAllRegions: Extract clusters of CpG probes located closely

View source: R/WriteCloseByAllRegions.R

WriteCloseByAllRegionsR Documentation

Extract clusters of CpG probes located closely

Description

Extract clusters of CpG probes located closely

Usage

WriteCloseByAllRegions(
  fileName,
  regions,
  genome = c("hg19", "hg38"),
  arrayType = c("450k", "EPIC"),
  ignoreStrand = TRUE,
  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: "450k" or "EPIC"

ignoreStrand

Whether strand can be ignored, default is TRUE

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 have already calculated the clusters of CpGs. They are saved in folder /inst/extdata/.

Value

Nothing. Instead, file with the genomic regions containing CpGs located closely within each inputting pre-defined genomic region will be written to the disk

Examples


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"
  )
)

# Uncomment out the example code below:
# WriteCloseByAllRegions(
#   regions = regions,
#   arrayType = "EPIC",
#   maxGap = 50,
#   minCpGs = 3,
#   fileName = "closeByRegions.rds"
# )



TransBioInfoLab/coMethDMR documentation built on Oct. 15, 2024, 12:52 a.m.