9 Differential binding and accessibility
A differential analysis compares the signal in the same regions between conditions. Peaks tell you where a signal is; a differential analysis tells you where the signal changes. This chapter explains the five steps of a differential analysis, the choices at each step, and how to read the result. The example is the H3K27ac dataset GSE155100 (Chapter 16).
- the five steps of a differential analysis, from choosing the regions to calling them;
- why normalisation assumes that most regions do not change, and when this assumption fails;
- how DESeq2 tests regions with only a few replicates, and what a false discovery rate means;
- how to read an MA plot and a sample PCA.
9.1 The question
Which regions have more signal, or less, in one condition than in another? And how sure can we be, with only a few replicates per condition?
Comparing peak lists is not enough. A peak can be present in one condition and absent in the other only because peak calling depends on depth and on thresholds (Chapter 7). A differential analysis therefore counts the reads in the same regions in every sample. It then asks whether the difference between conditions is larger than the differences between replicates.
9.2 How it works
A differential analysis has five steps:
- Choose the regions to test.
- Count the reads of each sample in each region.
- Normalise: correct each sample for how deeply it was sequenced.
- Test each region: is the difference between conditions larger than expected from the replicates?
- Call the regions that pass the thresholds, and estimate how large each change is.
1. Which regions to test
The tested regions must be the same in every sample. Three kinds are common (Table 9.1):
| Region type | Used for | Why |
|---|---|---|
| Peaks called on all libraries pooled, merged | Sharp histone marks such as H3K27ac and H3K4me3 | These marks cover a few kilobases. Whole peaks hold more reads than short windows. |
| Fixed windows around peak summits (501 bp) | Transcription factors and ATAC-seq | The sites are short. “Most DNA regulatory elements are less than 500-bp” (Grandi et al. 2022). |
| Sliding windows, merged (csaw) | Broad marks such as H3K27me3 | Broad domains have no clear summits (Lun and Smyth 2016). |
Lun and Smyth compared ways to choose regions for a differential test. They found that “peak-based methods are more powerful for detecting diffuse DB regions”, and that “peaks should be called from pooled libraries” (Lun and Smyth 2014). (DB stands for differential binding.) Peaks called on the pooled libraries do not depend on the condition of any one sample. Therefore the error rate of the later test stays close to the level you asked for.
2. Counting reads
For each sample and each region, the software counts the reads that fall in the region. The result is a count table, with one row per region and one column per sample. Inputs are not counted, because they were used only to call the peaks.
3. Normalisation
Normalisation corrects each sample for how deeply it was sequenced. Each sample’s counts are divided by a size factor, a number that stands for the sample’s depth. There are several ways to compute it:
- RLE (relative log expression, also called median-of-ratios), DESeq2’s default: for each region, the ratio of the sample’s count to a typical sample’s count, then the median of these ratios (Love et al. 2014).
- TMM (trimmed mean of M-values): the average log ratio between samples, after leaving out the regions with the largest changes and the most extreme counts (Robinson and Oshlack 2010).
- Library size (reads in peaks): each sample’s total number of reads in the tested regions.
- Spike-in: the reads from a fixed amount of DNA from another species, added to each sample (Chapter 10).
The first three methods assume that most regions do not change. TMM, for example, “assumes that most regions are not truly DA [differentially accessible]” (Reske et al. 2020). When many regions change in one direction, this assumption no longer holds. Chapter 18 shows an example, and Chapter 10 shows how a spike-in helps.
4. The test
Read counts vary between replicates more than chance alone would explain. DESeq2 describes this extra variation with a dispersion value for each region (Love et al. 2014). With two or three replicates, the dispersion of a single region is a poor estimate. DESeq2 therefore borrows information from the other regions: “we assume that genes of similar average expression strength have similar dispersion” (Love et al. 2014). It pulls each region’s dispersion towards the trend of regions with similar counts.
DESeq2 then tests each region with a Wald test, which gives a p-value. With tens of thousands of regions, some p-values are small by chance. The p-values are therefore converted into a false discovery rate (FDR) with the Benjamini–Hochberg method (Love et al. 2014). An FDR threshold of 0.1 means that up to about 10 % of the called regions are expected to be false positives.
Before this correction, DESeq2 sets aside regions with very few reads, because they have little chance of reaching significance. This “independent filtering” makes the correction less strict for the other regions (Love et al. 2014). Regions that are set aside get no FDR.
5. Calling regions and measuring the change
A region is called gained or lost when it passes an FDR threshold and, often, a minimum fold change. The fold change is reported on a log2 scale: 1 means twice as many reads, and −1 half as many.
Fold changes of regions with few reads are noisy: a count of 3 against 1 is already a three-fold change. Shrinkage pulls such noisy fold changes towards zero, and leaves well-measured fold changes almost unchanged. EpiNexus uses the apeglm method for this (Zhu et al. 2019). Shrunk fold changes are better for ranking and plotting regions (Love et al. 2014).
Report the FDR and any fold-change cut-off with your results. DESeq2’s own default FDR is 0.1: “By default the argument alpha is set to 0.1”. To require a minimum change, DESeq2 can test against a fold-change threshold, instead of filtering the list afterwards (Love et al. 2026). No publication sets these values for ChIP-seq regions. EpiNexus calls a region significant at FDR < 0.1 and an unshrunk |log2 fold change| above 0.5; the second rule keeps very small changes out of the list. EpiNexus uses shrunk fold changes for ranking and for the MA plot.
9.3 In EpiNexus
On the Parameters step of the run wizard:
- Differential comparisons lists every pair of conditions for each mark, ticked. Untick the pairs you do not need. A label such as control, WT or untreated is used as the reference. Use the swap button to reverse the direction.
- Normalization: RLE (DESeq2 default), TMM or Library size (reads in peaks). The defaults are TMM for ChIP-seq, library size for ATAC-seq, and RLE with an E. coli spike-in for CUT&Tag and CUT&RUN.
- Samples with the same replicate number were processed together (paired design): tick this only if each replicate pair really was processed together, for example on the same day. The model then removes the differences between pairs.
EpiNexus chooses the regions from the mark (Table 9.1) and tests them with DESeq2 in R. Broad marks are tested with csaw (Lun and Smyth 2016). The Differential page shows the volcano plot, the MA plot, the sample principal component analysis (PCA) and a heatmap of the top regions. It states the regions, the normalisation and the thresholds that the run used. Download all N peaks (CSV) gives every tested region with its fold changes, p-value and FDR.
Figure 9.1 shows the top of the Differential page for our example.
9.4 Reading the result: GSE155100
The regions and the counts
For H3K27ac, EpiNexus called peaks on the four ChIP libraries pooled, against the four inputs pooled. After merging the peaks, and splitting the regions longer than 5 kb, this gave 92,052 regions. Their median width was 710 bp, and 17 % were longer than 2 kb.
TMM gave size factors between 0.89 and 1.12. The four libraries therefore had similar depths, and no sample needed a large correction.
What the thresholds did
| Step | Regions |
|---|---|
| Tested | 92,052 |
| Set aside by independent filtering (too few reads) | 39,263 |
| FDR < 0.1 | 2,485 |
| FDR < 0.1 and |log2 fold change| > 0.5 (called) | 2,461 (2,267 lost, 194 gained) |
| For comparison: FDR < 0.05, no fold-change rule | 1,963 |
Two results stand out (Table 9.2):
- 43 % of the regions got no FDR. DESeq2’s independent filtering set them aside before the correction, because they had too few reads to pass it. These regions still have a p-value.
- The FDR threshold mattered more than the fold-change rule. The fold-change rule removed only 24 regions, whereas a stricter FDR of 0.05 would have removed about 500.
The called regions also had more reads than the average region: their median mean count was 82, against 17 for all regions. More reads give more power to detect a change.
The MA plot
An MA plot shows each region’s mean count (A, on the horizontal axis) against its fold change (M, on the vertical axis). It answers two questions (Figure 9.2).
- Is the normalisation sound? The grey cloud of unchanged regions should be centred on zero at all counts, and here it was. A cloud that bends up or down would mean that the normalisation does not fit the data.
- Where are the changes? The lost regions spanned the whole range of counts. The losses were therefore not limited to weak regions.
The plot also shows the effect of shrinkage. At the left, regions with few reads sit close to zero. In this run, 777 regions had an unshrunk |log2 fold change| above 2 but a shrunk one below 0.5. Most of them had few reads: their median mean count was 6.6, against 17 for all regions. One region, with a mean count of 3.2, had an unshrunk log2 fold change of 2.5, a shrunk value of 0.03 and a p-value of 0.14. Without shrinkage, such regions would top a list ranked by fold change.
The sample PCA
A sample PCA places the samples by their counts, so that similar samples lie close together (Figure 9.3).
- The first component (63.9 %) separated the two conditions. The genotype was the largest source of difference between the samples.
- The second component (20.9 %) separated the replicates. In each condition, one sample lay at the top and one at the bottom. In EpiNexus’s normalised counts, the two first replicates lay on one side and the two second replicates on the other. The replicate pairs therefore differed in a shared way. This could happen if each pair was prepared or sequenced together.
If you know that the replicate pairs were processed together, tick the paired design in the run wizard (see the box above). If you do not know, leave it unticked: with two replicates per condition, the paired model leaves very little information to estimate the noise.
9.5 Pitfalls
Regions with few reads can show huge fold changes by chance. Rank by FDR, or by shrunk fold change.
A cloud of unchanged regions that is not centred on zero means that the normalisation does not fit the data. Look at the MA plot before you read the list of regions.
An FDR of 0.1 means that up to about one in ten regions in the list is expected to be false. It does not tell you which ones. Check the strongest regions in the genome browser (Chapter 8).
With two replicates, outliers cannot be detected, and the noise estimate leans on the trend across regions. EpiNexus says so on the Differential page. The strongest changes are the most likely to be real; changes near the threshold are less certain (Chapter 2).
Key points
- A differential analysis counts the reads in the same regions in every sample, and compares the difference between conditions with the differences between replicates.
- The regions depend on the target: pooled peaks for sharp histone marks, 501 bp windows for transcription factors and ATAC-seq, and csaw windows for broad marks.
- RLE and TMM assume that most regions do not change. When many regions change in one direction, a spike-in is needed.
- The FDR describes the list, not one region: at an FDR of 0.1, up to about one in ten called regions is expected to be false.
- Rank regions by FDR or by shrunk fold change, and check the MA plot before you read the list.
- In the GSE155100 example, the FDR threshold shaped the list more than the fold-change rule did.
9.6 Further reading
- Love et al. (2014): DESeq2, its dispersion model, independent filtering and shrinkage.
- Lun and Smyth (2014) and Lun and Smyth (2016): choosing regions for differential binding, and csaw.
- Robinson and Oshlack (2010): TMM normalisation.
- Reske et al. (2020): how normalisation changes differential ATAC-seq results.