summarizeRegions: Aggregates methylation information of single CpG sites

Description Usage Arguments Details Value Author(s) See Also Examples

Description

This method summarizes the methylation states of single CpG sites to a single methylation state for a given genomic region.

Usage

1
summarizeRegions(object, regions, outputAll)

Arguments

object

An BSraw or BSrel object.

regions

A GRanges object storing the genomic regions.

outputAll

A logical. If outputAll = TRUE, all regions will be returned. If FALSE (default), regions are dropped if their coverage is zero.

Details

When the given object is of class BSraw-class, all (methylated) reads of all CpG site lying within a region are summed up and assign as total number of (methylated) reads to that region. It is recommended to use limitCov before applying summarizeRegions to an BSraw-class object in order to avoid an excessive influence of a single CpG site on the methylation value of a region. When the given object is of class BSrel-class, the mean relative methylation of all CpGs within a region is assign to that region.

The rowRanges slot of the returned object is the given object regions with all columns preserved.

Value

An BSraw or an BSrel object storing methylation information about the given regions.

Author(s)

Hans-Ulrich Klein

See Also

BSraw-class, BSrel-class, limitCov

Examples

1
2
3
4
5
6
7
data(rrbs)
rrbs.clustered <- clusterSites(rrbs)
regions <- clusterSitesToGR(rrbs.clustered)

rrbs <- limitCov(rrbs, maxCov=50)
rrbsRegion <- summarizeRegions(rrbs, regions)
totalReads(rrbsRegion)

BiSeq documentation built on Nov. 8, 2020, 8:05 p.m.