Experimental design and QC

Replicates, controls, spike-ins and the quality metrics shared by epigenomic assays

Epigenetics

About this lecture

You can align reads and make a coverage track (From reads to coverage). Whether that track means anything depends on decisions made before the first read was sequenced, and on a handful of numbers you should check before the first peak is called.

  • Design: biological replicates, controls (input, IgG, none), antibodies, spike-ins for global changes, batches.
  • QC metrics shared by ChIP-seq, ATAC-seq and CUT&Tag: library complexity, duplicates, FRiP, fingerprint, strand cross-correlation, replicate concordance, and for ATAC TSS enrichment and fragment sizes.
  • What each metric looks like on good and bad data, and the ENCODE thresholds.
  • Real numbers from the course data: GM12878 CTCF ChIP-seq with its input, and ATAC-seq in two replicates, on chr21.
  • How to read a methods section, and the red flags in published data.

What makes an epigenomic experiment interpretable?

  • Each step from cells to peaks can fail silently: the pipeline still produces a BAM, a bigWig and a peak list.
  • Each failure leaves a fingerprint in the data that a QC metric is designed to catch.
  • Two failures cannot be repaired afterwards: no replicates and no control. Plan them before the experiment.

Replicates: biological, technical and pseudo

  • Biological replicates (independent cultures, animals, patients) are what a claim about biology needs. ENCODE requires at least two; for differential analysis use at least three per condition, as in RNA-seq.
  • Technical replicates only measure the noise of the protocol. Pseudoreplicates (random halves of one library) only measure counting noise: a stand-in when there is a single sample, never evidence of reproducibility.

Why a control? The background is not flat

  • Reads pile up where nothing is bound: open chromatin shears more easily, amplified regions have more DNA, repeats get no unique reads, GC-rich fragments amplify better.
  • An input library (sheared chromatin, no antibody) shows exactly these biases. Peak callers compare the ChIP to it locally, not to a flat average.

Input, IgG or no control

  • Input is the standard for ChIP-seq (ENCODE): cheap, complex, captures shearing, copy number and mappability.
  • IgG mimics the IP but recovers little DNA, so the library is often small and noisy.
  • ATAC-seq and CUT&Tag have no input: the background is estimated from the sample itself. Comparing conditions and replicates carries the weight instead.

Real data: CTCF ChIP and its input on chr21

  • Left: reads per million in 1 kb bins over 400 kb. The ChIP has sharp peaks at the ENCODE peaks; the input is low, with small bumps at some of the same sites.
  • Right: 100 kb bins over all of chr21. ChIP and input rise and fall together (correlation 0.87): no reads on the unassembled short arm and the centromere, more reads in gene-dense regions. That is background, and the input measures it.

Antibodies decide what you measure

  • A ChIP is only as specific as its antibody. Check: one main band on an immunoblot (ENCODE: at least 50% of the signal), and a second line of evidence: IP–mass spectrometry, a second antibody or an epitope tag, the expected motif, or loss of signal in a knockout or knockdown.
  • Histone-mark antibodies can cross-react with neighbouring states (H3K4me2 vs me3) or be blocked by a modification next door. Lots differ: record the lot number.

Normalisation assumes the total does not change

  • Standard normalisation (CPM, RPKM, DESeq2 size factors) makes every library the same total. Fine when most sites do not change.
  • An EZH2 inhibitor removes most H3K27me3 everywhere. The IP still returns DNA, the library is sequenced to the same depth, and after normalisation the tracks look unchanged.
  • To see a global change you need an external reference added in a known amount: a spike-in.

Spike-in normalisation (ChIP-Rx)

  • Add the same amount of foreign chromatin (e.g. Drosophila cells, or synthetic modified nucleosomes) to each sample before the IP. The antibody pulls down the fly mark too.
  • The fly reads measure how efficient the IP was in each sample. Scale each human signal by \alpha = 1/N_\text{fly} (fly reads, in millions).

A toy spike-in calculation

control EZH2 inhibitor
reads mapped, total 20 M 20 M
reads on the fly genome, N_\text{fly} 1 M 4 M
reads on the human genome 19 M 16 M
reads in one H3K27me3 domain 1900 1600
per million human reads (CPM) 100 100
spike-in scaled, reads \times\ 1/N_\text{fly} 1900 400
  • CPM says nothing changed. The spike-in says the domain lost 1 - 400/1900 \approx 79% of its H3K27me3.
  • The inhibitor-treated IP pulled down less human DNA, so the same amount of fly chromatin made up a larger share of the library.

