R: Collapse methylation values of adjacent CpGs into a summary...
cpgCollapse
R Documentation
Collapse methylation values of adjacent CpGs into a summary value.
Description
This function groups adjacent loci into clusters with a specified
maximum gap between CpGs in the cluster, and a specified maximum cluster
width. The loci within each cluster are summarized resulting in a
single methylation estimate per cluster.
An object of class [Genomic]MethylSet or [Genomic]RatioSet.
what
Should operation be performed on the M-scale or
Beta-scale?
maxGap
Maximum gap between CpGs in a cluster
blockMaxGap
Maximum block gap
maxClusterWidth
Maximum cluster width
dataSummary
Function used to summarize methylation across CpGs
in the cluster.
na.rm
Should NAs be removed when summarizing? Passed on to the
dataSummary function.
returnBlockInfo
Should the block annotation table be returned
in addition to the block table?
islandAnno
Which Island annotation should be used. NULL
indicates the default. This argument is only useful if the
annotatio object contains more than one island annotation.
verbose
Should the function be verbose?
...
Passed on to getMethSignal and getCN. Can be used to
specify
Details
This function is used as the first step of block-finding. It groups
adjacent loci into clusters with a default maximum gap of 500bp and a
maximum cluster width of 1,500bp. The loci within each cluster are
then summarized (using the mean by default) resulting in a single
methylation estimate per cluster. Cluster estimates from open-sea
probes are used in block-finding.
Value
If returnBlockInfo is FALSE: a GenomicRatioSet of collapsed CpG clusters.