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.

NoteIn this chapter you will learn
  • 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).

Table 19.1: The six RRBS libraries used in this chapter. Single-end reads of 76 bases, from the European Nucleotide Archive.
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.

NoteIn EpiNexus 1.4
  1. 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.
  2. 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, (-/-).
  3. 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.

The Groups and Contrasts step: Neuron_WT1, WT2 and WT3 in group nestin::CreERT2(-/-)-Dn…, Neuron_KO1 in group nestin::CreERT2(+/-)-Dn…, the reference group set to the (-/-) group, one contrast nestin::CreERT2(+/-)-Dnmt3a-2lox-Dnmt3b-2lox versus nestin::CreERT2(-/-)-Dnmt3a-2lox-Dnmt3b-2lox, and Reference Genome Mouse (mm10/GRCm38) with gene annotation GENCODE vM25.
Figure 19.1: Groups & Contrasts on the Samples & Genome step. Each sample’s group is its genotype label from GEO; the labels are long, and the boxes therefore cut them off. The reference is the control group (-/-), so the one contrast is the knockout (+/-) against the control. EpiNexus 1.2 interface.
The Analysis Parameters step: Library type Detect from the reads (recommended) with an explanation of RRBS trimming; an open Advanced Parameters box explaining dmrseq and its Fisher fallback, with Minimum reads per CpG, in every sample set to 4 and Region FDR (q-value) set to 0.05.
Figure 19.2: The Parameters step for a DNA-methylation run. Library type is set to detect RRBS or WGBS from the reads. Under Advanced Parameters are the two settings of the DMR test, here at their defaults: 4 reads per CpG in every sample and a region false discovery rate (FDR) of 0.05. The run in this chapter used 10 reads. EpiNexus 1.2 interface.

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.

Table 19.2: Bisulfite QC from EpiNexus’s report (run c6a0187f). MspI starts: reads starting with CGG or TGG. Mean depth: reads per covered CpG. mCpG, mCHH: share of methylated calls in each context.
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 Quality Control page for the methylation run: a note on the RRBS library and on how conversion is estimated, and a table of six samples with MspI starts 90–96 %, reads 10.4–15.6 million, mapped 70.4–73.5 %, duplicates not deduplicated, mean CpG coverage 12.3–17.5 times, mCpG 18.8–27.5 %, mCHG 0.8 %, mCHH 0.7 % and conversion at least 99.3 %, graded Good.
Figure 19.3: The bisulfite QC table on the Quality Control page (run c6a0187f). The table is wider than the page and is scrolled; the sample names (Neuron_KO1 … Neuron_WT3) are therefore cut off at the left. The line above it says that the library is RRBS and was not deduplicated; Conversion is graded against ENCODE’s 98 %. EpiNexus 1.2 interface.
WarningPitfall: comparing samples by their overall mCpG

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.

Six small line plots, one per sample, of percent CpG methylation against read position from 1 to 76. Each starts at 29–43 %, rises to 52–58 % at position 3, drops to about 11–16 % at position 4, and then stays flat between about 13 and 25 % to the end of the read.
Figure 19.4: M-bias: CpG methylation by position in the read, for each sample. After the first three positions, the lines are flat at about 15–25 %. Figure made by EpiNexus 1.2.4 (run c6a0187f).

19.5 Calling DMRs with dmrseq

EpiNexus finds DMRs with dmrseq (Korthauer et al. 2019), which works in four steps:

  1. 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.
  2. 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.
  3. 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.
  4. 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).

Volcano plot of minus log10 q against the methylation difference in points, from about −92 to +62. Blue points fill the left side from about −9 to −92 points, with two flat rows at the top near −log10 q of 3.1 and 2.95. A few orange points lie on the right between +12 and +62. Grey points fill the area below the dashed line at −log10 q 1.3.
Figure 19.5: Volcano plot of EpiNexus’s DMR result. Each point is a candidate region. Blue: lower methylation without Dnmt3a/b (3,148); orange: higher (40); grey: not significant (944). The flat rows at the top are regions that reached the smallest possible p-value. Figure made by EpiNexus 1.2.4 (run c6a0187f).
TipBest practice

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.

The DNA Methylation Analysis page: cards DMRs 3,188, hyper 40, hypo 3,148; DMR engine dmrseq; four summary cards (CpGs tested 520,396, at least 10 times in every sample, 2.7 million covered; mean methylation 44.3 % for the (+/-) group and 46.3 % for the (-/-) group; global difference −2.0 %); a stacked bar chart of CpG island, shore, shelf and open sea for tested, hypo DMR and hyper DMR CpGs; and a table of odds ratios with q-values.
Figure 19.6: The Overview tab of the Methylation page (run c6a0187f): 3,188 DMRs (40 gained, 3,148 lost), 520,396 CpGs tested with at least 10 reads in every sample, the mean methylation of each group, and the CpG-island context of the DMR CpGs against all tested CpGs, with odds ratios. EpiNexus 1.2 interface.

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).

Grouped bar chart of the share of CpGs in four classes. CpG island: tested 64 %, lost 49 %, gained 64 %. Shore: tested 12 %, lost 24 %, gained 9 %. Shelf: tested 1 %, lost 3 %, gained 2 %. Open sea: tested 22 %, lost 24 %, gained 26 %.
Figure 19.7: CpG-island context of the tested CpGs (grey), the CpGs in DMRs that lose methylation (blue) and those that gain it (orange). Figure made by EpiNexus 1.2.4 (run c6a0187f).

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.

WarningPitfall: changes on the sex chromosomes

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.

NoteIn EpiNexus 1.4

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 --rrbs trimming 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.