Combining marks into chromatin states

From six histone-mark tracks to one annotation of the genome: binarisation, a hidden Markov model, and reference epigenomes

Epigenetics

About this lecture

Each histone-mark track answers one question (“is there H3K4me1 here?”). The genome’s regulatory elements are defined by combinations of marks. This lecture turns six tracks into one annotation: a chromatin state for every 200 bp.

  • The combinatorial idea: which combinations mean promoter, enhancer, transcribed, repressed.
  • Binarisation: a Poisson test per 200-bp bin turns read counts into present/absent.
  • ChromHMM, a hidden Markov model: emission and transition matrices, learning, decoding, choosing the number of states, naming states by their enrichments.
  • Reference epigenomes: Roadmap/ENCODE 15- and 18-state models; Segway briefly; what states are used for.
  • Running example: GM12878, six ENCODE marks + input, chr21, our own ChromHMM model compared with the published Roadmap one.

One mark is ambiguous; combinations are not

  • H3K4me1 alone: a primed or weak enhancer. + H3K27ac: an active enhancer. H3K4me3 + H3K27ac: an active promoter. H3K4me3 + H3K27me3: a bivalent promoter.
  • Six marks, present/absent: 26 = 64 combinations, but a handful dominate the genome.

Real data: six marks, one locus

  • GM12878, ENCODE fold change over input. Below: our binarised marks (200-bp bins) and the states learned in this lecture.
  • Interferon-receptor genes (chr21:33.25–33.55 Mb): promoters (red), flanks and enhancers (orange, yellow), transcribed bodies (green); our 8 states and Roadmap’s 18 agree on the main pattern.

Why a model, not rules?

  • Rules (“H3K4me3 and H3K27ac → promoter”) need thresholds for every mark and break on noise: one missing bin splits an element in two.
  • Real elements are wider than a bin and come in typical neighbourhoods (promoter → flanking → transcribed).
  • A probabilistic model learns, from the data, (1) which mark combinations occur and (2) which ones follow each other along the genome.

Step 1: bins and a Poisson threshold

  • The genome is cut into 200-bp bins; each read is placed by its 5′ end shifted 100 bp towards the fragment centre.
  • A mark is present (1) in a bin if the count is improbably high under a Poisson background: P(X \ge k \mid \lambda) < 10^{-4}.

Binarising chr21

# cell  mark  reads  control
printf "GM12878\tH3K4me3\tgm12878_h3k4me3_chip_chr21.bam\tgm12878_input_chr21.bam\n" >  cellmarkfiletable.txt
...                                                                              # six marks
printf "chr21\t46709983\n" > chr21.sizes
java -mx4G -jar ChromHMM.jar BinarizeBam -b 200 chr21.sizes $D cellmarkfiletable.txt binary
H3K4me3 H3K27ac H3K4me1 H3K36me3 H3K27me3 H3K9me3
reads on chr21 791 771 141 058 401 955 158 528 154 148 285 065
bins called 1 (%) 2.97 1.77 3.61 2.22 0.88 0.96

Real data: which combinations occur?

  • 46 of 64 combinations occur; 91.9% of bins have no mark; the ten most common combinations cover 91% of the marked bins.
  • Top five: H3K36me3 alone (gene bodies), H3K4me1 alone (weak enhancers), H3K4me3 + H3K27ac + H3K4me1 (active promoters), H3K27me3 alone, H3K9me3 alone.

A hidden Markov model

  • Hidden: each bin has one state we do not observe. Observed: the six binary marks.
  • Emission: the state determines the probability of each mark. Transition: the state of the next bin depends only on the state of this bin (Markov).

Emissions: a product over marks

  • P(\text{bin} \mid s) = \prod_m e_{sm}^{\,o_m}(1 - e_{sm})^{1 - o_m}: marks are independent given the state.
  • The observation (H3K4me3 + H3K27ac) is ~47× more likely under TssA than under EnhA.

Transitions smooth along the genome: the Viterbi path

  • Each δ = probability of the best path ending in that state; keep the best predecessor (grey arrows), trace back from the end.
  • The single 0 in bin 3 is absorbed: switching to Q and back costs 0.1 × 0.1, more than one missed mark.

Learning the parameters

  • Nobody tells the model what a promoter is: emissions and transitions are fitted to maximise the likelihood of the binarised data (Baum–Welch, an EM algorithm).
  • EM finds a local optimum; ChromHMM’s default “information” initialisation makes runs reproducible.

Running ChromHMM

java -mx4G -jar ChromHMM.jar LearnModel -b 200 -l chr21.sizes binary model_8 8 hg38
  • Output: emissions_8.png/.txt, transitions_8.png/.txt, GM12878_8_segments.bed (one line per segment), browser files, and enrichment tables for TSSs, genes, CpG islands.
  • OverlapEnrichment and NeighborhoodEnrichment compute the same enrichments for any annotation you give it.

Real data: the emission matrix

  • Ours: active TSS (E4), TSS flanks (E3, E5), weak enhancer (E2), transcribed (E1), H3K9me3 (E7), weak H3K27me3 (E8) and quiescent (E6).
  • Roadmap’s 18 states, learned on many epigenomes, also separate genic enhancers, bivalent and strong Polycomb states; the shared states have similar emissions.

