Count models, smoothing, DMLs and DMRs
Bisulfite and enzymatic sequencing turned reads into a table of methylated and total reads per CpG. This lecture compares such tables between groups of samples.
library(DSS)
dat <- lapply(files, fread) # each: chr, pos, N, X (X = methylated reads)
bs <- makeBSseqData(dat, c("gm1", "gm2", "k1", "k2"))
dml <- DMLtest(bs, group1 = c("gm1", "gm2"), group2 = c("k1", "k2"), smoothing = TRUE)
dmls <- callDML(dml, delta = 0.2, p.threshold = 1e-5) # single CpGs
dmrs <- callDMR(dml, delta = 0.2, p.threshold = 1e-5) # regions
DMLfit.multiFactor(bs, design = df, formula = ~ group + sex) # general designsdelta: test |Δβ| > delta rather than Δβ ≠ 0 (an effect-size threshold built into the test).| tool | model | regions | notes |
|---|---|---|---|
| DSS | beta-binomial, shrunken dispersion, Wald test; smoothing | callDMR merges DMLs | fast; multi-factor designs |
| BSmooth (bsseq) | local-likelihood smoothing, t-statistics | runs of large t; blocks | low coverage OK; needs ≥ 2–3 per group |
| dmrseq | generalised least squares on transformed proportions; spatial correlation | pooled permutation null; region FDR | ≥ 2 samples per group |
| methylKit | logistic regression (+ overdispersion) | tiles or merged CpGs | popular for RRBS |
| metilene | segmentation, no model per CpG | yes | very fast, few assumptions |
| limma on M-values | linear model | DMRcate, bumphunter | arrays (Methylation arrays) |
| idea | key fact |
|---|---|
| data | methylated and total reads per CpG and sample; no library-size normalisation |
| model | binomial sampling + beta biological variation = beta-binomial; Var = Np(1−p)[1+(N−1)φ] |
| replicates | K562 replicates ~binomial (z variance 1.05); GM12878 overdispersed (3.44) |
| pooling | Fisher on pooled reads calls 20 902 false CpGs between two GM12878 replicates |
| smoothing | borrows neighbours (BSmooth, DSS); blurs sharp single-CpG changes |
| DML vs DMR | CpG tests, then merging rules; region FDR needs region-level methods (dmrseq) |
| effect size | report Δβ; use a delta threshold |
| this dataset | 5 061 DMRs; 95% lower in K562, mostly in hypomethylated domains; gains at CGIs |
| design | cell lines ≠ populations; composition, age, sex, genotype, batch confound |
Not required reading and not examined. For those who want the primary literature.