CloseBySingleRegion: Extract clusters of CpGs located closely in a genomic region.

Description Usage Arguments Details Value Examples

View source: R/CloseBySingleRegion.R

Description

Extract clusters of CpGs located closely in a genomic region.

Usage

1
2
3
4
5
6
7
CloseBySingleRegion(
  CpGs_char,
  genome = c("hg19", "hg38"),
  arrayType = c("450k", "EPIC"),
  maxGap = 200,
  minCpGs = 3
)

Arguments

CpGs_char

a list of CpG IDs

genome

Human genome of reference hg19 or hg38

arrayType

Type of array, 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 the resulting CpG cluster

Details

Note that this function depends only on CpG locations, and not on any methylation data. The algorithm is based on the clusterMaker function in the bumphunter R package. Each cluster is essentially a group of CpG locations such that two consecutive locations in the cluster are separated by less than maxGap.

Value

a list, each item in the list is a character vector of CpG IDs located closely (i.e. in the same cluster)

Examples

1
2
3
4
5
6
7
8
   CpGs_char <- c(
     "cg02505293", "cg03618257", "cg04421269", "cg17885402", "cg19890033",
     "cg20566587", "cg27505880"
   )

   cluster_ls <- CloseBySingleRegion(
     CpGs_char, genome = "hg19", arrayType = "450k", maxGap = 100, minCpGs = 3
   )

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