Annotation and differential binding

Where peaks are relative to genes, profiles and heatmaps, and comparing ChIP-seq between conditions with replicates

Epigenetics

About this lecture

  • Describe: annotate peaks relative to genes (ChIPseeker); profiles and heatmaps (deepTools).
  • Compare: consensus regions → counts → normalisation → DESeq2, the RNA-seq workflow on peaks.
  • Normalisation is where ChIP differs from RNA-seq: signal-to-noise, copy number and global changes (spike-ins).
  • Real data: H3K27ac in GM12878 (B-lymphoblastoid) and K562 (erythroleukaemia), two ENCODE replicates each, chr21.

Annotating peaks

Real data: where are the peaks?

  • H3K27ac: 33% (GM12878) and 40% (K562) of peaks at promoters; CTCF: 18%, and 33% distal intergenic.
  • Median distance to the nearest TSS: H3K27ac 3.6 kb and 2.2 kb, CTCF 8.6 kb; 47% of CTCF peaks are more than 10 kb from any TSS.

The nearest gene is not the target

Profiles and heatmaps

Real data: four marks around chr21 TSSs

  • 220 protein-coding genes, ±5 kb around the TSS, ENCODE GM12878 fold-change tracks, sorted by H3K4me3.
  • The top third of genes: H3K4me3 and H3K27ac at the TSS and H3K36me3 downstream: active.
  • The rest: little of any active mark; some have H3K27me3.
  • One look tells you how many genes are active and that the marks agree.

Real data: H3K27ac in two cell types

  • 841 consensus H3K27ac regions on chr21, grouped by which cell line’s peak set contains them: 378 GM12878 only, 170 both, 293 K562 only.
  • CPM tracks of our four libraries, ±3 kb around the region centres.
  • Replicates agree; cell-type-specific regions are nearly empty in the other cell line.

Differential binding is RNA-seq on peaks

Real data: the count matrix

GM12878 rep 1 GM12878 rep 2 K562 rep 1 K562 rep 2 GM12878 input K562 input
reads on chr21 (filtered) 77 180 63 656 137 885 64 446 67 346 237 564
reads in the 841 regions 42 836 34 973 54 526 28 516 2 808 11 547
FRiP 0.555 0.549 0.395 0.442 0.042 0.049
read length (bp) 51 51 36 36 51 36
  • The GM12878 libraries put more of their reads into peaks: a signal-to-noise difference between the two experiments, not necessarily biology.
  • Read length differs too (51 vs 36 bp): a technical variable confounded with cell type, as are the dates of the experiments.

Normalisation: what is assumed to be constant?

Real data: three normalisations, three answers

  • Same counts, same test (DESeq2, padj < 0.05), different size factors: 264 / 245, 229 / 280, 182 / 319 regions up / down in K562.
  • The size factors differ most for K562 rep 1: 1.43 (peaks), 1.70 (library), 1.94 (background).

Copy number differs between cell lines

  • Share of all reads per chromosome, K562 / GM12878. The inputs show K562’s karyotype: chr22 and chr21 1.2–1.3×, chr9 0.81, chrX 0.68.
  • Any region on an amplified chromosome gets more reads in every library: a “gain” in K562 unless the counts are corrected.

Global changes need spike-ins

A fixed amount of Drosophila chromatin is added to each sample before the IP. DESeq2 accepts any size factors, so use the fly reads:

ctrl 1 ctrl 2 trt 1 trt 2
fly reads (spike-in) 50 000 60 000 100 000 110 000
size factor s_j = N_{\text{fly},j} / \text{geometric mean} 0.66 0.79 1.32 1.45
reads in region A 800 960 800 880
normalised count = reads / s_j 1 213 1 213 606 606
  • Read counts look unchanged; spike-in normalised, region A has lost half its signal.
  • In R: sizeFactors(dds) <- s before DESeq(dds).

Simulated: a global loss, with and without spike-ins

  • 2 000 peaks, 3 + 3 samples, every library sequenced to the same depth. Truth: 95% of peaks lose half their mark, 5% are unchanged.
  • Standard normalisation: the halved peaks look unchanged (mean log2FC −0.05) and the 5% unchanged peaks look up (+0.93). Spike-in: −1.06 and −0.10, the truth.

Real data: a differential locus

  • chr21:25.3–26.25 Mb: a cluster of strong H3K27ac regions in GM12878, absent in K562; 27 of 35 consensus regions here are significantly higher in GM12878.
  • The cluster lies > 100 kb from the nearest protein-coding TSS (MRPL39): which gene it regulates is a separate question.

Tools for differential binding

tool features normalisation test
DESeq2 / edgeR directly your consensus peaks median-of-ratios / TMM, or your own size factors NB GLM
DiffBind consensus of peaks in ≥ n samples library size (default), RLE/TMM, background, spike-in DESeq2 or edgeR
csaw sliding windows, merged after testing background bins or high-abundance windows edgeR, region-level FDR
MAnorm2, ChIPComp peaks model-based, between groups own models
broad marks genes, promoters or large bins as above as above

Pitfalls

pitfall consequence instead
comparing peak numbers or overlaps between conditions thresholds and depth decide “gained” and “lost” sites count reads in a common region set and test
consensus from one condition’s peaks bias towards that condition union of all conditions (or ≥ n samples)
n = 1 per condition no dispersion estimate; any difference “significant” ≥ 3 biological replicates
default normalisation under a global change real losses hidden, unchanged sites look gained spike-ins; check with a western blot
ignoring copy number amplified regions look gained inputs from the same cells; greylists; compare within copy-number states
technical variables confounded with condition batch or read length becomes “biology” balance batches; include them in the design
nearest gene = target gene wrong genes in enrichment analyses contacts, expression correlation, perturbation

Summary

step key fact
annotation category by priority (promoter window!), nearest TSS; descriptive, not functional
nearest gene a label; distal elements often regulate other genes
profiles, heatmaps computeMatrix (reference-point, scale-regions) → plotHeatmap; look at the rows, not just the mean
consensus union of peaks from all conditions (or ≥ n samples), blacklist removed
counts → test DESeq2/edgeR exactly as RNA-seq; ≥ 3 replicates; batch in the design
normalisation library size, reads in peaks, background bins, spike-in: each assumes a different constant
copy number inputs reveal it; corrects or confounds differential binding
global changes only spike-ins (or orthogonal data) can show them

Key papers (optional further reading)

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