bsseq (version 1.8.2)

dmrFinder: Finds differentially methylated regions for whole genome bisulfite sequencing data.

Description

Finds differentially methylated regions for whole genome bisulfite sequencing data. Essentially identifies regions of the genome where all methylation loci have an associated t-statistic that is beyond a (low, high) cutoff.

Usage

dmrFinder(bstat, cutoff = NULL, qcutoff = c(0.025, 0.975), maxGap=300, stat = "tstat.corrected", verbose = TRUE)

Arguments

bstat
An object of class BSseqStat or BSseqTstat.
cutoff
The cutoff of the t-statistics. This should be a vector of length two giving the (low, high) cutoff. If NULL, see qcutoff.
qcutoff
In case cutoff is NULL, compute the cutoff using these quantiles of the t-statistic.
maxGap
If two methylation loci are separated by this distance, break a possible DMR. This guarantees that the return DMRs have CpGs that are this distance from each other.
stat
Which statistic should be used?
verbose
Should the function be verbose?

Value

A data.frame with columns
start,end,width,chr
genomic locations and width.
n
The number of methylation loci.
invdensity
Average length per loci.
group1.mean
The mean methylation level across samples and loci in 'group1'.
group2.mean
The mean methylation level across samples and loci in 'group2'.
meanDiff
The mean difference in methylation level; the difference between group1.mean and group2.mean.
idxStart, idxEnd, cluster
Internal use.
areaStat
The 'area' of the t-statistic; equal to the sum of the t-statistics for the individual methylation loci.
direction
either ‘hyper’ or ‘hypo’.
areaStat.corrected
Only present if column = "tstat.corrected", contains the area of the corrected t-statistics.

Details

The workhorse function is BSmooth.tstat which sets up a t-statistic for a comparison between two groups.

Note that post-processing of these DMRs are likely to be necessary, filtering for example for length (or number of loci).

References

KD Hansen, B Langmead, and RA Irizarry. BSmooth: from whole genome bisulfite sequencing reads to differentially methylated regions. Genome Biology (2012) 13:R83. doi:10.1186/gb-2012-13-10-r83.

See Also

BSmooth.tstat for the function constructing the input object, and BSseqTstat for its class. In the example below, we use BS.cancer.ex.tstat as the actual input object. Also see the package vignette(s) for a detailed example.

Examples

Run this code
if(require(bsseqData)) {
  dmrs0 <- dmrFinder(BS.cancer.ex.tstat, cutoff = c(-4.6, 4.6), verbose = TRUE)
  dmrs <- subset(dmrs0, abs(meanDiff) > 0.1 & n >= 3)
}

Run the code above in your browser using DataLab