Batches and confounding

  • Day of processing, antibody lot, sequencing run and operator all change the data. If they line up with the condition, the effect is not identifiable: no software can fix it.
  • Spread conditions across batches, record the batches, and put them in the model, ~ batch + condition, exactly as in DESeq2.

Sequencing depth and saturation

  • Peaks called by MACS3 on random subsamples of the chr21 reads. CTCF saturates: about 500 peaks from half of the reads on. ATAC does not: weaker accessible sites keep appearing with depth.
  • ENCODE: 20 M usable fragments per replicate for TFs and narrow marks, 45 M for broad marks, 25 M non-duplicate, non-mitochondrial fragments for ATAC-seq. Depth cannot rescue a poor library: once every unique molecule has been read, more sequencing only adds duplicates.

Library complexity: NRF, PBC1, PBC2

  • Count reads by their start position and strand. A complex library has almost every read at its own position; a bottlenecked library (little starting DNA, too many PCR cycles) has the same molecules many times.
  • NRF = distinct positions / reads. PBC1 = positions with exactly one read / distinct positions. PBC2 = positions with one read / positions with two.

Real data: complexity and duplicates

chr21 reads or fragments NRF PBC1 PBC2 duplicates ENCODE, genome-wide NRF / PBC1 / PBC2
CTCF ChIP 251 469 0.80 0.88 13.1 20% 0.75 / 0.84 / 9.9
input 110 212 0.99 0.99 77.9 1%
ATAC rep1 316 185 0.80 0.80 5.2 20% 0.79 / 0.80 / 5.1
ATAC rep2 288 420 0.89 0.89 9.6 11% 0.88 / 0.89 / 9.2

Fraction of reads in peaks (FRiP)

  • FRiP = reads overlapping peaks / all mapped (filtered) reads. A direct measure of how much of the library is signal.
  • Guides: ENCODE inspects TF ChIP with FRiP below 1%; for ATAC-seq FRiP should be > 0.3 (0.2 acceptable). Broad histone marks and good CUT&Tag reach much higher values.
  • FRiP depends on the peak caller and the number of peaks: compare samples only with the same peak set or the same caller and settings.

Real data: FRiP

  • CTCF ChIP: 22% of reads in the 405 ENCODE CTCF peaks on chr21, which cover only 0.19% of the chromosome. ATAC: 59% and 50% of reads in ATAC peaks (1.5% of chr21). All far above the guidelines.
  • The input has 1.6% of its reads in CTCF peaks and 8.3% in ATAC peaks: 5–8 times more than uniform. Input DNA is enriched in open chromatin.

The fingerprint plot

  • Divide the genome into bins, count reads, sort the bins from fewest to most reads, and plot the cumulative fraction of reads (deepTools plotFingerprint, after the CHANCE method).
  • A uniform library (input) follows the diagonal. A good ChIP stays low and then rises steeply: a small fraction of the genome holds a large fraction of the reads.

Real data: fingerprint of CTCF ChIP and input

  • The input is closest to the diagonal; CTCF bends further; ATAC has the sharpest elbow.
  • Top 1% of 1 kb bins hold 8% of input reads, 30% of CTCF reads and 52% of ATAC reads.
  • All curves are flat up to 0.3–0.4: those bins have no reads at all (short arm, centromere, gaps). Only the rest of the chromosome is informative.

Strand cross-correlation

  • Single-end reads come from the 5’ ends of fragments: around a bound site, + strand reads pile up to the left, − strand reads to the right, one fragment length apart.
  • Shift the − strand coverage by k bp and correlate it with the + strand: the correlation peaks at the fragment length. A second peak at the read length (“phantom”) comes from mappability, not from binding.
  • NSC = CC(fragment) / min(CC); RSC = (CC(fragment) − min) / (CC(read) − min). ENCODE repeats experiments with NSC < 1.05 and RSC < 0.8.

Real data: CTCF cross-correlation

  • CTCF: a clear fragment-length peak at 93 bp (ENCODE: 90–95 bp). The read-length position (36 bp, dotted) lies on its rising flank. RSC 1.65 (ENCODE 1.69–1.86): passes.
  • Input: low, noisy, no fragment peak (RSC ≈ 1).
  • Our NSC (47) is far above ENCODE’s (4.9–10): NSC depends on how the background minimum is estimated. Compare it only between datasets computed the same way.

