19 Case study: DNA methylation
Differentially methylated regions (DMRs) are regions whose CpG methylation differs between conditions. This chapter follows one reduced-representation bisulfite sequencing (RRBS) experiment through EpiNexus: the library type, quality control, the DMRs and where they lie. It also explains how dmrseq decides what is significant, and why a careful analysis can find no DMRs at all.
- how EpiNexus tells RRBS from whole-genome bisulfite sequencing (WGBS), and what RRBS changes in trimming and duplicate removal;
- how to check bisulfite conversion, depth and the M-bias plot;
- how dmrseq finds candidate regions and builds a null from sample swaps;
- why the loss of de novo methylation in this dataset was focal, and how to read changes on the X chromosome;
- what to check when a run finds no DMRs.
19.1 The question
DNA methylation is added to CpGs by enzymes called DNA methyltransferases. Two of them, Dnmt3a and Dnmt3b, add methyl groups to CpGs that were not methylated before. This is called de novo methylation (Zocher et al. 2021). When the stem cells of the adult brain turn into neurons, which CpGs need these two enzymes? We compared neurons made from stem cells that lacked both enzymes with neurons made from normal stem cells.
19.2 The dataset
The data come from a study by Zocher and colleagues, deposited in the Gene Expression Omnibus (GEO) as GSE167954 (Zocher et al. 2021). In their mice, the Dnmt3a and Dnmt3b genes can be cut out by an enzyme called Cre. Some mice also carry the Cre gene (Nestin::CreERT2), which becomes active in neural stem cells after treatment with the drug tamoxifen. The authors grew neural stem cells from the hippocampus of both kinds of mice, turned them into neurons in culture, and sorted the neurons. They then made RRBS libraries (Chapter 1) from three cell lines per genotype (Table 19.1).
| Sample | GEO | Genotype | Reads |
|---|---|---|---|
| Neuron_WT1 | GSM5116896 | control | 13.86 million |
| Neuron_WT2 | GSM5116897 | control | 10.41 million |
| Neuron_WT3 | GSM5116898 | control | 13.93 million |
| Neuron_KO1 | GSM5116899 | without Dnmt3a/b | 13.54 million |
| Neuron_KO2 | GSM5116900 | without Dnmt3a/b | 15.66 million |
| Neuron_KO3 | GSM5116901 | without Dnmt3a/b | 15.43 million |
Together, the files are about 3.0 GB. The study used the mm10 genome, and we therefore used it too.
- Create a project with the genome Mouse (mm10), and import the six GSM numbers. The import uses GEO’s genotype labels, such as nestin::CreERT2(+/-)-Dnmt3a-2lox-Dnmt3b-2lox for the knockout.
- Start a run: DNA Methylation, Full Pipeline, genome mm10. On the Samples & Genome step, make one group per genotype and check the comparison: knockout first, control second. Neither label looks like a control. EpiNexus therefore guesses the reference group and says “reference guessed — check it” (since version 1.2.7). Make sure that the reference is the control, (-/-).
- On the Parameters step, keep Library type at Detect from the reads (recommended). Under Advanced Parameters, the defaults are Minimum reads per CpG, in every sample = 4 and Region FDR (q-value) = 0.05. This run used 10 reads.
The run used in this chapter is c6a0187f, made with EpiNexus 1.2.4. It is a Run again of an earlier run made with EpiNexus 1.2.2; both found the same numbers of candidates, swap regions and DMRs (Chapter 20).
Figure 19.1 and Figure 19.2 show the two steps of the run wizard.
19.3 RRBS or WGBS?
RRBS and WGBS are the two kinds of bisulfite library. They need different processing (Chapter 5), and EpiNexus therefore first checks which kind it has. RRBS cuts the DNA with the enzyme MspI at CCGG sites. Therefore, “the first three bases of (almost) all RRBS reads are either CGG or TGG” (Krueger 2026b). EpiNexus reads the start of each sample’s first reads. Here, 90–96 % of the reads started with CGG or TGG, and EpiNexus therefore treated the samples as RRBS. (EpiNexus calls a sample RRBS above 50 % and WGBS below 20 %; these thresholds are its own.)
RRBS changes two steps of the processing:
- Trimming. Trim Galore runs with
--rrbs, which removes the bases that library preparation fills in at the end of each fragment (Krueger 2026b). - No duplicate removal. Every RRBS fragment starts at an MspI site. Reads from different DNA molecules therefore start at the same places, and removing “duplicates” would discard real data. EpiNexus aligns bisulfite reads with Bismark (Krueger and Andrews 2011). Bismark’s documentation says that “deduplication is not recommended for RRBS, amplicon or other target enrichment-type libraries” (Krueger 2026a).
19.4 Quality control
Quality control (QC) of bisulfite data checks the conversion, the depth and the methylation values of each library.
| Sample | MspI starts | Reads | Mapped | Mean depth | mCpG | mCHH | Conversion |
|---|---|---|---|---|---|---|---|
| control 1 | 92 % | 13.8 M | 73.0 % | 15.9× | 22.1 % | 0.7 % | 99.3 % |
| control 2 | 96 % | 10.4 M | 71.1 % | 12.3× | 27.5 % | 0.7 % | 99.3 % |
| control 3 | 91 % | 13.9 M | 73.5 % | 17.5× | 18.8 % | 0.7 % | 99.3 % |
| knockout 1 | 90 % | 13.5 M | 71.2 % | 12.3× | 25.2 % | 0.7 % | 99.3 % |
| knockout 2 | 92 % | 15.6 M | 70.9 % | 14.1× | 26.2 % | 0.7 % | 99.3 % |
| knockout 3 | 91 % | 15.4 M | 70.4 % | 13.5× | 26.7 % | 0.7 % | 99.3 % |
The libraries were good (Table 19.2):
- Conversion was 99.3 % in every sample. Bisulfite must convert every unmethylated cytosine. In mammals, cytosines outside CpGs (CHH) are almost never methylated. The share of “methylated” CHH (0.7 %) therefore shows the cytosines that bisulfite missed. ENCODE asks for a conversion rate of at least 98 % (ENCODE Project Consortium 2026).
- Depth. Each covered CpG was read 12 to 18 times on average.
- Methylation values had the expected shape: in every sample, most CpGs were near 0 % methylated and a second group was near 100 %.
- Replicates. In the sample principal component analysis (PCA), the first component (76.2 % of the variation) separated the two genotypes.
The Quality Control page shows the same table (Figure 19.3).
The mCpG values ranged from 18.8 % to 27.5 %. The three lowest values and the three highest values each mixed both genotypes. This number averages all CpG calls, weighted by reads. RRBS reads gather in CpG islands, which are mostly unmethylated. The value therefore depends on where each library’s reads fell, and not only on methylation. Compare samples CpG by CpG, as the DMR test does.
The M-bias plot shows methylation by position along the read (Figure 19.4). After the first few bases, it was flat, as expected. The first three positions were higher in every sample. These positions read the CpG of the MspI site where the DNA was cut: “every read provides information on at least one CpG right in the start” (Krueger 2026b). They therefore measure a different set of CpGs from the rest of the read, and the pattern was the same in all six samples.
19.5 Calling DMRs with dmrseq
EpiNexus finds DMRs with dmrseq (Korthauer et al. 2019), which works in four steps:
- Choose the CpGs to test. EpiNexus summed the two strands of each CpG, then kept the CpGs with at least 10 reads in every sample. This left 520,396 CpGs. With a minimum of 1 read, 1.2 million CpGs would be covered in every sample; each extra read required removes some.
- Find candidate regions. dmrseq smooths the methylation difference along the genome and looks for runs of at least 5 CpGs where the difference is above 10 points. It found 4,132 candidates.
- Build a null. dmrseq swaps samples between the two groups, so that each new “group” mixes both genotypes, and looks for candidates again. Any region found in this way therefore cannot come from the genotype. With three samples per group, there are 9 such swaps. They gave 1,656 to 2,104 candidates each, 17,298 in all.
- Compare. Each real candidate gets a p-value: the share of the 17,298 swap regions that are at least as strong. The p-values are then corrected for testing many regions, and the regions with q ≤ 0.05 are DMRs: 3,188 in this run.
Step 4 has a lower limit. With 17,298 swap regions, the smallest possible p-value is 1 / 17,299, about 0.00006. The strongest candidates all reached it. This is why the top of the volcano plot is flat: 289 DMRs shared the smallest q-value, 0.0008 (Figure 19.5).
Test regions with a method that accounts for the differences between replicates, and that controls the FDR for regions. dmrseq builds its null from sample swaps, “a pooled null distribution, that can be implemented even when as few as two samples per population are available”, and “accurately controls the false discovery rate” (Korthauer et al. 2019). No publication sets the minimum reads per CpG for such a test. EpiNexus’s default is 4 reads in every sample.
19.6 Results: focal loss of methylation
3,188 DMRs: 3,148 lost methylation without Dnmt3a/b, and 40 gained it. The losses were large: the median DMR lost 36 points, and 2,814 DMRs changed by 20 points or more. The median DMR was small: 7 CpGs over 163 bp.
However, the average methylation over all covered CpGs barely changed: 46.3 % in control neurons, against 44.3 % in neurons without the enzymes (Figure 19.6). The loss was therefore focal. This suggests that Dnmt3a/b methylate specific places, not the whole genome.
Where. EpiNexus places every DMR on the CpG-island map of the genome: an island, a shore (up to 2 kb from an island), a shelf (2–4 kb) or the open sea beyond (Irizarry et al. 2009; Cavalcante and Sartor 2017). It then compares the CpGs in DMRs with all tested CpGs. In RRBS, most tested CpGs lie in islands (64 % here). The CpGs that lost methylation were less often in islands than the tested CpGs (49 %), and twice as often in shores (24 % against 12 %; Figure 19.7).
Genes. Some of the strongest losses lay in CpG islands of genes that neurons use, such as Egr3 (21 CpGs, −78 points) and Neurod1 (−63 points), and of Hic1 (24 CpGs, −81 points). These regions lost most of their methylation without Dnmt3a/b.
The gains. Of the 40 gains, 22 lay on the X chromosome, 21 of them in CpG islands of X-linked genes such as Zic3, Efnb1 and Rps4x. Of the 3,148 losses, only 28 (0.9 %) were on the X. All six samples came from female mice (according to GEO). In female cells, one X chromosome is silenced, and the CpG islands on the silent X are methylated. The gains on the X therefore more likely reflect the X-chromosome state of the cell lines than the missing enzymes. This is an interpretation, not a test.
When changes cluster on the X or Y chromosome, check the sex and the X-chromosome state of each sample before reading them as an effect of your treatment. Cultured female cells can lose an X chromosome or partly re-activate the silent one. EpiNexus 1.4 does not yet check this; instead, look at the DMRs per chromosome on the Methylation page.
The Methylation page shows the DMR table, the volcano plot, the CpG-island context and a Samples tab with the sample PCA and correlation. The bisulfite QC table and the M-bias plots are on the Quality Control page. The export has the DMRs (dmrs.csv), every candidate region with its p- and q-value (candidates.csv), the figures, and each sample’s CpG calls.
19.7 When there are no DMRs
A careful analysis can find no DMRs. The most common reason is the design: few samples, or replicates that differ from each other.
dmrseq can only use swaps that mix the genotypes. With three samples per group, as here, there are 9, whereas with two samples per group there are only 2. The null then holds the regions of only two swaps, and a real region must stand out against both. If the two replicates of a group differ, the swaps produce strong regions of their own, and few real candidates stand out against them.
EpiNexus warns about this on the Review step of the run wizard: “… has 2 samples per group: dmrseq can compare it with only 2 sample-swapped versions of the data”. If a run finds no DMRs:
- Look at the candidates. EpiNexus lists the strongest candidate regions, marked as not significant, with the counts of candidates and swap regions. A real change that is too weak to pass the threshold appears there.
- Look at the replicates. If the PCA does not separate the groups, the swaps find as much as the real comparison does.
- Add samples. A third sample per group raises the number of swaps from 2 to 9.
A test that pools the reads of each group, and ignores how much the replicates differ, reports more differences. However, it cannot tell these differences apart from the differences between replicates of the same group (Chapter 2).
Key points
- The library type matters. RRBS needs
--rrbstrimming and no duplicate removal; EpiNexus detects the library type from the reads. - Check conversion first. It was 99.3 % here, above ENCODE’s minimum of 98 %.
- Losses of de novo methylation were focal. In 3,148 regions, methylation fell by a median of 36 percentage points, whereas the average over all CpGs changed by 2 points.
- Read a DMR test through its null. The swaps set the smallest possible p-value, and with two samples per group there are only two swaps.
- Check the sex chromosomes before you interpret changes there.
19.8 Further reading
- Zocher et al. (2021): the study that produced these data, with the role of de novo methylation in adult neurogenesis.
- Korthauer et al. (2019): dmrseq and its permutation test.
- Meissner et al. (2008): RRBS.
- Krueger and Andrews (2011): Bismark, the aligner for bisulfite reads.
- Irizarry et al. (2009): CpG-island shores.