compareTwoSamples: Detects DMRs by comparing two samples

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

Description

Determines the differences of (smoothed) methylation levels between two samples and aggregates the sites surpassing a minimum difference to DMRs.

Usage

1
compareTwoSamples(object, sample1, sample2, minDiff, max.dist)

Arguments

object

A BSrel.

sample1

A numeric or character specifying the first sample to be used.

sample2

A numeric or character specifying the second sample to be used.

minDiff

A numeric greater than 0 and smaller or equal to 1.

max.dist

Numeric. The maximum distance between two CpG sites (or grid points) with absolute methylation differences greater or equal than minDiff in a DMR. If grid points are used: should be the same as grid.dist in predictMeth.

Details

This function determines the differences between the methylation levels of sample1 and sample2 for each site. Successive sites with methylation differences smaller or equal to minDiff are summarized.

Value

A GRanges object.

Author(s)

Katja Hebestreit

See Also

predictMeth

Examples

1
2
3
4
5
6
7
data(rrbs)
rrbs <- rrbs[, c(1,6)]
CpG.clusters <- clusterSites(object = rrbs, perc.samples = 1,
                             min.sites = 20, max.dist = 100)
predictedMeth <- predictMeth(object = CpG.clusters)
DMRs <- compareTwoSamples(predictedMeth, sample1 = 1, sample2 = 2,
                          minDiff = 0.3, max.dist = 100)

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