calculateDiffMeth-methods: Calculate differential methylation statistics

Description Usage Arguments Value Details References See Also Examples

Description

The function calculates differential methylation statistics between two groups of samples. The function uses either logistic regression test or Fisher's Exact test to calculate differential methylation. See references for detailed explanation on statistics.

Usage

1
  calculateDiffMeth(.Object,slim=TRUE,weigthed.mean=TRUE,num.cores=1)

Arguments

.Object

a methylBase object to calculate differential methylation

slim

If TRUE(default) SLIM method will be used for P-value adjustment. If FALSE, p.adjust with method="BH" option will be used for P-value correction.

weigthed.mean

calculate the mean methylation difference between groups using read coverage as weights

num.cores

integer for denoting how many cores should be used for differential methylation calculations (only can be used in machines with multiple cores)

Value

a methylDiff object containing the differential methylation statistics and locations

Details

The function either uses a logistic regression (when there are multiple samples per group) or fisher's exact when there is one sample per group.

References

Altuna Akalin, Matthias Kormaksson, Sheng Li, Francine E. Garrett-Bakelman, Maria E. Figueroa, Ari Melnick, Christopher E. Mason. (2012). "methylKit: A comprehensive R package for the analysis of genome-wide DNA methylation profiles." Genome Biology.

See Also

pool, reorganize

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(methylKit)

# Logistic regression test will be applied since there are multiple samples in each group
# in methylBase.obj object
my.diffMeth=calculateDiffMeth(methylBase.obj,slim=TRUE,weigthed.mean=TRUE,num.cores=1)

# pool samples in each group
pooled.methylBase=pool(methylBase.obj,sample.ids=c("test","control"))

# After applying pool() function, there is one sample in each group.
# Fisher's exact test will be applied for differential methylation
my.diffMeth2=calculateDiffMeth(pooled.methylBase,slim=TRUE,
                               weigthed.mean=TRUE,num.cores=1)

vd4mmind/methylkit documentation built on May 3, 2019, 4:57 p.m.