Replicate concordance

  • Count reads in bins (or peaks) in each replicate and correlate (deepTools multiBamSummary, plotCorrelation). ATAC rep1 vs rep2: r = 0.94 (log counts) in 10 kb bins, 0.99 in ENCODE peaks.
  • Smaller bins are noisier: 0.81 in 1 kb bins. Different assays correlate less: ATAC vs CTCF 0.65.
  • A high correlation is necessary, not sufficient: it is driven by shared background and the strongest regions.

IDR: are the same peaks found in both replicates?

  • The irreproducible discovery rate (Li et al. 2011) compares the ranks of matched peaks in two replicates and keeps the peaks that are consistently strong. ENCODE’s TF and ATAC peak sets (including the ones we use) are IDR-thresholded.
  • ENCODE passes an experiment if the rescue and self-consistency ratios (true replicates vs pseudoreplicates) are both < 2. Details in Peak calling.

ATAC-seq: fragment sizes and TSS enrichment

  • Fragment sizes: a nucleosome-free peak below 100 bp, then mono- and di-nucleosome humps (~200 and ~400 bp). ENCODE requires the NFR and mono-nucleosome peaks to be present.
  • TSS enrichment: Tn5 insertions at TSSs relative to 2 kb away. Here 33 (rep1) and 24 (rep2); ENCODE: > 7 ideal (GRCh38, RefSeq TSSs), and reports 28–30 and 22–23 for these replicates.
  • Also check the mitochondrial fraction (here 14% and 10% genome-wide) and FRiP. Details in ATAC-seq: Tn5, fragment sizes, nucleosome ladder.

Reading a MultiQC report

  • MultiQC collects the logs of fastp, Bowtie2, samtools, Picard, deepTools, MACS and many more into one HTML report, one row per sample. nf-core pipelines produce one at the end of every run.
  • Read it across samples: the bad sample is the one that differs from its replicates. Then open the plots behind the number (duplication curve, fingerprint, cross-correlation).

ENCODE standards at a glance

metric ChIP-seq (TF, histone) ATAC-seq
replicates ≥ 2 biological ≥ 2 biological
depth per replicate 20 M usable fragments (TF, narrow marks); 45 M (broad marks) 25 M non-duplicate, non-mito fragments
control input with matching run type and read length none
NRF / PBC1 / PBC2 > 0.9 / > 0.9 / > 10 (ideal); < 0.5 / < 0.5 / < 1 severe > 0.9 / > 0.9 / > 3
FRiP TF: inspected if < 1% (Landt 2012); no fixed threshold now > 0.3 (> 0.2 acceptable)
NSC / RSC repeat if < 1.05 / < 0.8 (Landt 2012) (not used)
reproducibility IDR rescue and self-consistency ratios < 2 IDR ratios < 2
ATAC only alignment > 95% (> 80%); TSS enrichment > 7 ideal, 5–7 acceptable (GRCh38, RefSeq); NFR and mono-nucleosome peak present

Red flags in published data

  • No input for a ChIP-seq, or the same input reused for unrelated cell types. n = 1 with claims about differences between conditions.
  • FRiP of 1–2% for a histone mark, a fingerprint that looks like the input, duplication above 50% with no comment, fewer reads than the standard.
  • A global change (inhibitor, knockout of a writer) normalised by read depth. Conditions processed on different days. No antibody catalogue or lot number.

Summary

idea key fact
replicates ≥ 2 biological (ENCODE), ≥ 3 per condition for differential tests; pseudoreplicates are not replicates
controls input for ChIP (shearing, copy number, mappability); IgG often too little DNA; ATAC has none
antibodies one main band, a second line of evidence, knockout loses the signal
global changes depth normalisation hides them; spike-in chromatin, scale by 1/N_\text{spike}
batches never confound with condition; model ~ batch + condition
complexity NRF, PBC1 = M_1/M_\text{distinct}, PBC2 = M_1/M_2; computed before duplicate removal
enrichment FRiP; fingerprint (input on the diagonal, ChIP bends); NSC, RSC from strand cross-correlation
reproducibility correlation of binned counts; IDR on ranked peaks
ATAC fragment-size ladder, TSS enrichment, mitochondrial fraction

Key papers (optional further reading)

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