Peak calling

The local Poisson background, narrow and broad peaks, the role of the input, and reproducibility between replicates (IDR)

Epigenetics

About this lecture

  • MACS step by step for ChIP-seq with an input: fragment length, pileup, the local λ, Poisson p-values, q-values, peaks and summits.
  • What the input does, and what happens without one. Thresholds: how many peaks are real?
  • Broad domains: why narrow callers fail on H3K36me3, and how SICER/epic2 and --broad help.
  • Replicates: the IDR model in detail, pseudoreplicates and ENCODE’s peak sets.

Step 1: the fragment length

sample paired + / − strand peaks predicted d alternatives
CTCF replicate 1 (36 bp reads) 359 100 bp 100
CTCF replicate 2 – 109 bp –
H3K36me3 (51 bp reads) 305 246 bp 17 values from 24 to 595 bp
  • MACS finds strong regions, pairs a + strand pile with a − strand pile downstream, and takes their typical distance as d. Each read is then extended to d.
  • For broad marks the estimate is unstable: set d yourself (--nomodel --extsize 200) or use paired-end reads (-f BAMPE).

Steps 2–3: pileup and the local λ

Real data: λ at 521 CTCF summits

  • Left: the summit of the slide before. The ChIP pileup (brown) and the local λ (blue), which rises under the peak because the input has reads there.
  • Right: with a shallow input (3 reads per kb), the 100-bp window sets λ at 337 of 521 summits; λBG (0.29) at only 43.

The Poisson test, by hand

A candidate summit has pileup k = 25 (after depth scaling). From the input: \lambda_\text{BG} = 0.3, \lambda_d = 2, \lambda_\text{1k} = 4.5, \lambda_\text{10k} = 1.2.

\lambda_\text{local} = \max(0.3,\ 2,\ 4.5,\ 1.2) = 4.5 \qquad p = P(X \ge 25 \mid X \sim \text{Poisson}(4.5)) = 1 - \sum_{x=0}^{24} \frac{e^{-4.5}\,4.5^x}{x!}

λ 0.3 1.2 2 4.5 10
P(X \ge 25) 4.1 × 10−39 1.9 × 10−24 3.2 × 10−19 1.9 × 10−11 4.7 × 10−5
−log10 p 38.4 23.7 18.5 10.7 4.3
  • Fold enrichment = (k + 1) / (λ + 1) at the summit = 26 / 5.5 = 4.7 (MACS adds a pseudocount of 1).
  • The same 25 fragments: overwhelming against the genome average, convincing against the local input, and nothing special inside a region where the input is 10.

From p-values to peaks

  • MACS scores every base by −log10 p, and converts the scores to q-values (Benjamini–Hochberg on the p-scores of all bases, weighted by how many bases have each score).
  • Peak = a run of bases with q below the cutoff (default 0.05; ENCODE and this course 0.01), joined across gaps up to a read length, at least d long. Summit = the base with the highest pileup.
  • narrowPeak columns: summit fold enrichment (7), −log10 p (8), −log10 q (9), summit offset (10).
q cutoff 0.1 0.01 10−5 10−10 10−20 10−40
CTCF peaks (chr21) 573 521 413 319 246 144
also in ENCODE’s IDR set 387 377 343 293 239 140

Real data: how many peaks are real?

  • Right: the fraction of peaks with a CTCF motif within 50 bp of the summit, by rank. Top 50 peaks: 90%; ranks 500–573: 43–60%; random DNA: 4%.
  • There is no clean break: weak peaks are a mixture of weak real sites and noise.

What the input does: CTCF without a control

  • Without input: 816 peaks instead of 521. The 299 extra peaks: 36% with a CTCF motif, 9% in ENCODE’s set.
  • No input means λ from the ChIP itself (λBG and its 10-kb window): no correction for open chromatin, copy number or input pile-ups.

Broad marks need a different caller

Real data: H3K36me3 with three callers

  • Same reads (2 replicates, 170 000 reads on chr21), same input. MACS3 narrow: 11 peaks on all of chr21 (2.8 kb). MACS3 –broad: 123 regions (48 kb). epic2: 671 domains, 3.8 Mb, up to 84 kb long.

Real data: do the domains cover the right genes?

  • epic2 domains cover 58% of the bases of active gene bodies, but only 6.7% of silent ones.
  • 59% of all epic2 domain bases lie in active gene bodies (genes > 5 kb).
  • A biological check without a gold standard: H3K36me3 should follow transcription.

Reproducibility: the IDR model

Real data: IDR on two CTCF replicates

  • 763 and 570 lenient peaks; 472 matched; 291 pass IDR < 0.05. Fitted: μ = 1.95, σ = 0.56, ρ = 0.79, π = 0.60.
  • 281 of our 291 IDR peaks are in ENCODE’s conservative set (405 on chr21, from deeper data).

ENCODE’s reproducibility workflow

Choices and pitfalls

choice what goes wrong do instead
no input, or another cell type’s input peaks at open promoters, amplified regions, input pile-ups input from the same chromatin, sequenced at least as deep
shallow input noisy λ; single input reads decide deeper input; MACS falls back to λBG and larger windows
narrow caller on a broad mark few, fragmented peaks; domains missed --broad, SICER/epic2, window counts; deeper sequencing
fragment model on a broad mark arbitrary d --nomodel --extsize, or paired-end reads
IDR on thresholded peaks no noise component; the model fails lenient calls (p < 0.01) as input
wrong -g λBG off by orders of magnitude effective size of the genome you aligned to
--keep-dup and duplicates strong peaks flattened or PCR stacks called remove duplicates once, then --keep-dup all (or MACS’s default 1 if not removed)
one cutoff for all samples sample depth decides the peak number compare samples in a common peak set (Annotation and differential binding)

Other callers and pipelines

tool idea typical use
MACS3 local Poisson λ from input; narrow and --broad TFs, narrow marks; ATAC; the default
SPP strand cross-correlation, windowed tag differences ENCODE TF pipeline (older versions)
SICER / epic2 windows joined into islands broad histone marks
HOMER findPeaks fixed-width peaks, local and input filters TFs and marks, with motif tools
GEM, ChIP-exo callers read-distribution model, motif-aware high-resolution TF sites
SEACR threshold on the background of near-empty data CUT&RUN / CUT&Tag
ENCODE pipeline, nf-core/chipseq alignment → filtering → MACS → IDR or replicated peaks → QC production

Summary

step key fact
fragment length MACS pairs + and − strand peaks; d ≈ 100 bp for our CTCF; unstable for broad marks: set it
pileup extended fragments over each base; the larger library is scaled to the smaller
local λ \max(\lambda_\text{BG}, \lambda_d, \lambda_\text{1k}, \lambda_\text{10k}) from the input, each scaled to d
test p = P(X \ge k), Poisson(λlocal); q-values by BH over bases; peaks = runs below the cutoff
thresholds no natural cutoff; motif fraction falls with rank; use replicates to decide
input removes open-chromatin, copy-number and pile-up artefacts; without it: more, less specific peaks
broad marks pool windows (SICER/epic2, --broad); validate with biology
IDR ranks only; mixture of reproducible and independent components; lenient input; IDR < 0.05
ENCODE sets Nt, Np, N1, N2; rescue and self-consistency ratios < 2

Key papers (optional further reading)

Not required reading and not examined. For those who want the primary literature.