Real data: the transition matrix

  • Most probability on the diagonal: expected run lengths 229 kb (quiescent), 10.6 kb (transcribed), 1.3 kb (TSS states), 0.7 kb (weak enhancer).
  • Off the diagonal: TSS → TSS flank → weak enhancer; weak enhancer ↔︎ weak Polycomb; quiescent bins almost never jump straight to an active state.

Naming states by enrichment

  • Fold enrichment of a state for an annotation A: \dfrac{\text{bins in state and in } A \,/\, \text{bins in } A}{\text{bins in state} \,/\, \text{all bins}}.
  • E4 (TssA): 80× at TSS bins, 51× at CpG islands, 39× at ATAC peaks; E1: 6.7× at exons, 3.7× over gene bodies; E6 (quiescent): depleted everywhere (0.2–0.6).

Real data: states around the TSS

  • E4 (TssA) peaks at the TSS (105×); E3 and E5 rise on both flanks (~11–23× at 1–2 kb); E1 (transcribed) increases downstream into the gene body.
  • The spatial order promoter flank → TSS → flank → transcribed body is learned, not given.

How many states?

  • More states always fit better: the likelihood cannot choose K. BIC tends to choose far too many on genome-sized data.
  • In practice: learn several K, keep the smallest that resolves the distinctions you care about, and check that states are interpretable and reproducible.

Our states vs the published Roadmap model

  • E4 → 86% Roadmap TssA; E6 → 88% Quies; E1 → 95% Tx/TxWk; E7 → 61% ZNF/Rpts + 27% Het. Mixtures: E3 (TssFlnkU + EnhA), E5 (flanks + EnhWk), E8 (Quies + ReprPCWk).
  • In six coarse classes (promoter, enhancer, transcribed, Polycomb, heterochromatin, quiescent) the two maps agree on 68% of bins, but on only 36% of the bins that are not quiescent in both.

Most of the genome is quiet

  • Our quiescent state covers 67% of chr21 (plus 22% nearly unmarked, E8); Roadmap’s 18_Quies 66% of what it covers.
  • Promoter and enhancer states together: ~5% (ours) and ~6% (Roadmap). Transcribed: 5% (ours) vs 11% (Roadmap Tx + TxWk).

Reference epigenomes: Roadmap and ENCODE

  • Roadmap Epigenomics (2015): 111 reference epigenomes (+ 16 from ENCODE = 127) with a common ChromHMM model: 15 states from 5 core marks (H3K4me3, H3K4me1, H3K36me3, H3K27me3, H3K9me3), 18 states with H3K27ac (98 epigenomes), 25 states on imputed data (12 marks).
  • ENCODE (2012, and later): ChromHMM and Segway segmentations of the tier-1 cell lines, including GM12878 and K562; the SCREEN registry of candidate cis-regulatory elements (cCREs) is the newer, element-based annotation.
  • Full-stack ChromHMM (Vu & Ernst 2022): one stacked model of > 1000 datasets, 100 states, a single annotation of the genome that is the same for all cell types.

Concatenated and stacked models

  • Concatenated (Roadmap): one set of states, a separate map per cell type → compare cell types bin by bin (“enhancer in B cells, Polycomb in liver”).
  • Stacked: one map; states encode cross-cell-type patterns.

What states are used for

  • Variants: GWAS hits for a trait are enriched in enhancer states of the relevant cell types (Roadmap 2015; Epigenomics and genetic variation).
  • Cell types: which elements change state between cell types or with disease.

Other segmentation methods

method input model resolution
ChromHMM binarised marks multivariate Bernoulli HMM 200 bp
Segway continuous signal (e.g. −log10 p) dynamic Bayesian network, Gaussian emissions 1 bp
IDEAS, EpiCSeg, Spectacle signal or counts joint across cell types / count models / spectral learning 100–200 bp
  • They agree on the main classes (promoter, enhancer, transcribed, Polycomb, heterochromatin, quiet); they differ in detail and in how many states they find.

Caveats

  • States are labels for mark combinations, not proof of function: “EnhA” means “looks like an active enhancer”.
  • They depend on the marks profiled, the antibodies, the depth and the binarisation threshold: the same cell type profiled twice can give different maps.
  • Cell populations are mixtures: a “bivalent” bin may be a mix of active and repressed cells.
  • 200-bp resolution, one state per bin, marks independent given the state: simplifications that work, not biology.

Summary

topic key idea
combinatorial code elements are defined by combinations of marks, not single marks
binarisation 200-bp bins; 1 if P(X \ge k \mid \lambda) < 10^{-4}, λ from the mark mean × local input
HMM hidden state per bin; emissions (product of Bernoullis); transitions (Markov)
algorithms forward (sum), Viterbi (max), Baum–Welch (EM, local optimum)
interpretation emission matrix + enrichment at TSS, genes, CpG islands → state names
number of states no statistical answer; interpretability and reproducibility
references Roadmap 15/18/25-state models; ENCODE; full-stack 100-state annotation
uses variant annotation, comparing cell types; caveat: annotation ≠ function

Key papers (optional further reading)

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