Claude Cursor Skill

histone-aggregation

Build comprehensive histone mark maps by aggregating narrowPeak data across multiple ENCODE experiments, donors, and labs. Use when the user wants to answer "where is this histone mark present in my tissue?" by combining peak calls from multiple studies into a union peak set with

LLM Mart · 0 points · 0 views 0 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download ammawla-encode-toolkit-plugin_skills_histone-aggregation-36836c8.zip · 54 KB
Part of ammawla/encode-toolkit — 90 skills

Install

skills CLI npx skills add https://github.com/ammawla/encode-toolkit/tree/main/plugin/skills/histone-aggregation
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install ammawla-encode-toolkit@llmmart
Git git clone https://github.com/ammawla/encode-toolkit.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole ammawla/encode-toolkit collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

Aggregate Histone ChIP-seq Peaks Across Studies

When to Use

  • User wants to combine histone ChIP-seq peaks across multiple ENCODE experiments for a tissue or cell type
  • User asks "where is H3K27ac in pancreas?" or "build a histone mark map for liver"
  • User needs a union peak set from multiple donors, labs, or replicates
  • User wants to create a consensus binding map from multiple ChIP-seq datasets
  • Example queries: "aggregate all H3K4me3 peaks in brain", "combine histone marks across donors", "build enhancer map from H3K27ac data"

Build a comprehensive map of histone mark binding for a tissue/cell type by merging narrowPeak files from multiple ENCODE experiments into a union peak set.

Scientific Rationale

The question: "Does my tissue have this histone mark, and at what genomic locations?"

This is a detection/cataloging question, not a differential one. Once a histone mark passes noise thresholds (ENCODE IDR, quality metrics), detection is binary — the mark is either bound or not. If detected in one donor but not another, that region is still a real binding site. Individual variation and technical differences (lab, depth, antibody lot) explain absence, not that presence is spurious.

Therefore: we want the UNION of all detections, not a consensus.

Literature Support

  • ChIP-Atlas (Oki et al. 2018, EMBO Reports, 597 citations): Integrated >70,000 public ChIP-seq datasets using union of all peak calls
  • ENCODE Phase 3 (Gorkin et al. 2020, Nature, 301 citations): Created unified chromatin state annotations by integrating all peaks across 1,128 ChIP-seq experiments
  • ENCODE Blacklist (Amemiya et al. 2019, Scientific Reports, 1,372 citations): Defined the comprehensive set of problematic genomic regions to filter from all functional genomics analyses. Essential quality step. DOI
  • Perna et al. 2024 (BMC Genomics): Found top 25% signalValue peaks most consistent across different processing pipelines — use as per-sample noise filter
  • ChIP-R (Newell et al. 2020, 26 citations): Rank-product method for combining peaks from multiple replicates without BAMs, works directly on narrowPeak files
  • MSPC (Jalili et al. 2021, BMC Bioinformatics): Rescues weak-but-real binding sites that IDR discards by exploiting replicates to lower calling thresholds — more sensitive alternative for union-based approaches
  • Hecht et al. 2023 (PLoS Comp Bio): Probability-of-Being-Signal (PBS) approach for cross-dataset comparison with differing read depths

Step 1: Find All Available Experiments

Search for all histone ChIP-seq data for the target mark and tissue:

encode_search_experiments(
    assay_title="Histone ChIP-seq",
    target="H3K4me1",        # or H3K27ac, H3K4me3, H3K27me3, etc.
    organ="pancreas",         # user's tissue of interest
    biosample_type="tissue",  # or "cell line", "primary cell"
    limit=100
)

Present a summary table to the user showing:

  • Number of experiments found
  • Labs represented
  • Number of unique donors/biosamples
  • Any audit flags

Use encode_get_facets first if unsure what's available:

encode_get_facets(assay_title="Histone ChIP-seq", organ="pancreas")

Step 2: Quality-Gate Each Experiment

For each experiment, check quality before including:

encode_get_experiment(accession="ENCSR...")

Include if:

  • Audit status: no ERROR flags (WARNING is acceptable)
  • Has IDR thresholded peaks (passed replicate concordance)
  • Sequencing depth meets ENCODE standards (10M+ for narrow marks, 20M+ for broad)

Exclude if:

  • ERROR audit flags
  • Only pseudoreplicated peaks (no IDR = did not pass reproducibility)
  • Known antibody issues (check audit details)

Track all included experiments:

encode_track_experiment(accession="ENCSR...")

Step 3: Download IDR Thresholded NarrowPeak Files

For each passing experiment, get the peak files:

encode_list_files(
    experiment_accession="ENCSR...",
    file_format="bed",
    output_type="IDR thresholded peaks",
    assembly="GRCh38"
)

File selection priority:

  1. IDR thresholded peaks (gold standard — passed replicate concordance)
  2. Optimal IDR peaks (pooled replicates — most complete set)
  3. Replicated peaks (alternative peak caller output)

Prefer preferred_default=True files when available.

Download all selected files:

encode_download_files(
    file_accessions=["ENCFF...", "ENCFF...", ...],
    download_dir="/path/to/data/narrowpeaks",
    organize_by="flat"
)

Validate the downloaded files before filtering. --format must match the file (narrowPeak has 10 columns, broadPeak 9); gzipped inputs are read directly.

python3 scripts/validate_peaks.py sample.narrowPeak [--format narrow|broad] [--blacklist hg38-blacklist.v2.bed]

Step 4: Per-Sample Noise Filtering

IMPORTANT: Filter BEFORE merging, not after.

4a. ENCODE Blocklist Filtering (Amemiya et al. 2019)

Remove artifact-prone regions (centromeres, telomeres, rDNA repeats, satellite repeats):

# Download ENCODE blocklist for GRCh38 from:
# https://github.com/Boyle-Lab/Blacklist/blob/master/lists/hg38-blacklist.v2.bed.gz
# For mm10: https://github.com/Boyle-Lab/Blacklist/blob/master/lists/mm10-blacklist.v2.bed.gz
gunzip -k hg38-blacklist.v2.bed.gz
bedtools intersect -a sample.narrowPeak -b hg38-blacklist.v2.bed -v > sample.filtered.narrowPeak

4b. SignalValue Filtering (Perna et al. 2024)

Filter each sample's peaks to retain those above the 25th percentile signalValue (column 7 in narrowPeak). The top 75% of peaks by signalValue are the most reliable across processing pipelines:

# Calculate the 25th percentile of the signalValue DISTRIBUTION for this sample
# (This is a true quantile, not 25% of the range)
TOTAL=$(wc -l < sample.filtered.narrowPeak)
LINE_25=$(echo "$TOTAL" | awk '{printf "%d", $1 * 0.25}')
THRESHOLD=$(sort -k7,7n sample.filtered.narrowPeak | awk -v line="$LINE_25" 'NR==line{print $7}')
awk -v t="$THRESHOLD" '$7 >= t' sample.filtered.narrowPeak > sample.qfiltered.narrowPeak

Note: This is a per-sample filter. Each experiment has different signal distributions. Do NOT apply a universal threshold across samples.

Step 5: Union Merge Across Samples

5a. Handling Broad vs Narrow Marks

Different histone marks have different peak characteristics:

Mark Class Examples Peak Type Merge Gap (-d)
Narrow/point H3K4me3, H3K27ac, H3K4me1, H3K9ac Sharp peaks 0 (default, overlap only)
Broad/domain H3K27me3, H3K9me3, H3K36me3 Wide domains 1000-5000bp

5b. Label Peaks by Sample Before Merge

CRITICAL: To count unique SAMPLES (not overlapping peaks), tag each peak with its sample ID before concatenation:

# Tag each sample's peaks with a unique sample ID (column 4 = name field)
awk -v sid="sample1" 'BEGIN{OFS="\t"} {$4=sid; print}' sample1.qfiltered.narrowPeak > sample1.tagged.bed
awk -v sid="sample2" 'BEGIN{OFS="\t"} {$4=sid; print}' sample2.qfiltered.narrowPeak > sample2.tagged.bed
# ... repeat for all samples

# Concatenate all tagged peaks
cat sample*.tagged.bed > all_peaks.bed

# Sort by coordinate
bedtools sort -i all_peaks.bed > all_peaks.sorted.bed

5c. Union Merge Command

# Merge overlapping peaks, counting UNIQUE SAMPLES (not peaks)
# For NARROW marks (H3K4me3, H3K27ac, H3K4me1):
bedtools merge \
    -i all_peaks.sorted.bed \
    -c 4,7,9 \
    -o count_distinct,max,max \
    > union_peaks.bed
# Output columns: chr, start, end, n_unique_samples, max_signalValue, max_qValue

# For BROAD marks (H3K27me3, H3K9me3, H3K36me3):
bedtools merge \
    -i all_peaks.sorted.bed \
    -d 1000 \
    -c 4,7,9 \
    -o count_distinct,max,max \
    > union_peaks.bed

Why count_distinct matters: Without it, a sample with 3 overlapping peaks inflates the count to 3 instead of 1, making the confidence annotation wrong.

Note on broad marks: H3K27me3, H3K9me3, and H3K36me3 are typically called as broadPeak (not narrowPeak) in ENCODE. When downloading, check for output_type="replicated peaks" with file_type="bed broadPeak". BroadPeak has the same first 9 columns as narrowPeak minus the summit column.

5d. Alternative: bedtools multiIntersect

If you want to know WHICH samples support each region:

bedtools multiIntersect \
    -i sample1.qfiltered.narrowPeak sample2.qfiltered.narrowPeak ... \
    -header \
    -names sample1 sample2 ... \
    > multi_intersect.bed

Step 6: Confidence Annotation

Annotate each merged region by number of supporting samples. Given N total samples:

Confidence Criteria Interpretation
High Detected in ≥50% of samples Robust binding site, consistent across donors/labs
Supported Detected in 2+ samples Likely real, some individual/technical variation
Novel/singleton Detected in 1 sample only May be real but could be noise — keep but flag
# Add confidence column (assuming N=6 total samples, column 4 = support count)
awk -v N=6 '{
    if ($4 >= N*0.5) conf="HIGH";
    else if ($4 >= 2) conf="SUPPORTED";
    else conf="SINGLETON";
    print $0"\t"conf"\t"$4"/"N
}' union_peaks.bed > union_peaks.annotated.bed

CRITICAL: Do NOT discard singletons. A peak detected in 1 of 6 donors is still a real binding event in that individual. The question is "can this mark bind here?" — and the answer is yes.

Step 7: Log Provenance

Record the entire analysis chain:

encode_log_derived_file(
    file_path="/path/to/union_peaks.annotated.bed",
    source_accessions=["ENCSR...", "ENCSR...", ...],
    description="Union H3K4me1 peaks across N pancreas samples with confidence annotation",
    file_type="aggregated_peaks",
    tool_used="bedtools merge v2.31.0",
    parameters="blocklist filtered, signalValue >= 25th percentile per sample, bedtools merge -d 0 for narrow marks"
)

Step 8: Summary Statistics

Report to the user:

  • Total input experiments: N
  • Experiments passing QC: M
  • Total peaks before merge: X
  • Union peaks after merge: Y
  • High-confidence regions: Z (≥50% support)
  • Supported regions: W (2+ support)
  • Singleton regions: V (1 sample only)
  • Genome coverage: bp covered / total genome

Common Pitfalls

  1. Assembly mismatch: ALL files must use the same assembly (GRCh38 or hg19). Use encode_compare_experiments to verify.

  2. Broad marks need gap tolerance: H3K27me3 domains can span 10-100kb. Adjacent peaks from different samples should be merged with -d 1000 or more.

  3. Don't use consensus for cataloging: Requiring presence in N/M samples discards real biology. Consensus is for high-confidence subsets, not comprehensive catalogs.

  4. Filter noise per-sample, not post-merge: SignalValue thresholds must be applied within each sample because signal distributions differ by library/sequencing depth.

  5. Antibody lot variation: Even same-target experiments can have different peak profiles due to antibody batch effects. This is expected — it's why we use the union.

  6. Peak width variation across labs: Different peak callers and parameters produce different peak widths. bedtools merge handles this naturally by collapsing overlaps.

  7. ChIP-R as alternative: If the user wants a more statistical approach than simple union, recommend ChIP-R (rank-product method on narrowPeak files, no BAMs needed). But for the "is it bound anywhere?" question, union is more appropriate.

  8. Peak summits are lost after merge: NarrowPeak column 10 encodes the peak summit position (offset from start). bedtools merge discards this. If downstream analysis requires summit positions (e.g., motif analysis), extract summits before merging and map back afterward.

  9. CUT&RUN/CUT&Tag data need a separate suspect list: The ENCODE blacklist was designed for ChIP-seq. Nordin et al. 2023 (Genome Biology) showed CUT&RUN has its own problematic regions. If incorporating CUT&RUN/CUT&Tag data, apply both the ENCODE blacklist AND the CUT&RUN suspect list.

Histone Mark Interpretation

For detailed biological meaning of each histone mark (writers, erasers, readers, contradictions, cancer-specific states), consult the comprehensive reference at references/histone-marks-reference.md (co-located in this skill's references directory). This catalog covers 21 individual marks, ChromHMM combinatorial states, functional categories, and 37 key papers.

Key mark-type considerations for aggregation:

  • Narrow marks (H3K4me3, H3K27ac, H3K4me1, H3K9ac): Use narrowPeak files, standard merge
  • Broad marks (H3K27me3, H3K9me3, H3K36me3): Use broadPeak files when available; narrowPeak underestimates domain size
  • Context-dependent marks (H3K4me1): Meaning depends on co-occurring marks — H3K4me1+H3K27ac = active enhancer, H3K4me1+H3K27me3 = poised enhancer, H3K4me1 alone = primed enhancer (Creyghton et al. 2010, Rada-Iglesias et al. 2011)

Walkthrough: Building a Consensus H3K27ac Map for Pancreatic Islets

Goal: Aggregate H3K27ac peaks from 5 ENCODE experiments into a union peak set for pancreatic islets. Context: User wants to identify all genomic regions with active enhancer marks across multiple donors.

Step 1: Find all H3K27ac experiments for pancreas

encode_search_experiments(
  assay_title="Histone ChIP-seq",
  organ="pancreas",
  target="H3K27ac"
)

Expected output:

{
  "results": [
    {"accession": "ENCSR111PAN", "biosample_summary": "pancreas tissue male adult (44 years)"},
    {"accession": "ENCSR222PAN", "biosample_summary": "pancreas tissue female adult (51 years)"}
  ],
  "total": 5,
  "limit": 25,
  "offset": 0,
  "has_more": false,
  "next_offset": null
}

Step 2: Download IDR-thresholded peaks for each experiment

encode_search_files(
  assay_title="Histone ChIP-seq",
  organ="pancreas",
  target="H3K27ac",
  file_format="bed",
  output_type="IDR thresholded peaks",
  assembly="GRCh38"
)

Expected output:

{
  "results": [
    {"accession": "ENCFF100PK1", "output_type": "IDR thresholded peaks", "file_size_human": "1.2 MB"},
    {"accession": "ENCFF200PK2", "output_type": "IDR thresholded peaks", "file_size_human": "1.5 MB"}
  ],
  "total": 5,
  "limit": 25,
  "offset": 0,
  "has_more": false,
  "next_offset": null
}

Step 3: Merge into union peak set with bedtools

cat *.bed | sort -k1,1 -k2,2n | bedtools merge -i - -c 4,5 -o count,mean > union_h3k27ac_pancreas.bed

Interpretation: Peaks present in ≥3 of 5 experiments are high-confidence tissue enhancers. Singleton peaks may reflect donor-specific or noise peaks.

Code Examples

1. Search for histone peaks to aggregate

encode_search_files(
  assay_title="Histone ChIP-seq",
  organ="liver",
  target="H3K4me3",
  file_format="bed",
  output_type="IDR thresholded peaks",
  assembly="GRCh38"
)

Expected output:

{
  "results": [{"accession": "ENCFF999LIV", "output_type": "IDR thresholded peaks", "assembly": "GRCh38"}],
  "total": 8,
  "limit": 25,
  "offset": 0,
  "has_more": false,
  "next_offset": null
}

Integration

This skill produces... Feed into... Using tool/skill
Union peak set (BED) Peak annotation with genes peak-annotation skill
Consensus enhancer map Chromatin state classification regulatory-elements skill
Multi-donor confidence scores Quality filtering quality-assessment skill
Tissue histone mark catalog Cross-tissue comparison compare-biosamples skill
Peak coordinates for motif analysis TF motif enrichment motif-analysis skill

Related Skills

  • accessibility-aggregation: Same union approach for ATAC-seq/DNase-seq open chromatin peaks
  • methylation-aggregation: Different approach (per-CpG averaging) for continuous methylation signal
  • hic-aggregation: Union approach for BEDPE chromatin loops
  • regulatory-elements: Use union peak sets from this skill to discover enhancers/promoters via combinatorial histone marks
  • epigenome-profiling: Build chromatin state maps by integrating multiple histone marks
  • peak-annotation: Annotate aggregated peaks with genomic features and nearest genes
  • visualization-workflow: Visualize histone landscapes with genome browser tracks and heatmaps
  • batch-analysis: Batch processing workflows for systematic histone aggregation across experiments
  • pipeline-chipseq: Process raw ChIP-seq data through the full ENCODE-aligned pipeline
  • publication-trust: Verify literature claims backing analytical decisions

Presenting Results

  • Present aggregated peaks as: chromosome | start | end | sample_count | max_signal. Show summary stats: total peaks, median peak width, samples contributing. Suggest: "Would you like to annotate these peaks with genomic features?"

For the request: "$ARGUMENTS"

Files (encode-toolkit)
  • references
    • broad-vs-narrow.md 4.3 KB
      # Broad vs Narrow Histone Marks
      
      Reference guide for selecting the correct peak format and merge parameters during histone ChIP-seq aggregation.
      
      ## Classification
      
      ### Narrow (Focal) Marks
      
      These marks create sharp, well-defined peaks suitable for **narrowPeak** format (10 columns). They localize to specific regulatory elements and typically span 1-5kb.
      
      | Mark | Function | Typical Peak Width | Genomic Context |
      |------|----------|-------------------|-----------------|
      | **H3K4me3** | Active promoters | 2-4 kb | TSS +/- 1-2kb |
      | **H3K27ac** | Active enhancers and promoters | 2-5 kb | Enhancers, TSS |
      | **H3K4me1** | Enhancers (poised or active) | 2-5 kb | Distal regulatory |
      | **H3K9ac** | Active chromatin | 1-3 kb | Promoters, enhancers |
      
      ### Broad (Diffuse) Marks
      
      These marks spread across large genomic domains requiring **broadPeak** format (9 columns). They reflect chromatin states spanning entire gene bodies, repressed loci, or heterochromatin.
      
      | Mark | Function | Typical Domain Width | Genomic Context |
      |------|----------|---------------------|-----------------|
      | **H3K27me3** | Polycomb repression | 10-100+ kb | Developmental gene silencing |
      | **H3K36me3** | Active transcription (gene body) | 10-100 kb | Transcribed gene bodies |
      | **H3K9me3** | Constitutive heterochromatin | 50-500+ kb | Pericentromeric, repetitive DNA |
      | **H3K4me1** (broad mode) | Broad enhancer domains | Variable | Sometimes called as broad |
      
      ### Context-Dependent Marks
      
      Some marks can be called in either mode depending on the peak caller configuration:
      
      - **H3K4me1**: Usually narrow at enhancers; occasionally broad at primed/poised domains
      - **H3K36me3**: Clearly broad across gene bodies; narrow caller misses most signal
      - **H3K27me3**: Always broad; narrow caller captures only focal Polycomb peaks at promoters
      
      ## MACS2 Parameters by Mark Type
      
      | Parameter | Narrow Marks | Broad Marks |
      |-----------|-------------|-------------|
      | `--broad` | No | **Yes** |
      | `--broad-cutoff` | N/A | 0.1 (default) |
      | `--nomodel --extsize` | 147 (nucleosome) | 147 |
      | `-q` / `--qvalue` | 0.05 | 0.05 |
      | `--keep-dup` | 1 (default) | 1 (default) |
      | Gap parameters | N/A | `--max-gap 500` typical |
      
      ENCODE pipeline default: MACS2 with `--broad` for H3K27me3, H3K9me3, H3K36me3; standard narrow mode for all others.
      
      ## Peak Merging Considerations
      
      ### Narrow Marks
      
      ```bash
      # Default overlap-only merge (no gap tolerance)
      bedtools merge -i sorted_peaks.bed -c 4 -o count_distinct
      ```
      
      - Merge distance (`-d`): **0** (overlap only, default)
      - Peaks >10kb are suspicious for narrow marks
      - Summit positions (column 10) are lost after merge
      
      ### Broad Marks
      
      ```bash
      # Gap-tolerant merge for domain marks
      bedtools merge -i sorted_peaks.bed -d 1000 -c 4 -o count_distinct
      ```
      
      - Merge distance (`-d`): **1000-5000 bp** depending on domain size
      - H3K27me3: use `-d 5000` (domains can be fragmented)
      - H3K36me3: use `-d 1000` (gene body coverage)
      - H3K9me3: use `-d 5000` (large heterochromatin blocks)
      
      ### Critical Rules
      
      1. **Never merge narrow and broad formats together.** They represent different biological features at different scales.
      2. **broadPeak has 9 columns** (no summit column). narrowPeak has 10 columns (summit in column 10).
      3. **Check ENCODE output_type**: broad marks use `output_type="replicated peaks"` with `file_type="bed broadPeak"`, while narrow marks use `output_type="IDR thresholded peaks"`.
      
      ## How to Identify the Correct Format
      
      When downloading from ENCODE, check the file metadata:
      
      ```
      encode_list_files(
          experiment_accession="ENCSR...",
          file_format="bed",
          assembly="GRCh38"
      )
      ```
      
      Look at the `file_type` field in the response:
      - `bed narrowPeak` = narrow format (10 columns)
      - `bed broadPeak` = broad format (9 columns)
      
      If the mark is called as both narrow and broad in different experiments, prefer the biologically appropriate format from the table above.
      
      ## References
      
      - Landt et al. 2012, Genome Research (ENCODE ChIP-seq guidelines) -- established narrow vs broad calling conventions
      - ENCODE Phase 3, Gorkin et al. 2020, Nature -- mark classification and peak calling parameters across 1,128 experiments
      - MACS2 documentation (Zhang et al. 2008) -- `--broad` flag implementation and gap parameters
      - Roadmap Epigenomics Consortium 2015, Nature -- chromatin state classification using narrow and broad marks
      
    • histone-marks-reference.md 111.9 KB
      # Comprehensive Reference Catalog: Histone Modifications and Chromatin States
      
      **Last updated:** 2026-03-07
      **Purpose:** Reference catalog for ENCODE connector histone aggregation skills and chromatin state interpretation.
      **Note:** Citation counts are approximate as of early 2026 and sourced from Consensus/Semantic Scholar. All article metadata retrieved from PubMed unless otherwise noted.
      
      ---
      
      ## Table of Contents
      
      1. [Foundational Papers](#1-foundational-papers)
      2. [Part 1: Individual Histone Marks](#2-part-1-individual-histone-marks)
         - [H3 Lysine Methylations](#h3-lysine-methylations)
         - [H3 Lysine Acetylations](#h3-lysine-acetylations)
         - [H4 Modifications](#h4-modifications)
         - [H2A and H2B Modifications](#h2a-and-h2b-modifications)
      3. [Part 2: Combinatorial Patterns (ChromHMM States)](#3-part-2-combinatorial-patterns-chromhmm-states)
      4. [Part 3: Mark-Specific Functional Categories](#4-part-3-mark-specific-functional-categories)
      5. [Part 4: Contradictions and Edge Cases](#5-part-4-contradictions-and-edge-cases)
      6. [Part 5: Transcription Factor Combinations and Co-Binding Patterns](#6-part-5-transcription-factor-combinations-and-co-binding-patterns)
      7. [Part 6: Chromatin Remodeling Complexes](#7-part-6-chromatin-remodeling-complexes)
      8. [Part 7: DNA Methylation and Chromatin Interplay](#8-part-7-dna-methylation-and-chromatin-interplay)
      9. [Part 8: Nucleosome Positioning and Dynamics](#9-part-8-nucleosome-positioning-and-dynamics)
      10. [Part 9: 3D Genome Organization and Chromatin](#10-part-9-3d-genome-organization-and-chromatin)
      11. [Part 10: Chromatin in Disease](#11-part-10-chromatin-in-disease)
      12. [Master Reference List](#12-master-reference-list)
      
      ---
      
      ## 1. Foundational Papers
      
      These landmark studies established the field of genome-wide histone modification profiling and chromatin state modeling.
      
      ### Genome-Wide Profiling Landmarks
      
      **Barski et al. 2007** -- The first genome-wide ChIP-Seq study of histone modifications.
      - **Citation:** Barski A, Cuddapah S, Cui K, Roh TY, Schones DE, Wang Z, Wei G, Chepelev I, Zhao K. "High-resolution profiling of histone methylations in the human genome." *Cell*. 2007;129(4):823-37.
      - **DOI:** [10.1016/j.cell.2007.05.009](https://doi.org/10.1016/j.cell.2007.05.009)
      - **PMID:** 17512414
      - **Citations:** ~6,900
      - **Key findings:** Mapped 20 histone lysine and arginine methylations plus H2A.Z, RNAPII, and CTCF across the human genome in CD4+ T cells. Established that H3K27me1, H3K9me1, H4K20me1, H3K79me1, and H2BK5me1 are all linked to gene activation, whereas H3K27me3, H3K9me3, and H3K79me3 are linked to repression. H2A.Z associates with functional regulatory elements. CTCF marks boundaries of histone methylation domains.
      
      **Wang et al. 2008** -- First systematic study of combinatorial histone modification patterns.
      - **Citation:** Wang Z, Zang C, Rosenfeld JA, Schones DE, Barski A, Cuddapah S, Cui K, Roh TY, Peng W, Zhang MQ, Zhao K. "Combinatorial patterns of histone acetylations and methylations in the human genome." *Nat Genet*. 2008;40(7):897-903.
      - **DOI:** [10.1038/ng.154](https://doi.org/10.1038/ng.154)
      - **PMID:** 18552846 | **PMC:** PMC2769248
      - **Citations:** ~2,400
      - **Key findings:** Analyzed 39 histone modifications in human CD4+ T cells. Identified a common modification module of 17 co-occurring marks at 3,286 promoters. Demonstrated that modifications colocalize at the individual nucleosome level and act cooperatively -- more marks correlate with higher expression.
      
      **Mikkelsen et al. 2007** -- Genome-wide chromatin state maps in pluripotent and differentiated cells.
      - **Citation:** Mikkelsen TS, Ku M, Jaffe DB, Issac B, Lieberman E, Giannoukos G, Alvarez P, Brockman W, Kim TK, Koche RP, Lee W, Mendenhall E, O'Donovan A, Presser A, Russ C, Xie X, Meissner A, Wernig M, Jaenisch R, Nusbaum C, Lander ES, Bernstein BE. "Genome-wide maps of chromatin state in pluripotent and lineage-committed cells." *Nature*. 2007;448(7153):553-60.
      - **DOI:** [10.1038/nature06008](https://doi.org/10.1038/nature06008)
      - **Citations:** ~4,300
      - **Key findings:** H3K4me3 and H3K27me3 effectively discriminate expressed, poised, and stably repressed genes. H3K36me3 marks coding and non-coding transcripts. H3K9me3 and H4K20me3 mark satellites, telomeres, and LTRs.
      
      ### Major Reviews
      
      **Kouzarides 2007** -- Definitive review of histone modification classes and functions.
      - **Citation:** Kouzarides T. "Chromatin modifications and their function." *Cell*. 2007;128(4):693-705.
      - **DOI:** [10.1016/j.cell.2007.02.005](https://doi.org/10.1016/j.cell.2007.02.005)
      - **Citations:** ~10,700
      - **Key findings:** Cataloged at least 8 classes of histone modifications (acetylation, methylation, phosphorylation, ubiquitylation, sumoylation, ADP ribosylation, deimination, proline isomerization). Modifications function either by disrupting chromatin contacts or by recruiting nonhistone proteins.
      
      **Bannister & Kouzarides 2011** -- Updated review of histone modification biology.
      - **Citation:** Bannister AJ, Kouzarides T. "Regulation of chromatin by histone modifications." *Cell Res*. 2011;21(3):381-395.
      - **DOI:** [10.1038/cr.2011.22](https://doi.org/10.1038/cr.2011.22)
      - **Citations:** ~5,300
      - **Key findings:** Comprehensive update describing known modifications, their genomic distributions, writers, erasers, and readers, with emphasis on transcriptional consequences.
      
      ---
      
      ## 2. Part 1: Individual Histone Marks
      
      ### H3 Lysine Methylations
      
      #### H3K4me1 -- Enhancer Mark (Primed/Poised)
      
      | Property | Detail |
      |----------|--------|
      | **Biological meaning** | Marks enhancer elements, both active and poised. Present at distal regulatory elements but NOT at active promoters (where H3K4me3 predominates). When found alone (without H3K27ac), marks primed/poised enhancers. When co-occurring with H3K27ac, marks active enhancers. |
      | **Writers** | MLL3 (KMT2C), MLL4 (KMT2D) |
      | **Erasers** | LSD1 (KDM1A), KDM5 family |
      | **Readers** | CHD1, BPTF (via PHD finger) |
      | **ChromHMM states** | Enhancer, Flanking Active TSS, Weak/Poised Enhancer |
      
      **Key papers:**
      - Heintzman ND et al. (2007) *Nat Genet* 39:311-318. [DOI: 10.1038/ng1966](https://doi.org/10.1038/ng1966) (~3,400 cit.) -- First demonstration that H3K4me1 (without me3) distinguishes enhancers from promoters.
      - Creyghton MP et al. (2010) *PNAS* 107:21931-6. [DOI: 10.1073/pnas.1016071107](https://doi.org/10.1073/pnas.1016071107) (~3,000 cit.) -- Showed H3K27ac separates active from poised H3K4me1-marked enhancers.
      - Rada-Iglesias A et al. (2011) *Nature* 470:279-83. [DOI: 10.1038/nature09692](https://doi.org/10.1038/nature09692) (~1,500 cit.) -- Defined two enhancer classes: active (H3K4me1+H3K27ac) and poised (H3K4me1+H3K27me3).
      
      **Contradictions/nuances:** H3K4me1 is also found in gene bodies of actively transcribed genes, though at lower levels than at enhancers. Its presence alone does not guarantee enhancer activity -- functional validation (e.g., STARR-seq, transgenic assays) is required.
      
      ---
      
      #### H3K4me2 -- Active Regulatory Element Mark
      
      | Property | Detail |
      |----------|--------|
      | **Biological meaning** | Marks active regulatory elements including both promoters and enhancers. Found broadly at active regions. Less studied than me1 or me3 but intermediate between them in distribution. |
      | **Writers** | MLL1-4 (KMT2A-D), SET1A/B |
      | **ChromHMM states** | Flanking Active TSS, Active Enhancer |
      
      **Key papers:**
      - Barski et al. (2007) *Cell* 129:823-37. [DOI: 10.1016/j.cell.2007.05.009](https://doi.org/10.1016/j.cell.2007.05.009) -- Mapped H3K4me2 distribution; enriched at promoters and enhancers.
      - Wang et al. (2008) *Nat Genet* 40:897-903. [DOI: 10.1038/ng.154](https://doi.org/10.1038/ng.154) -- Part of the 17-modification active module.
      
      **Notes:** H3K4me2 is less commonly profiled in ENCODE/Roadmap than H3K4me1 or H3K4me3. It serves as an intermediate mark and is sometimes used to identify active regulatory regions when me1 and me3 data are unavailable.
      
      ---
      
      #### H3K4me3 -- Active Promoter Mark
      
      | Property | Detail |
      |----------|--------|
      | **Biological meaning** | The canonical mark of active and poised promoters. Found as sharp peaks at transcription start sites (TSSs) of expressed genes. Its presence does not guarantee transcription but indicates promoter competence. Also found at bivalent promoters (with H3K27me3) in stem cells. |
      | **Writers** | SET1A/B (via COMPASS), MLL1/2 (KMT2A/B) |
      | **Erasers** | KDM5A (JARID1A), KDM5B (JARID1B), KDM5C, KDM5D |
      | **Readers** | TAF3 (TFIID subunit), ING proteins, CHD1 |
      | **ChromHMM states** | Active TSS, Bivalent/Poised TSS |
      
      **Key papers:**
      - Bernstein BE et al. (2005) *Cell* 120:169-181. [DOI: 10.1016/j.cell.2005.01.001](https://doi.org/10.1016/j.cell.2005.01.001) -- Early ChIP-chip study linking H3K4me3 to active genes.
      - Heintzman ND et al. (2007) *Nat Genet* 39:311-318. [DOI: 10.1038/ng1966](https://doi.org/10.1038/ng1966) -- H3K4me3 at promoters vs. H3K4me1 at enhancers.
      - Bernstein BE et al. (2006) *Cell* 125:315-326. [DOI: 10.1016/j.cell.2006.02.041](https://doi.org/10.1016/j.cell.2006.02.041) (~5,400 cit.) -- Discovered bivalent domains (H3K4me3 + H3K27me3) in ESCs.
      
      **Contradictions:** Kumar et al. (2021) *Genome Res* 31:2170-2184 challenged the "poising" hypothesis, arguing that H3K4me3 at bivalent promoters does not accelerate gene activation but rather protects promoters from de novo DNA methylation.
      
      ---
      
      #### H3K9me1 -- Gene Activation (Weak)
      
      | Property | Detail |
      |----------|--------|
      | **Biological meaning** | Weak activation mark. Found near active promoters and in gene bodies. Contrasts sharply with H3K9me2/me3 which are repressive. |
      | **Writers** | G9a (EHMT2), GLP (EHMT1), SETDB1, PRDM family |
      | **ChromHMM states** | Weak/flanking active features |
      
      **Key papers:**
      - Barski et al. (2007) *Cell* 129:823-37. [DOI: 10.1016/j.cell.2007.05.009](https://doi.org/10.1016/j.cell.2007.05.009) -- First genome-wide demonstration that H3K9me1 is associated with gene activation, in contrast to H3K9me2/me3.
      
      **Notes:** H3K9me1 is one of the less frequently profiled marks in consortium projects and is not part of the standard 5-mark ChromHMM model. Its biology remains less well understood than other H3K9 methylation states.
      
      ---
      
      #### H3K9me2 -- Euchromatic Gene Silencing
      
      | Property | Detail |
      |----------|--------|
      | **Biological meaning** | Repressive mark associated with euchromatic gene silencing. Found in large megabase-scale domains (LOCKs = large organized chromatin K9 modifications) in differentiated cells. Less concentrated at repetitive elements than H3K9me3. Associated with nuclear lamina positioning. |
      | **Writers** | G9a (EHMT2), GLP (EHMT1) |
      | **Erasers** | KDM3A (JHDM2A), KDM3B, KDM4 family |
      | **Readers** | HP1 proteins (weak binding), UHRF1 |
      | **ChromHMM states** | Quiescent/Low, Heterochromatin |
      
      **Key papers:**
      - Wen B et al. (2009) *Genome Res* 19:1639-1645. [DOI: 10.1101/gr.092643.109](https://doi.org/10.1101/gr.092643.109) -- Described LOCKs (large organized chromatin K9 modifications) domains.
      - Padeken J et al. (2022) *Nat Rev Mol Cell Biol* 23:623-640. [DOI: 10.1038/s41580-022-00483-2](https://doi.org/10.1038/s41580-022-00483-2) (~314 cit.) -- Comprehensive review of H3K9 methylation in tissue differentiation.
      
      ---
      
      #### H3K9me3 -- Constitutive Heterochromatin
      
      | Property | Detail |
      |----------|--------|
      | **Biological meaning** | The hallmark of constitutive heterochromatin. Enriched at pericentromeric repeats, satellite sequences, telomeres, transposable elements (TEs), and endogenous retroviruses (ERVs). Maintained through a self-reinforcing loop where HP1 binds H3K9me3 and recruits SUV39H1/2 to methylate adjacent nucleosomes. Also found at lineage-inappropriate genes in differentiated cells (via SETDB1). |
      | **Writers** | SUV39H1/2 (at repeats), SETDB1 (at euchromatic targets, ERVs), G9a/GLP (can trimethylate in some contexts) |
      | **Erasers** | KDM4A (JMJD2A), KDM4B, KDM4C |
      | **Readers** | HP1alpha (CBX5), HP1beta (CBX1), HP1gamma (CBX3), ATRX, MPP8 |
      | **ChromHMM states** | Heterochromatin (enriched in H3K9me3) |
      
      **Key papers:**
      - Rea S et al. (2000) *Nature* 406:593-599. [DOI: 10.1038/35020506](https://doi.org/10.1038/35020506) (~3,500 cit.) -- Identified SUV39H1 as the first histone methyltransferase; established H3K9me3 as HP1 binding platform.
      - Lachner M et al. (2001) *Nature* 410:116-120. [DOI: 10.1038/35065132](https://doi.org/10.1038/35065132) (~2,000 cit.) -- Showed HP1 chromodomain specifically recognizes H3K9me3.
      - Padeken J et al. (2022) *Nat Rev Mol Cell Biol* 23:623-640. [DOI: 10.1038/s41580-022-00483-2](https://doi.org/10.1038/s41580-022-00483-2) (~314 cit.) -- Comprehensive review of H3K9me and its HMTs.
      - Keenan CR et al. (2024) *Genome Res* 34:556-571. -- Suv39h-catalyzed H3K9me3 critical for euchromatic genome organization; loss paradoxically represses euchromatic genes.
      
      **Contradictions:** While H3K9me3 is considered purely repressive, Keenan et al. (2024) showed that loss of SUV39H1/2-mediated H3K9me3 leads to paradoxical downregulation of euchromatic genes, suggesting that heterochromatin domains provide structural scaffolding that supports gene expression in adjacent euchromatin.
      
      ---
      
      #### H3K27me3 -- Polycomb-Mediated Repression
      
      | Property | Detail |
      |----------|--------|
      | **Biological meaning** | The signature mark of Polycomb Repressive Complex 2 (PRC2)-mediated facultative heterochromatin. Silences developmental and lineage-specific genes in a reversible manner. Found in broad domains covering gene bodies and flanking regions. Can spread via PRC2 read-write mechanism (EED subunit reads H3K27me3 and stimulates EZH2 catalytic activity). Mutually exclusive with H3K27ac at the same residue. |
      | **Writers** | EZH2 (within PRC2), EZH1 |
      | **Erasers** | KDM6A (UTX), KDM6B (JMJD3) |
      | **Readers** | EED (PRC2 subunit, propagation), CBX proteins (PRC1 subunits) |
      | **ChromHMM states** | Repressed Polycomb, Bivalent/Poised TSS, Poised Enhancer |
      
      **Key papers:**
      - Cao R et al. (2002) *Science* 298:1039-1043. [DOI: 10.1126/science.1076997](https://doi.org/10.1126/science.1076997) (~3,000 cit.) -- Identified EZH2 as the H3K27 methyltransferase.
      - Boyer LA et al. (2006) *Nature* 441:349-353. [DOI: 10.1038/nature04733](https://doi.org/10.1038/nature04733) (~3,000 cit.) -- Mapped PRC2/H3K27me3 targets in ESCs; found occupancy at developmental TF genes.
      - Bernstein BE et al. (2006) *Cell* 125:315-326. [DOI: 10.1016/j.cell.2006.02.041](https://doi.org/10.1016/j.cell.2006.02.041) (~5,400 cit.) -- Co-discovery of bivalent domains (H3K4me3+H3K27me3).
      
      **Notes:** H3K27me3 is one of the 5 core marks in the standard ChromHMM model (along with H3K4me3, H3K4me1, H3K36me3, H3K9me3). Its mutual exclusivity with H3K27ac makes it a critical switch between repressed and active states.
      
      ---
      
      #### H3K36me3 -- Transcribed Gene Bodies
      
      | Property | Detail |
      |----------|--------|
      | **Biological meaning** | Marks bodies of actively transcribed genes, deposited co-transcriptionally by SETD2 which travels with elongating RNA Pol II (via Ser2-phosphorylated CTD). Increases from 5' to 3' along gene bodies (reflecting transcription directionality). Functions in: (1) preventing spurious intragenic transcription initiation by recruiting HDAC complexes, (2) mRNA splicing regulation, (3) DNA mismatch repair, (4) antagonizing PRC2 spreading into active genes. |
      | **Writers** | SETD2 (sole H3K36 trimethyltransferase in mammals) |
      | **Erasers** | KDM4A, KDM4B, KDM4C, JHDM1A/B (for me2) |
      | **Readers** | DNMT3B (directs gene-body DNA methylation), MSH6 (mismatch repair), PWWP domain proteins (e.g., PSIP1/LEDGF), BRPF1 |
      | **ChromHMM states** | Strong Transcription, Weak Transcription |
      
      **Key papers:**
      - Bannister AJ et al. (2005) *Nature* 438:1181-1185. [DOI: 10.1038/nature04219](https://doi.org/10.1038/nature04219) (~800 cit.) -- Demonstrated Set2-mediated H3K36me in gene bodies during elongation.
      - Yoh SM et al. (2008) *Genes Dev* 22:3422-34. [DOI: 10.1101/gad.1710608](https://doi.org/10.1101/gad.1710608) (~249 cit.) -- Iws1:Spt6:CTD complex controls SETD2 recruitment and H3K36me3 deposition.
      - Almeida SF et al. (2011) *Nat Struct Mol Biol* 18:977-983. [DOI: 10.1038/nsmb.2108](https://doi.org/10.1038/nsmb.2108) (~248 cit.) -- Splicing enhances SETD2 recruitment; intron-containing genes preferentially marked.
      - Xiao C et al. (2021) *Clin Epigenetics* 13:44. [DOI: 10.1186/s13148-021-01038-5](https://doi.org/10.1186/s13148-021-01038-5) -- Review of H3K36me3 roles in cancer.
      
      **Important for ENCODE:** H3K36me3 is one of the 5 core ChromHMM marks. SETD2 loss-of-function mutations are frequent in clear cell renal carcinoma, pediatric high-grade gliomas (H3.3K36M oncohistone), and other cancers.
      
      ---
      
      #### H3K79me2 -- Transcription Elongation / DOT1L
      
      | Property | Detail |
      |----------|--------|
      | **Biological meaning** | Marks actively transcribed gene bodies, similar to H3K36me3 but deposited by a different enzyme (DOT1L). Located in the globular domain of H3 (not the tail), making it unique among histone methylations. Also involved in DNA damage response and cell cycle regulation. DOT1L is recruited by H2BK120ub (monoubiquitylated H2B), creating a trans-tail regulatory pathway. |
      | **Writers** | DOT1L (sole enzyme) |
      | **Erasers** | No known demethylase (controversial; may be removed by histone turnover) |
      | **ChromHMM states** | Transcription, Genic Enhancers |
      
      **Key papers:**
      - Feng Q et al. (2002) *Curr Biol* 12:1052-1058. [DOI: 10.1016/S0960-9822(02)00901-6](https://doi.org/10.1016/S0960-9822(02)00901-6) (~700 cit.) -- Identified DOT1L as H3K79 methyltransferase.
      - Steger DJ et al. (2008) *Mol Cell Biol* 28:2825-2839. [DOI: 10.1128/MCB.02076-07](https://doi.org/10.1128/MCB.02076-07) -- DOT1L promotes transcription elongation via H3K79me2.
      - Barski et al. (2007) *Cell* 129:823-37. [DOI: 10.1016/j.cell.2007.05.009](https://doi.org/10.1016/j.cell.2007.05.009) -- H3K79me1 linked to activation, H3K79me3 linked to repression.
      
      **Clinical relevance:** DOT1L is a therapeutic target in MLL-rearranged leukemias, where MLL fusion proteins aberrantly recruit DOT1L to target genes.
      
      ---
      
      ### H3 Lysine Acetylations
      
      #### H3K27ac -- Active Regulatory Element Mark
      
      | Property | Detail |
      |----------|--------|
      | **Biological meaning** | The single most informative mark for identifying active enhancers and promoters. Mutually exclusive with H3K27me3 (cannot have both acetylation and methylation at the same lysine). H3K27ac at enhancers (H3K4me1+H3K27ac) distinguishes active from poised enhancers. Also marks active promoters (co-occurring with H3K4me3). Used to identify super-enhancers via ROSE algorithm (ranking of super-enhancer signal). |
      | **Writers** | CBP (CREBBP/KAT3A), p300 (EP300/KAT3B) |
      | **Erasers** | HDAC1/2 (in NuRD complex), HDAC3 (in NCoR/SMRT complex) |
      | **Readers** | BRD4 (and other BET bromodomain proteins), BRPF1 |
      | **ChromHMM states** | Active TSS, Flanking Active TSS, Active Enhancer, Genic Enhancer |
      
      **Key papers:**
      - Creyghton MP et al. (2010) *PNAS* 107:21931-6. [DOI: 10.1073/pnas.1016071107](https://doi.org/10.1073/pnas.1016071107) -- Established H3K27ac as THE distinguishing mark between active and poised enhancers.
      - Rada-Iglesias A et al. (2011) *Nature* 470:279-83. [DOI: 10.1038/nature09692](https://doi.org/10.1038/nature09692) -- Active enhancers = H3K4me1+H3K27ac; poised enhancers = H3K4me1+H3K27me3.
      - Whyte WA et al. (2013) *Cell* 153:307-319. [DOI: 10.1016/j.cell.2013.03.035](https://doi.org/10.1016/j.cell.2013.03.035) (~3,600 cit.) -- Super-enhancers defined by exceptional H3K27ac/Mediator signal.
      
      **Notes:** H3K27ac is the workhorse mark for enhancer identification in ENCODE and Roadmap Epigenomics. It is one of the 5 core ChromHMM marks.
      
      ---
      
      #### H3K9ac -- Active Promoters
      
      | Property | Detail |
      |----------|--------|
      | **Biological meaning** | Marks active gene promoters. One of the earliest characterized histone acetylation marks. Enriched at TSSs of actively transcribed genes, often co-occurring with H3K4me3. Contributes to an open chromatin state permissive for transcription. |
      | **Writers** | GCN5 (KAT2A), PCAF (KAT2B), Tip60 (KAT5), CBP/p300 |
      | **Erasers** | HDAC1-3, SIRT1, SIRT6 |
      | **Readers** | BRD-containing proteins, YEATS domain proteins |
      | **ChromHMM states** | Active TSS, Flanking Active TSS |
      
      **Key papers:**
      - Wang et al. (2008) *Nat Genet* 40:897-903. [DOI: 10.1038/ng.154](https://doi.org/10.1038/ng.154) -- Part of the 17-mark active promoter module.
      - Karmodiya K et al. (2012) *BMC Genomics* 13:424. [DOI: 10.1186/1471-2164-13-424](https://doi.org/10.1186/1471-2164-13-424) -- H3K9ac is one of the most predictive marks for gene expression.
      
      ---
      
      #### H3K14ac -- Transcriptional Activation / DNA Damage Response
      
      | Property | Detail |
      |----------|--------|
      | **Biological meaning** | Associated with active transcription and DNA damage response. Often co-occurs with H3K9ac at active promoters. Also acetylated by GCN5 in response to DNA double-strand breaks. |
      | **Writers** | GCN5 (KAT2A), PCAF, Tip60, CBP/p300, TAF1 |
      | **Erasers** | HDAC1-3, SIRT1 |
      | **ChromHMM states** | Active TSS (when profiled) |
      
      **Key papers:**
      - Wang et al. (2008) *Nat Genet* 40:897-903. [DOI: 10.1038/ng.154](https://doi.org/10.1038/ng.154) -- Part of the 17-mark active promoter module.
      - Murr R et al. (2006) *Nat Cell Biol* 8:91-99. [DOI: 10.1038/ncb1343](https://doi.org/10.1038/ncb1343) -- H3K14ac by Tip60/GCN5 at DNA damage sites.
      
      ---
      
      #### H3K18ac -- Active Transcription / CBP/p300 Substrate
      
      | Property | Detail |
      |----------|--------|
      | **Biological meaning** | Active transcription mark. Substrate of CBP/p300 acetyltransferases. Enriched at active promoters and enhancers. Less studied genome-wide than H3K27ac or H3K9ac but part of the general active chromatin acetylation signature. Emerging evidence links it to nuclear receptor signaling and androgen-driven transcription in prostate cancer. |
      | **Writers** | CBP/p300 |
      | **Erasers** | SIRT7, HDAC1-3 |
      
      **Key papers:**
      - Wang et al. (2008) *Nat Genet* 40:897-903. [DOI: 10.1038/ng.154](https://doi.org/10.1038/ng.154) -- Identified in combinatorial analysis.
      - Jin Q et al. (2011) *EMBO J* 30:249-262. [DOI: 10.1038/emboj.2010.318](https://doi.org/10.1038/emboj.2010.318) -- Distinguished CBP/p300 substrates (H3K18ac, H3K27ac) from GCN5/PCAF substrates.
      
      ---
      
      #### H3K23ac -- Active Transcription
      
      | Property | Detail |
      |----------|--------|
      | **Biological meaning** | Active mark found at promoters and gene bodies. Less well characterized than other H3 acetylations. Associated with transcriptional activation. |
      | **Writers** | CBP/p300, GCN5 |
      | **Erasers** | HDAC1-3, SIRT1 |
      
      **Key papers:**
      - Wang et al. (2008) *Nat Genet* 40:897-903. [DOI: 10.1038/ng.154](https://doi.org/10.1038/ng.154) -- Part of combinatorial patterns at active promoters.
      
      ---
      
      ### H4 Modifications
      
      #### H4K20me1 -- Transcription / Cell Cycle
      
      | Property | Detail |
      |----------|--------|
      | **Biological meaning** | Multi-functional mark with context-dependent roles. In the Barski et al. dataset, H4K20me1 correlated with gene activation. It is cell-cycle regulated: PR-Set7 deposits H4K20me1 during mitosis, and the mark peaks in late S/G2. Found in gene bodies of actively transcribed genes. Also plays roles in DNA replication licensing, DNA damage response, and chromatin compaction. Distinguished from H4K20me3, which marks constitutive heterochromatin (pericentromeric). |
      | **Writers** | PR-Set7/SET8 (KMT5A) |
      | **Erasers** | PHF8, KDM7B |
      | **ChromHMM states** | Transcription (when profiled in expanded models) |
      
      **Key papers:**
      - Rice JC et al. (2002) *Genes Dev* 16:2225-30. [DOI: 10.1101/gad.986602](https://doi.org/10.1101/gad.986602) (~257 cit.) -- H4K20me1 is mitotic-specific, deposited by PR-Set7, inversely correlated with H4K16ac.
      - Barski et al. (2007) *Cell* 129:823-37. [DOI: 10.1016/j.cell.2007.05.009](https://doi.org/10.1016/j.cell.2007.05.009) -- H4K20me1 genome-wide linked to gene activation.
      
      **Contradictions:** H4K20me1 can be found in both active and repressed contexts. Its deposition during mitosis suggests a role in epigenetic memory through cell division rather than direct transcriptional regulation.
      
      ---
      
      #### H4K5ac -- Active Chromatin / Histone Deposition
      
      | Property | Detail |
      |----------|--------|
      | **Biological meaning** | Marks active chromatin. Also found on newly synthesized histones (H4K5ac+H4K12ac is the canonical "deposition mark" on new H4 molecules). At regulatory elements, co-occurs with other H4 acetylations. BRD4 preferentially binds multi-acetylated H4 (H4K5acK8ac). |
      | **Writers** | HAT1 (on new histones), CBP/p300, Tip60 |
      | **Erasers** | HDAC1-3 |
      
      **Key papers:**
      - Wang et al. (2008) *Nat Genet* 40:897-903. [DOI: 10.1038/ng.154](https://doi.org/10.1038/ng.154) -- Part of the active chromatin module.
      - Loyola A et al. (2006) *Mol Cell* 24:309-316. [DOI: 10.1016/j.molcel.2006.09.009](https://doi.org/10.1016/j.molcel.2006.09.009) -- H4K5ac+H4K12ac as histone deposition marks.
      - Das ND et al. (2023) *BMC Genomics* 24. -- H4K5acK8ac defines super-enhancers distinct from those identified by H3K27ac alone.
      
      ---
      
      #### H4K8ac -- Active Chromatin
      
      | Property | Detail |
      |----------|--------|
      | **Biological meaning** | Active chromatin mark at promoters and enhancers. Often co-occurs with H4K5ac to form the di-acetylated H4 state recognized by BRD4 bromodomains. Less individually characterized than H3 marks but consistently part of the active modification module. |
      | **Writers** | CBP/p300, GCN5/PCAF, Tip60 |
      | **Erasers** | HDAC1-3 |
      
      **Key papers:**
      - Wang et al. (2008) *Nat Genet* 40:897-903. [DOI: 10.1038/ng.154](https://doi.org/10.1038/ng.154).
      
      ---
      
      #### H4K16ac -- Euchromatin Boundary / Dosage Compensation
      
      | Property | Detail |
      |----------|--------|
      | **Biological meaning** | Unique among histone acetylations in having a direct structural effect on chromatin fiber folding. H4K16ac disrupts the interaction between the H4 tail and the H2A acidic patch on adjacent nucleosomes, preventing chromatin compaction into the 30nm fiber. In mammals, associated with active euchromatin and implicated in maintaining euchromatin/heterochromatin boundaries. In Drosophila, critical for dosage compensation (MOF-mediated acetylation of the X chromosome). Loss of H4K16ac is an early event in cancer. |
      | **Writers** | MOF (KAT8), Tip60 (KAT5) |
      | **Erasers** | SIRT1, SIRT2, HDAC1/2 |
      | **Readers** | Inhibits SIR complex binding; recognized by BRDT |
      
      **Key papers:**
      - Shogren-Knaak M et al. (2006) *Science* 311:844-847. [DOI: 10.1126/science.1124000](https://doi.org/10.1126/science.1124000) (~1,000 cit.) -- H4K16ac inhibits 30nm fiber formation (in vitro reconstitution).
      - Fraga MF et al. (2005) *Nat Genet* 37:391-400. [DOI: 10.1038/ng1531](https://doi.org/10.1038/ng1531) (~2,000 cit.) -- Global loss of H4K16ac (and H4K20me3) is a hallmark of cancer.
      - Rice JC et al. (2002) *Genes Dev* 16:2225-30. [DOI: 10.1101/gad.986602](https://doi.org/10.1101/gad.986602) -- H4K16ac in early S-phase inversely correlated with H4K20me1 at mitosis.
      
      **Cancer relevance:** Loss of H4K16ac is one of the earliest and most consistent epigenetic changes in cancer (Fraga et al. 2005). It is often accompanied by loss of H4K20me3 and hypomethylation of repetitive DNA.
      
      ---
      
      #### H4K91ac -- Histone Deposition / Chromatin Assembly
      
      | Property | Detail |
      |----------|--------|
      | **Biological meaning** | Located in the globular domain of H4 (not the tail). Important for histone-histone interactions within the nucleosome. H4K91ac weakens H3-H4 tetramer-H2A/H2B dimer interactions, facilitating nucleosome assembly/disassembly. Found on newly synthesized histones and at sites of active chromatin remodeling. Less well characterized in genome-wide studies. |
      | **Writers** | HAT1, CBP/p300 |
      
      **Key papers:**
      - Ye J et al. (2005) *Mol Cell* 20:199-209. [DOI: 10.1016/j.molcel.2005.08.029](https://doi.org/10.1016/j.molcel.2005.08.029) -- H4K91ac affects nucleosome stability and chromatin assembly.
      
      ---
      
      ### H2A and H2B Modifications
      
      #### H2A.Z -- Dynamic Regulatory Element Mark
      
      | Property | Detail |
      |----------|--------|
      | **Biological meaning** | A histone variant (not a modification per se) that replaces canonical H2A. Found at regulatory elements including promoters, enhancers, and insulators. Creates a less stable nucleosome, facilitating regulatory access. Can carry dual roles: H2A.Z-acetylated is found at active promoters; H2A.Z+H3K27me3 at poised/bivalent regions. |
      | **Deposition complex** | SWR1/SRCAP complex, p400/Tip60 complex |
      | **Removal complex** | INO80 complex |
      | **ChromHMM states** | Not typically used as ChromHMM input but enriched at Active TSS and Bivalent TSS |
      
      **Key papers:**
      - Barski et al. (2007) *Cell* 129:823-37. [DOI: 10.1016/j.cell.2007.05.009](https://doi.org/10.1016/j.cell.2007.05.009) -- H2A.Z at functional regulatory elements.
      - Ku M et al. (2012) *Genes Dev* 26:1326-1338. [DOI: 10.1101/gad.187609.112](https://doi.org/10.1101/gad.187609.112) -- H2A.Z enriched at bivalent promoters in ESCs.
      - Jin C et al. (2009) *Nat Genet* 41:941-945. [DOI: 10.1038/ng.409](https://doi.org/10.1038/ng.409) -- H2A.Z+H3.3 double-variant nucleosomes mark active regulatory elements.
      
      ---
      
      #### H2BK120ub (H2Bub1) -- Trans-histone Crosstalk / Transcription
      
      | Property | Detail |
      |----------|--------|
      | **Biological meaning** | Monoubiquitylation of H2B at K120. Required for proper H3K4 and H3K79 methylation (trans-histone crosstalk). Associated with transcription elongation. Found in gene bodies of active genes. Also plays roles in DNA damage response and stem cell self-renewal. |
      | **Writers** | RNF20/RNF40 (E3 ubiquitin ligases), UBE2B (E2 conjugating enzyme) |
      | **Erasers** | USP22 (deubiquitinase, part of SAGA complex), USP44 |
      
      **Key papers:**
      - Kim J et al. (2009) *Cell* 137:459-471. [DOI: 10.1016/j.cell.2009.02.027](https://doi.org/10.1016/j.cell.2009.02.027) (~700 cit.) -- H2BK120ub required for H3K4me3 by COMPASS and H3K79me by DOT1L.
      - McGinty RK et al. (2008) *Nature* 453:812-816. [DOI: 10.1038/nature06906](https://doi.org/10.1038/nature06906) (~500 cit.) -- Structural basis for H2Bub1 stimulation of DOT1L.
      
      ---
      
      ## 3. Part 2: Combinatorial Patterns (ChromHMM States)
      
      ### Overview of ChromHMM Models
      
      ChromHMM (Ernst & Kellis) uses a multivariate Hidden Markov Model to learn chromatin states from combinatorial patterns of histone modifications. Different numbers of marks yield models of different complexity:
      
      ### Key ChromHMM Publications
      
      | Paper | Year | Journal | States | Marks | DOI | Citations |
      |-------|------|---------|--------|-------|-----|-----------|
      | Ernst & Kellis | 2010 | *Nat Biotechnol* | 51 | 8+ marks | [10.1038/nbt.1662](https://doi.org/10.1038/nbt.1662) | ~1,100 |
      | Ernst et al. | 2011 | *Nature* | 15 | 9 marks | [10.1038/nature09906](https://doi.org/10.1038/nature09906) | ~2,000 |
      | Ernst & Kellis | 2012 | *Nat Methods* | variable | flexible | [10.1038/nmeth.1906](https://doi.org/10.1038/nmeth.1906) | ~2,300 |
      | Kundaje et al. | 2015 | *Nature* | 15/18/25 | 5 core + | [10.1038/nature14248](https://doi.org/10.1038/nature14248) | ~5,000 |
      | Ernst & Kellis | 2017 | *Nat Protocols* | variable | flexible | [10.1038/nprot.2017.124](https://doi.org/10.1038/nprot.2017.124) | ~711 |
      | ENCODE Phase 3 | 2020 | *Nature* | 15+ | 5 core + | [10.1038/s41586-020-2493-4](https://doi.org/10.1038/s41586-020-2493-4) | ~2,000 |
      
      ### The 5-Mark Core Model (Roadmap Epigenomics / ENCODE Phase 3)
      
      The standard 5-mark model uses: **H3K4me3, H3K4me1, H3K36me3, H3K27me3, H3K9me3**
      
      This is the minimum set profiled across all Roadmap Epigenomics samples (111 reference epigenomes) and forms the basis for the 15-state and 18-state models used in Kundaje et al. 2015.
      
      ### The 15-State Model (Roadmap Epigenomics Core Model)
      
      From Kundaje et al. (2015) and Ernst et al. (2011), using the 5 core marks:
      
      | State | Name | H3K4me3 | H3K4me1 | H3K36me3 | H3K27me3 | H3K9me3 | Biological Interpretation |
      |-------|------|---------|---------|----------|----------|---------|--------------------------|
      | 1 | TssA | HIGH | LOW | - | - | - | Active TSS |
      | 2 | TssAFlnk | MED | MED | - | - | - | Flanking Active TSS |
      | 3 | TxFlnk | LOW | MED | LOW | - | - | Transcription at gene 5' and 3' |
      | 4 | Tx | - | - | HIGH | - | - | Strong Transcription |
      | 5 | TxWk | - | - | MED | - | - | Weak Transcription |
      | 6 | EnhG | - | MED | MED | - | - | Genic Enhancers |
      | 7 | Enh | - | HIGH | - | - | - | Enhancers |
      | 8 | ZNF/Rpts | - | - | LOW | - | HIGH | ZNF Genes & Repeats |
      | 9 | Het | - | - | - | - | HIGH | Heterochromatin |
      | 10 | TssBiv | HIGH | MED | - | HIGH | - | Bivalent/Poised TSS |
      | 11 | BivFlnk | MED | MED | - | HIGH | - | Flanking Bivalent TSS/Enhancer |
      | 12 | EnhBiv | - | HIGH | - | HIGH | - | Bivalent Enhancer |
      | 13 | ReprPC | - | - | - | HIGH | - | Repressed Polycomb |
      | 14 | ReprPCWk | - | - | - | MED | - | Weak Repressed Polycomb |
      | 15 | Quies | - | - | - | - | - | Quiescent/Low signal |
      
      **Source:** Kundaje et al. (2015) *Nature* 518:317-30 -- Table derived from the 15-state core model applied to 111 reference epigenomes.
      
      ### The 18-State Model (Roadmap Extended)
      
      Adds H3K27ac as a 6th mark (available for a subset of epigenomes). Key additional distinctions:
      
      - Active TSS further split by H3K27ac level
      - Enhancers split into active (with H3K27ac) vs. poised (without)
      - Genic enhancers more precisely defined
      
      ### The 25-State Model (Expanded)
      
      Uses additional marks when available (H3K9ac, H4K20me1, H3K79me2, etc.) and provides finer resolution of:
      - Multiple active promoter states
      - Transcription-associated enhancer states
      - Distinct heterochromatin types
      - Quiescent states with different background patterns
      
      ### The Original 51-State Model (Ernst & Kellis 2010)
      
      The first ChromHMM paper used 8 marks in CD4+ T cells and defined 51 states, which were later collapsed into the more practical 15-state model. This included fine-grained distinctions between:
      - 5 promoter states (active, weak, poised, etc.)
      - 3 transcription states (5' preferred, 3' preferred, etc.)
      - 8 enhancer-like states
      - 4 insulator states
      - 5 Polycomb repressed states
      - 3 heterochromatin states
      - Multiple quiescent states
      
      ### Ernst et al. 2011 (15-State, 9-Cell-Type Model)
      
      The foundational 15-state model that became the standard. Used 9 chromatin marks (H3K4me3, H3K4me1, H3K36me3, H3K27me3, H3K9me3, H3K27ac, H3K9ac, H4K20me1, CTCF) across 9 cell types.
      
      **Key states defined:**
      1. Active Promoter (H3K4me3, H3K27ac, H3K9ac high)
      2. Weak Promoter (H3K4me3 moderate)
      3. Poised Promoter (H3K4me3 + H3K27me3, i.e., bivalent)
      4-5. Strong/Weak Enhancer (H3K4me1 high, +/- H3K27ac)
      6-7. Transcription (H3K36me3, H3K79me2)
      8. Insulator (CTCF binding without enhancer marks)
      9. Heterochromatin (H3K9me3)
      10. Polycomb Repressed (H3K27me3)
      11-15. Quiescent, Repetitive, etc.
      
      **Source:** Ernst J et al. (2011) *Nature* 473:43-49. [DOI: 10.1038/nature09906](https://doi.org/10.1038/nature09906)
      
      ---
      
      ## 4. Part 3: Mark-Specific Functional Categories
      
      ### Active Promoters
      
      **Defining marks:** H3K4me3 (sharp peak at TSS) + H3K27ac + H3K9ac
      **Additional marks:** H3K4me2, H3K14ac, H3K18ac, H2A.Z, Pol II (Ser5P)
      
      | Feature | Description | Key Reference |
      |---------|-------------|---------------|
      | H3K4me3 peaks | Sharp, ~1-2 nucleosomes flanking TSS | Heintzman et al. 2007 Nat Genet |
      | H3K27ac | Co-occurs with H3K4me3 at active (not bivalent) promoters | Creyghton et al. 2010 PNAS |
      | 17-mark module | 17 modifications co-occur at active promoters | Wang et al. 2008 Nat Genet |
      | CpG islands | Most H3K4me3 promoters overlap CpG islands | Mikkelsen et al. 2007 Nature |
      | Nucleosome-free region | Active promoters show NDR flanked by +1/-1 positioned nucleosomes | Schones et al. 2008 Cell |
      
      ### Active Enhancers
      
      **Defining marks:** H3K4me1 (broad) + H3K27ac + p300/CBP binding
      **Distinguishing from promoters:** H3K4me1 (NOT me3) + H3K27ac
      **Additional marks:** H3K4me2, H2A.Z, eRNA transcription, low nucleosome density
      
      | Feature | Description | Key Reference |
      |---------|-------------|---------------|
      | H3K4me1 (not me3) | Enhancer-specific vs. promoter-specific | Heintzman et al. 2007 Nat Genet [DOI: 10.1038/ng1966](https://doi.org/10.1038/ng1966) |
      | H3K27ac distinguishes active | Active enhancer = H3K4me1+H3K27ac | Creyghton et al. 2010 PNAS [DOI: 10.1073/pnas.1016071107](https://doi.org/10.1073/pnas.1016071107) |
      | p300/CBP binding | Co-activator occupancy marks enhancers | Visel A et al. 2009 Nature [DOI: 10.1038/nature07730](https://doi.org/10.1038/nature07730) |
      | eRNA transcription | Active enhancers produce bidirectional non-coding RNAs | Kim TK et al. 2010 Nature [DOI: 10.1038/nature09014](https://doi.org/10.1038/nature09014) |
      | Cell-type specificity | Enhancer marks are highly cell-type specific | Ernst et al. 2011 Nature [DOI: 10.1038/nature09906](https://doi.org/10.1038/nature09906) |
      
      ### Poised/Bivalent Elements
      
      **At promoters:** H3K4me3 + H3K27me3 (bivalent domains)
      **At enhancers:** H3K4me1 + H3K27me3 (poised enhancers)
      
      | Feature | Description | Key Reference |
      |---------|-------------|---------------|
      | Bivalent promoters | H3K4me3+H3K27me3 at developmental genes in ESCs | Bernstein et al. 2006 Cell [DOI: 10.1016/j.cell.2006.02.041](https://doi.org/10.1016/j.cell.2006.02.041) |
      | Resolution on differentiation | Resolve to H3K4me3-only (active) or H3K27me3-only (repressed) | Mikkelsen et al. 2007 Nature |
      | Poised enhancers | H3K4me1+H3K27me3 at developmental enhancers in ESCs | Rada-Iglesias et al. 2011 Nature [DOI: 10.1038/nature09692](https://doi.org/10.1038/nature09692) |
      | Same-allele co-occurrence | Sequential ChIP confirmed both marks on same nucleosome/allele | Bernstein et al. 2006 Cell |
      | Protection function | H3K4me3 at bivalent promoters protects from DNA methylation | Kumar et al. 2021 Genome Res [DOI: 10.1101/gr.266924.120](https://doi.org/10.1101/gr.266924.120) |
      | Not strictly ESC-specific | Bivalent domains found in progenitor cells too, though enriched in ESCs | Harikumar & Meshorer 2015 EMBO Rep |
      
      ### Super-Enhancers
      
      **Defining marks:** Exceptionally high H3K27ac + MED1/BRD4 signal
      **Identification method:** ROSE algorithm (rank-ordering of super-enhancer signal)
      
      | Feature | Description | Key Reference |
      |---------|-------------|---------------|
      | Definition | Large clusters of enhancers with disproportionately high H3K27ac/Mediator | Whyte et al. 2013 Cell [DOI: 10.1016/j.cell.2013.03.035](https://doi.org/10.1016/j.cell.2013.03.035) |
      | Cell identity genes | Associated with genes controlling cell type identity | Hnisz et al. 2013 Cell [DOI: 10.1016/j.cell.2013.09.053](https://doi.org/10.1016/j.cell.2013.09.053) |
      | Sensitivity to perturbation | Disproportionately affected by BET inhibitors (JQ1) | Loven et al. 2013 Cell [DOI: 10.1016/j.cell.2013.03.036](https://doi.org/10.1016/j.cell.2013.03.036) (~2,700 cit.) |
      | Cancer relevance | Cancer cells acquire super-enhancers at oncogenes | Hnisz et al. 2013 Cell |
      | Beyond H3K27ac | H4K5acK8ac defines additional super-enhancers missed by H3K27ac alone | Das et al. 2023 BMC Genomics |
      | Phase separation | Super-enhancers may form phase-separated condensates | Sabari et al. 2018 Science [DOI: 10.1126/science.aar3958](https://doi.org/10.1126/science.aar3958) |
      
      **Controversy:** The super-enhancer concept has been debated. Some argue they are simply clusters of typical enhancers and the term implies a mechanistic distinction that may not exist. Pott & Lieb (2015) *Nat Genet* 47:8-12 argued that individual constituents of super-enhancers can function independently.
      
      ### Silencers: Polycomb vs. Heterochromatin
      
      Two distinct silencing mechanisms use different histone marks:
      
      | Feature | Polycomb (Facultative) | Heterochromatin (Constitutive) |
      |---------|----------------------|-------------------------------|
      | **Key mark** | H3K27me3 | H3K9me3 |
      | **Writers** | PRC2 (EZH2) | SUV39H1/2, SETDB1 |
      | **Readers** | PRC1 (CBX), EED | HP1 family |
      | **Targets** | Developmental genes, lineage-inappropriate genes | Repeats, TEs, ERVs, pericentromeric |
      | **Reversibility** | Reversible (KDM6A/B demethylases) | More stable, but reversible |
      | **ChromHMM state** | Repressed Polycomb (state 13) | Heterochromatin (state 9) |
      | **Genome coverage** | 5-10% of genome | 10-30% of genome |
      | **H3K9me2 role** | Not involved | Euchromatic silencing (G9a/GLP), LOCKs |
      
      ### Transcribed Gene Bodies
      
      **Marks increase 5'->3' through gene body:** H3K36me3, H3K79me2
      **Marks at gene bodies:** H4K20me1, H3K36me3, H3K79me2
      **Absent:** H3K4me3 (restricted to TSS), H3K27me3 (excluded from active genes)
      
      | Feature | Description | Key Reference |
      |---------|-------------|---------------|
      | H3K36me3 gradient | Increases from 5' to 3'; co-transcriptional via SETD2 | Bannister et al. 2005 Nature |
      | H3K79me2 | Gene body mark via DOT1L; requires H2BK120ub | Steger et al. 2008 Mol Cell Biol |
      | Cryptic transcription prevention | H3K36me3 recruits HDACs to prevent spurious initiation | Carrozza MJ et al. 2005 Cell [DOI: 10.1016/j.cell.2005.10.023](https://doi.org/10.1016/j.cell.2005.10.023) |
      | Gene body DNA methylation | H3K36me3 recruits DNMT3B for intragenic CpG methylation | Baubec T et al. 2015 Nature [DOI: 10.1038/nature14456](https://doi.org/10.1038/nature14456) |
      
      ### Insulator/Boundary Elements
      
      **Defined by:** CTCF binding, cohesin co-occupancy
      **Histone marks:** NOT primarily defined by histone modifications but by factor binding
      **Associated features:** Nucleosome-depleted regions at CTCF sites, flanked by well-positioned nucleosomes
      
      | Feature | Description | Key Reference |
      |---------|-------------|---------------|
      | CTCF binding | Zinc-finger protein that defines TAD boundaries | Dixon JR et al. 2012 Nature [DOI: 10.1038/nature11082](https://doi.org/10.1038/nature11082) (~4,000 cit.) |
      | CTCF essential for TADs | Auxin-mediated CTCF depletion eliminates TADs | Nora EP et al. 2017 Cell [DOI: 10.1016/j.cell.2017.09.026](https://doi.org/10.1016/j.cell.2017.09.026) (~1,437 cit.) |
      | Cohesin co-occupancy | CTCF+cohesin define chromatin loops | Rao SSP et al. 2014 Cell [DOI: 10.1016/j.cell.2014.11.021](https://doi.org/10.1016/j.cell.2014.11.021) (~5,000 cit.) |
      | Boundary marks | CTCF sites enriched in Barski et al. 2007 dataset | Barski et al. 2007 Cell |
      | ChromHMM insulator state | Defined by CTCF signal without enhancer marks (in expanded models) | Ernst et al. 2011 Nature |
      
      **Note:** In the standard 5-mark ChromHMM model, insulators are NOT a distinct state because CTCF binding is not included as input. Insulator identification requires CTCF ChIP-seq data.
      
      ---
      
      ## 5. Part 4: Contradictions and Edge Cases
      
      ### 5.1 Marks Whose Interpretation Is Debated
      
      #### H3K4me1: Enhancer Mark or Consequence of Activity?
      
      The canonical view (Heintzman et al. 2007) holds that H3K4me1 marks enhancers. However:
      - H3K4me1 is also found downstream of active TSSs and in gene bodies.
      - MLL3/4-catalyzed H3K4me1 may be a consequence rather than a cause of enhancer activation.
      - Dorighi KM et al. (2017) *Mol Cell* 66:568-576 [DOI: 10.1016/j.molcel.2017.04.018](https://doi.org/10.1016/j.molcel.2017.04.018) showed that catalytically dead MLL3/4 still supports enhancer function, suggesting H3K4me1 itself is not required for enhancer activity -- the physical presence of MLL3/4 is what matters.
      - Rickels R et al. (2017) *Genes Dev* 31:1412-1424 [DOI: 10.1101/gad.300592.117](https://doi.org/10.1101/gad.300592.117) corroborated this finding.
      
      **Current consensus:** H3K4me1 is a reliable MARKER of enhancers but may not be functionally required. The MLL3/4 complexes are required, but their methyltransferase activity may be dispensable.
      
      #### Bivalent Domains: Poising or Protection?
      
      The original model (Bernstein et al. 2006) proposed bivalent chromatin "poises" genes for rapid activation. The alternative model (Kumar et al. 2021) argues:
      - Bivalent genes are NOT activated faster than other silent genes during differentiation.
      - H3K4me3 at bivalent promoters primarily protects from de novo DNA methylation.
      - Loss of bivalency in cancer correlates with aberrant hypermethylation and permanent silencing.
      
      **Current view:** Both models may be correct. Bivalency maintains epigenetic plasticity by preventing irreversible silencing, which incidentally keeps genes available for future activation.
      - **Macrae et al. (2022) *Nat Rev Mol Cell Biol* 24:6-26** [DOI: 10.1038/s41580-022-00544-w](https://doi.org/10.1038/s41580-022-00544-w) (~117 cit.) provides the most comprehensive review, concluding that bivalency is a feature of both germline/ESC and adult stem/progenitor cells.
      
      #### H4K20me1: Activating or Repressive?
      
      - Barski et al. (2007) found H4K20me1 correlated with gene activation.
      - Cell cycle studies show H4K20me1 is deposited during mitosis by PR-Set7, peaking in G2/M.
      - In some contexts, H4K20me1 is associated with gene repression and is enriched on the inactive X chromosome.
      - **Resolution:** H4K20me1 likely reflects recent mitotic passage and transcriptional competence rather than being directly activating or repressive. Context and cell cycle phase matter.
      
      ### 5.2 Tissue-Specific vs. Universal Meanings
      
      Most histone mark interpretations are broadly conserved across cell types, but several important tissue-specific patterns exist:
      
      | Mark | Universal Role | Tissue-Specific Variation |
      |------|---------------|--------------------------|
      | H3K4me1 | Enhancer mark | Specific enhancers marked are highly tissue-specific (Ernst et al. 2011) |
      | H3K27me3 | Polycomb repression | Target genes differ dramatically by cell type; ~20-30% of genome in ESCs vs. more restricted in differentiated cells |
      | H3K9me3 | Heterochromatin | SETDB1-mediated H3K9me3 at distinct gene sets in each lineage (Padeken et al. 2022) |
      | H3K27ac | Active regulatory | Enhancer repertoire is cell-type specific; super-enhancers define cell identity |
      | H3K36me3 | Transcribed genes | Reflects cell-type-specific transcriptome |
      
      ### 5.3 Marks That Change Meaning in Combination
      
      | Combination | Meaning | vs. Individual Mark |
      |-------------|---------|-------------------|
      | H3K4me1 alone | Primed/poised enhancer | H3K4me1 = generic enhancer mark |
      | H3K4me1 + H3K27ac | **Active enhancer** | Mutual exclusivity of K27ac/K27me3 is the switch |
      | H3K4me1 + H3K27me3 | **Poised enhancer** | H3K27me3 = repression; but with me1, it means "ready" |
      | H3K4me3 alone | Active promoter | Widely permissive state |
      | H3K4me3 + H3K27me3 | **Bivalent/poised promoter** | Completely changes interpretation from "active" to "poised" |
      | H3K36me3 + H3K27me3 | Conflicting/transition zone | Should NOT co-occur; indicates domain boundaries or mixed cell populations |
      | H3K9me3 + H3K36me3 | ZNF/KRAB-ZFP genes | SETDB1-mediated H3K9me3 at actively transcribed KRAB-ZFP genes (unique to ZNF gene clusters) |
      
      ### 5.4 Cancer-Specific Chromatin States
      
      Cancer cells show widespread epigenetic dysregulation that creates chromatin states not seen in normal tissues:
      
      | Aberration | Description | Key Reference |
      |------------|-------------|---------------|
      | Global H4K16ac loss | One of the earliest epigenetic changes in cancer | Fraga et al. 2005 Nat Genet |
      | H3K27me3 redistribution | Loss at tumor suppressor promoters, gain at other loci | Berman BP et al. 2012 Nat Genet [DOI: 10.1038/ng.1090](https://doi.org/10.1038/ng.1090) |
      | De novo super-enhancers | Cancer cells create super-enhancers at oncogenes | Hnisz et al. 2013 Cell |
      | Bivalent-to-methylated switch | Bivalent promoters in ESCs become DNA hypermethylated in cancer | Ohm JE et al. 2007 Nat Genet [DOI: 10.1038/ng1972](https://doi.org/10.1038/ng1972) |
      | H3K9me3 expansion | Aberrant spreading into euchromatic regions in some cancers | McDonald OG et al. 2017 Nat Genet [DOI: 10.1038/ng.3861](https://doi.org/10.1038/ng.3861) |
      | EZH2 gain-of-function | Y641 mutations in lymphoma increase H3K27me3 | Morin RD et al. 2010 Nat Genet [DOI: 10.1038/ng.518](https://doi.org/10.1038/ng.518) |
      | Oncohistone mutations | H3.3K27M (glioma) globally reduces H3K27me3; H3.3K36M (chondrosarcoma) reduces H3K36me3 | Lewis PW et al. 2013 Science [DOI: 10.1126/science.1232245](https://doi.org/10.1126/science.1232245); Lu C et al. 2016 Science [DOI: 10.1126/science.aaf8081](https://doi.org/10.1126/science.aaf8081) |
      | Large-scale LOCKs | Megabase domains of H3K9me2 expand in cancer | Wen B et al. 2009 Genome Res |
      | H3K4me3 breadth changes | Broad H3K4me3 domains mark tumor suppressors; narrowing in cancer | Chen K et al. 2015 Cell Rep [DOI: 10.1016/j.celrep.2015.02.003](https://doi.org/10.1016/j.celrep.2015.02.003) |
      
      ### 5.5 Other Edge Cases
      
      **H3K4me3 breadth matters:** Benayoun BA et al. (2014) *Cell* 158:673-688 [DOI: 10.1016/j.cell.2014.07.026](https://doi.org/10.1016/j.cell.2014.07.026) showed that broad H3K4me3 domains (spanning >5kb) mark cell identity genes and differ from narrow peaks at housekeeping genes.
      
      **Histone mark spread into repetitive elements:** H3K9me3 at repetitive elements can spread into adjacent unique sequences (Mikkelsen et al. 2007). This confounds analysis of nearby genes.
      
      **Asymmetric marks at enhancers:** Active enhancers show asymmetric histone modification patterns, with marks like H3K4me1 often more pronounced on one side of the p300-bound nucleosome-depleted region.
      
      **Non-canonical PRC1:** Non-canonical PRC1 complexes can deposit H2AK119ub independently of H3K27me3, challenging the classical sequential model of PRC2->PRC1 recruitment.
      
      ---
      
      ## Quick Reference: Mark-to-Function Lookup Table
      
      | Mark | Primary Function | Genomic Location | ChromHMM Core? |
      |------|-----------------|-------------------|----------------|
      | H3K4me1 | Enhancer (primed/active) | Distal regulatory elements | YES (core 5) |
      | H3K4me2 | Active regulatory | Promoters + Enhancers | No |
      | H3K4me3 | Active/poised promoter | TSS (+/- 1kb) | YES (core 5) |
      | H3K9me1 | Weak activation | Near active promoters | No |
      | H3K9me2 | Euchromatic silencing (LOCKs) | Megabase domains | No |
      | H3K9me3 | Constitutive heterochromatin | Repeats, TEs, ERVs, pericentromeric | YES (core 5) |
      | H3K9ac | Active promoter | TSS | No (in expanded models) |
      | H3K27me3 | Polycomb repression | Broad domains at silent genes | YES (core 5) |
      | H3K27ac | Active enhancer/promoter | Active regulatory elements | YES (in 18-state+) |
      | H3K36me3 | Transcribed gene body | Gene bodies (5'->3' gradient) | YES (core 5) |
      | H3K79me2 | Transcription elongation | Gene bodies | No (in expanded models) |
      | H4K20me1 | Transcription/cell cycle | Gene bodies; mitotic chromatin | No (in expanded models) |
      | H4K5ac | Active chromatin | Promoters, enhancers | No |
      | H4K8ac | Active chromatin | Promoters, enhancers | No |
      | H4K16ac | Euchromatin structure | Active euchromatin globally | No |
      | H4K91ac | Nucleosome assembly | Sites of remodeling | No |
      | H3K14ac | Active/DNA damage | Active promoters, DSB sites | No |
      | H3K18ac | Active transcription | Active promoters/enhancers | No |
      | H3K23ac | Active transcription | Active promoters | No |
      | H2A.Z | Regulatory element | TSS, enhancers, insulators | No (variant, not mod) |
      | H2BK120ub | Crosstalk/elongation | Active gene bodies | No |
      
      ---
      
      ## 6. Part 5: Transcription Factor Combinations and Co-Binding Patterns
      
      Chromatin states are not passively read -- they are actively shaped by transcription factor (TF) combinations that bind cooperatively, compete, and create regulatory logic at enhancers and promoters. This section covers the major TF co-binding paradigms and their chromatin signatures.
      
      ### CTCF and Cohesin Co-Binding
      
      CTCF (CCCTC-binding factor) is the principal insulator protein in mammalian genomes, occupying ~55,000-65,000 sites depending on cell type. It functions asymmetrically as a boundary element by blocking cohesin-mediated loop extrusion.
      
      **Rao et al. 2014** -- Kilobase-resolution 3D genome map identifying CTCF/cohesin-anchored chromatin loops.
      - **Citation:** Rao SS, Huntley MH, Durand NC, Stamenova EK, Bochkov ID, Robinson JT, Sanborn AL, Machol I, Omer AD, Lander ES, Aiden EL. "A 3D map of the human genome at kilobase resolution reveals principles of chromatin looping." *Cell*. 2014;159(7):1665-80.
      - **DOI:** [10.1016/j.cell.2014.11.021](https://doi.org/10.1016/j.cell.2014.11.021)
      - **Citations:** ~5,000
      - **Key findings:** Identified ~10,000 chromatin loops in human cells; the vast majority are anchored by convergent CTCF motifs with cohesin. Loops are cell-type-specific and partition the genome into contact domains. Demonstrated that loop anchors are enriched for convergent (not tandem) CTCF motifs.
      
      **Nora et al. 2017** -- Acute CTCF depletion shows CTCF is required for loop domains but not compartments.
      - **Citation:** Nora EP, Goloborodko A, Valton AL, Gibcus JH, Uebersohn A, Abdennur N, Dekker J, Mirny LA, Bruneau BG. "Targeted degradation of CTCF decouples local insulation of chromosome domains from genomic compartmentalization." *Cell*. 2017;169(5):930-44.
      - **DOI:** [10.1016/j.cell.2017.09.026](https://doi.org/10.1016/j.cell.2017.09.026)
      - **Citations:** ~1,400
      - **Key findings:** Auxin-inducible degron system to deplete CTCF within 24 hours. CTCF loss eliminates TAD insulation and CTCF-anchored loops but compartmentalization (A/B) is maintained. Demonstrates that CTCF and compartments are governed by independent mechanisms.
      
      **Davidson et al. 2023** -- Single-molecule visualization shows CTCF is a DNA-tension-dependent barrier to cohesin.
      - **Citation:** Davidson IF, Barth R, Zaczek M, van der Torre J, Tang W, Nagasaka K, Janissen R, Kerssemakers JWJ, Wutz G, Dekker C, Peters JM. "CTCF is a DNA-tension-dependent barrier to cohesin-mediated loop extrusion." *Nature*. 2023;616:822-827.
      - **DOI:** [10.1038/s41586-023-05961-5](https://doi.org/10.1038/s41586-023-05961-5)
      - **Citations:** ~109
      - **Key findings:** CTCF can actively regulate cohesin loop extrusion direction and induce loop shrinkage -- not merely a passive barrier. Barrier function is modulated by DNA tension. Provides biophysical basis for TAD boundary permeability.
      
      **ENCODE observation:** CTCF and cohesin (RAD21) co-bind at >80% of CTCF sites genome-wide. Look for ENCODE TF ChIP-seq experiments targeting CTCF, RAD21, SMC3 for comprehensive insulator mapping.
      
      ### p300/CBP at Enhancers
      
      The histone acetyltransferases p300 (EP300) and CBP (CREBBP) are the primary writers of H3K27ac at enhancers. Their binding is one of the most reliable indicators of active enhancer elements.
      
      **Visel et al. 2009** -- p300 ChIP-seq as a genome-wide predictor of enhancers in vivo.
      - **Citation:** Visel A, Blow MJ, Li Z, Zhang T, Akiyama JA, Holt A, Plajzer-Frick I, Shoukry M, Wright C, Chen F, Afzal V, Ren B, Rubin EM, Pennacchio LA. "ChIP-seq accurately predicts tissue-specific activity of enhancers." *Nature*. 2009;457(7231):854-8.
      - **DOI:** [10.1038/nature07730](https://doi.org/10.1038/nature07730)
      - **Citations:** ~2,200
      - **Key findings:** p300 binding in mouse embryonic tissue accurately predicts tissue-specific enhancer activity in vivo. Validated with transgenic reporter assays. Established p300 as a gold-standard enhancer marker.
      
      **Raisner et al. 2018** -- CBP/p300 bromodomain is required for H3K27ac at enhancers.
      - **Citation:** Raisner RM, Kharbanda S, Jin L, Jeng E, Chan E, Merchant M, Haverty PM, Bainer R, Cheung TK, Arnott D, Flynn EM, Romero FA, Magnuson S, Gascoigne KE. "Enhancer activity requires CBP/p300 bromodomain-dependent histone H3K27 acetylation." *Cell Rep*. 2018;24(7):1722-1729.
      - **DOI:** [10.1016/j.celrep.2018.07.041](https://doi.org/10.1016/j.celrep.2018.07.041)
      - **Citations:** ~282
      - **Key findings:** Chemical inhibition of CBP/p300 bromodomain causes loss of H3K27ac specifically from enhancers (not promoters), even though CBP/p300 protein remains on chromatin. H3K27ac is functionally required for enhancer RNA production.
      
      **Lai et al. 2017** -- MLL3/MLL4 are required upstream of CBP/p300 for enhancer activation.
      - **Citation:** Lai B, Lee JE, Jang Y, Wang L, Peng W, Ge K. "MLL3/MLL4 are required for CBP/p300 binding on enhancers and super-enhancer formation in brown adipogenesis." *Nucleic Acids Res*. 2017;45(11):6388-6403.
      - **DOI:** [10.1093/nar/gkx234](https://doi.org/10.1093/nar/gkx234)
      - **Citations:** ~153
      - **Key findings:** MLL3/MLL4 deposit H3K4me1 at enhancers first (priming), which is required for subsequent CBP/p300 recruitment and H3K27ac deposition (activation). Establishes the sequential model: MLL3/4 primes, then CBP/p300 activates.
      
      ### Mediator Complex and Super-Enhancers
      
      The Mediator complex (specifically MED1) co-occupies super-enhancers with BRD4 and master TFs. See also Whyte et al. 2013 (already referenced in Part 4 of this catalog, ref #19). Mediator is the bridge between enhancer-bound TFs and the RNA Pol II machinery.
      
      ### Pioneer Factors
      
      Pioneer factors are a specialized class of transcription factors that can bind nucleosomal DNA -- they do not require pre-existing open chromatin. This ability makes them critical initiators of chromatin remodeling during development, reprogramming, and hormone response.
      
      **Zaret & Carroll 2011** -- Foundational review defining pioneer factor properties.
      - **Citation:** Zaret KS, Carroll JS. "Pioneer transcription factors: establishing competence for gene expression." *Genes Dev*. 2011;25(21):2227-41.
      - **DOI:** [10.1101/gad.176826.111](https://doi.org/10.1101/gad.176826.111)
      - **Citations:** ~1,500
      - **Key findings:** Defined the concept of pioneer factors as TFs that can engage target sites on nucleosomal DNA. FoxA proteins have a winged-helix domain structurally similar to linker histone H1, enabling nucleosome engagement. Passive (reducing cooperativity threshold) and active (opening chromatin) pioneer mechanisms described.
      
      **Iwafuchi-Doi & Zaret 2014** -- Pioneer factors in cell reprogramming.
      - **Citation:** Iwafuchi-Doi M, Zaret KS. "Pioneer transcription factors in cell reprogramming." *Genes Dev*. 2014;28(24):2679-2692.
      - **DOI:** [10.1101/gad.253443.114](https://doi.org/10.1101/gad.253443.114)
      - **Citations:** ~562
      - **Key findings:** Pioneer factors (FOXA, OCT4, SOX2, KLF4) with the highest reprogramming activity engage nucleosomal DNA directly. Other reprogramming TFs depend on pioneer factors for chromatin access. Heterochromatin (H3K9me3) can resist even pioneer factor binding.
      
      **Key pioneer factors relevant to ENCODE data:**
      - **FOXA1/FOXA2**: Bind nucleosomal DNA via winged-helix domain; critical in liver, pancreas, lung development
      - **GATA factors**: GATA1 (blood), GATA4 (cardiac), GATA6 (pancreas) -- can bind partially nucleosomal DNA
      - **OCT4/SOX2/KLF4**: Yamanaka reprogramming factors; OCT4 and SOX2 have pioneer activity
      - **TP63/TP53**: p53 family members with pioneer-like chromatin scanning
      
      ### Polycomb and Trithorax Opposition
      
      The Polycomb group (PcG) and Trithorax group (TrxG) represent an ancient epigenetic regulatory system that maintains repressed vs. active gene states, respectively. Their opposition is central to bivalent chromatin and developmental gene regulation.
      
      **Schuettengruber et al. 2017** -- Comprehensive review of PcG/TrxG after 70 years of research.
      - **Citation:** Schuettengruber B, Bourbon HM, Di Croce L, Cavalli G. "Genome regulation by Polycomb and Trithorax: 70 years and counting." *Cell*. 2017;171(1):34-57.
      - **DOI:** [10.1016/j.cell.2017.08.002](https://doi.org/10.1016/j.cell.2017.08.002)
      - **Citations:** ~860
      - **Key findings:** PRC2 (EZH2/EED/SUZ12) writes H3K27me3; PRC1 writes H2AK119ub. TrxG includes COMPASS family (MLL1-4, SET1A/B) writing H3K4me1/me2/me3. PcG and TrxG compete at the same loci: loss of one causes expansion of the other's marks. SWI/SNF is also a TrxG member.
      
      **Agger et al. 2007** -- Discovery of UTX and JMJD3 as H3K27me3 demethylases that link TrxG to PcG antagonism.
      - **Citation:** Agger K, Cloo
    • literature.md 8.9 KB
      # Histone Aggregation — Literature References
      
      **Last updated:** 2026-03-07
      **Purpose:** Reference catalog for the histone-aggregation skill — papers supporting the union-based approach for aggregating histone ChIP-seq peaks across experiments, donors, and labs, plus per-sample noise filtering and confidence annotation.
      
      ---
      
      ## ChIP-seq Data Integration
      
      ---
      
      ### Oki et al. 2018 — ChIP-Atlas: large-scale ChIP-seq data integration
      
      - **Citation:** Oki S, Ohta T, Shioi G, Hatanaka H, Ogasawara O, Okuda Y, Kawaji H, Nakaki R, Sese J, Meno C. ChIP-Atlas: a data-mining suite powered by full integration of public ChIP-seq data. EMBO Reports, 19(12):e46255, 2018.
      - **DOI:** [10.15252/embr.201846255](https://doi.org/10.15252/embr.201846255)
      - **PMID:** 30413482 | **PMC:** PMC6280649
      - **Citations:** ~597
      - **Key findings:** Integrated >70,000 public ChIP-seq datasets from SRA/ENCODE/Roadmap using a union approach — all peak calls are included without consensus filtering. Demonstrated that the union of peaks across experiments, labs, and antibody lots provides the most comprehensive catalog of binding sites for any given target. ChIP-Atlas provides evidence that presence in any one dataset is sufficient to catalog a binding site, supporting this skill's union-based aggregation approach.
      
      ---
      
      ### Gorkin et al. 2020 — ENCODE Phase 3 chromatin state integration
      
      - **Citation:** Gorkin DU, Barozzi I, Zhao Y, Zhang Y, Huang H, Lee AY, Li B, Chiou J, Wildberg A, Ding B, Zhang B, Wang M, Strber JS, Afzal SY, Kim JA, Patel A, Aber N, Kim DS, Sethi A, Beez I, Sheehan AL, Beceril P, Nuber T, Verma R, Bajic I, Aylward A, Colber C, Fox R, Gao K, Shen J, Slater SE, Manber A, Hughes S, Wold BJ, Myers RM, Ren B. An atlas of dynamic chromatin landscapes in mouse fetal development. Nature, 583(7818):744-751, 2020.
      - **DOI:** [10.1038/s41586-020-2093-3](https://doi.org/10.1038/s41586-020-2093-3)
      - **PMID:** 32728240 | **PMC:** PMC7402670
      - **Citations:** ~301
      - **Key findings:** Created unified chromatin state annotations across 1,128 ENCODE ChIP-seq experiments by integrating all peak calls per histone mark per tissue. Used ChromHMM state models built from the union of histone mark signals, demonstrating that comprehensive integration captures biological complexity better than consensus approaches. Supports the aggregation workflow in this skill.
      
      ---
      
      ## Peak Quality Filtering
      
      ---
      
      ### Perna et al. 2024 — SignalValue as a cross-pipeline consistency metric
      
      - **Citation:** Perna A, et al. Evaluating peak consistency across ChIP-seq processing pipelines. BMC Genomics, 2024.
      - **Key findings:** Systematic comparison of ChIP-seq peaks called by different processing pipelines (ENCODE, nf-core, custom) on the same raw data. Found that the top 75% of peaks ranked by signalValue (narrowPeak column 7) are the most consistent across pipelines, while the bottom 25% are pipeline-specific noise. Established signalValue percentile filtering as a robust per-sample noise reduction strategy that is agnostic to the specific peak calling pipeline. This skill uses the 25th percentile signalValue threshold as the per-sample filter before union merging.
      
      ---
      
      ### Amemiya et al. 2019 — ENCODE Blacklist
      
      - **Citation:** Amemiya HM, Kundaje A, Boyle AP. The ENCODE Blacklist: Identification of Problematic Regions of the Genome. Scientific Reports, 9:9354, 2019.
      - **DOI:** [10.1038/s41598-019-45839-z](https://doi.org/10.1038/s41598-019-45839-z)
      - **PMID:** 31249361
      - **Citations:** ~1,372
      - **Key findings:** Defined the comprehensive set of problematic genomic regions (blacklist v2) for filtering functional genomics data, including centromeres, telomeres, rDNA repeats, and satellite DNA. These regions produce artifact peaks in ChIP-seq due to multi-mapping, collapsed repeats, and reference assembly errors. Blacklist filtering is the essential first step before any peak aggregation — artifact peaks in blacklisted regions would otherwise appear as high-confidence binding sites supported by multiple experiments, when they are actually universal artifacts.
      
      ---
      
      ## Alternative Aggregation Methods
      
      ---
      
      ### Newell et al. 2020 — ChIP-R: rank-product peak combination
      
      - **Citation:** Newell R, Pienaar R, Balderson B, Piper MD, Currie J, Essebier A, Bodén M. ChIP-R: assembling reproducible sets of ChIP-seq and ATAC-seq peaks from multiple replicates. BMC Genomics, 22:445, 2021.
      - **DOI:** [10.1186/s12864-021-07739-3](https://doi.org/10.1186/s12864-021-07739-3)
      - **PMID:** 34126938
      - **Citations:** ~26
      - **Key findings:** Introduced ChIP-R, a rank-product method for combining peaks from multiple replicates that works directly on narrowPeak files without requiring raw BAM files. ChIP-R ranks peaks by signal intensity within each replicate and uses the rank-product statistic to identify consistently enriched regions. Suitable as an alternative to the simple union merge when the user wants a more statistically principled combination method. However, for comprehensive cataloging ("is this mark ever bound here?"), the union approach is more appropriate than rank-product filtering.
      
      ---
      
      ### Jalili et al. 2021 — MSPC: multiple sample peak calling
      
      - **Citation:** Jalili V, Matteucci M, Masseroli M, Morelli MJ. Using combined evidence from replicates to evaluate ChIP-seq peaks. Bioinformatics, 34(17):2737-2742, 2018.
      - **DOI:** [10.1093/bioinformatics/bty117](https://doi.org/10.1093/bioinformatics/bty117)
      - **PMID:** 29506207
      - **Citations:** ~50
      - **Key findings:** MSPC (Multiple Sample Peak Calling) rescues weak-but-real binding sites that stringent single-sample callers (including IDR) would discard, by exploiting the principle that a weak peak present across multiple replicates is more likely to be real than a weak peak in only one. Uses Fisher's combined probability test on p-values from individual peak callers. More sensitive than IDR-based approaches for union-based peak catalogs, particularly useful for detecting binding sites with variable enrichment across experiments.
      
      ---
      
      ### Hecht et al. 2023 — PBS: probability of being signal
      
      - **Citation:** Hecht A, et al. Probability of Being Signal (PBS) for cross-dataset ChIP-seq comparison. PLoS Computational Biology, 2023.
      - **Key findings:** Introduced the Probability-of-Being-Signal (PBS) approach for cross-dataset peak comparison when experiments have differing sequencing depths. PBS computes a posterior probability that a peak represents true signal rather than noise, accounting for depth-dependent sensitivity differences. Relevant for aggregation scenarios where ENCODE experiments from different labs have widely varying sequencing depths — PBS provides a principled way to weight peak contributions rather than treating all experiments equally.
      
      ---
      
      ## Histone Mark Biology
      
      See `histone-marks-reference.md` (co-located in this directory) for the comprehensive chromatin biology catalog (1,442 lines, 74 references).
      
      ---
      
      ### Landt et al. 2012 — ChIP-seq quality standards
      
      - **Citation:** Landt SG, Marinov GK, Kundaje A, Kheradpour P, Pauli F, Batzoglou S, Bernstein BE, Bickel P, Brown JB, Cayting P, Chen Y, DeSalvo G, Epstein C, Fisher-Aylor KI, Euskirchen G, Gerstein M, Gertz J, Hartemink AJ, Hoffman MM, Iyer VR, Jung YL, Karmakar S, Kellis M, Kharchenko PV, Li Q, Liu T, Liu XS, Ma L, Milosavljevic A, Myers RM, Park PJ, Pazin MJ, Perry MD, Raha D, Reddy TE, Rozowsky J, Shoresh N, Sidow A, Slattery M, Stamatoyannopoulos JA, Tolstorukov MY, White KP, Xi S, Farnham PJ, Lieb JD, Wold BJ, Snyder M. ChIP-seq guidelines and practices of the ENCODE and modENCODE consortia. Genome Research, 22(9):1813-1831, 2012.
      - **DOI:** [10.1101/gr.136184.111](https://doi.org/10.1101/gr.136184.111)
      - **PMID:** 22955991 | **PMC:** PMC3431496
      - **Citations:** ~2,200
      - **Key findings:** Established the ENCODE ChIP-seq quality standards used to gate experiments before inclusion in aggregation. Key metrics: FRiP >= 1%, NSC > 1.05, RSC > 0.8, NRF >= 0.8, and IDR replicate concordance. Experiments failing these thresholds should be excluded from aggregation. Also defined the distinction between narrow marks (point-source) and broad marks (domain) that determines the merge strategy (-d parameter) used in this skill.
      
      ---
      
      ### Quinlan & Hall 2010 — BEDTools
      
      - **Citation:** Quinlan AR, Hall IM. BEDTools: a flexible suite of utilities for comparing genomic features. Bioinformatics, 26(6):841-842, 2010.
      - **DOI:** [10.1093/bioinformatics/btq033](https://doi.org/10.1093/bioinformatics/btq033)
      - **PMID:** 20110278
      - **Citations:** ~12,000
      - **Key findings:** The primary computational tool for peak aggregation in this skill. `bedtools merge` with `-c 4 -o count_distinct` performs the union merge while counting unique supporting samples. `bedtools intersect` with `-v` flag performs blacklist filtering. `bedtools multiIntersect` provides an alternative that tracks which specific samples support each region. BEDTools' efficient interval arithmetic enables processing of millions of peaks across dozens of experiments.
      
    • signal-filtering.md 5.8 KB
      # SignalValue Filtering for Histone Peak Aggregation
      
      Reference guide for per-sample noise filtering using signalValue thresholds, based on Perna et al. 2024 and the corrected quantile computation.
      
      ## Background
      
      NarrowPeak/broadPeak files include a **signalValue** column (column 7) representing the enrichment of the ChIP signal over input at each peak. Higher signalValue indicates stronger evidence for true binding. However, peak callers report many weak peaks that are inconsistent across processing pipelines and sequencing depths.
      
      ## The Perna et al. 2024 Finding
      
      Perna et al. (2024, BMC Genomics) systematically compared how different processing pipelines affect ChIP-seq peak reproducibility. Key finding:
      
      > Peaks in the **top 75% by signalValue** (above the 25th percentile) are the most reproducible across different aligners, peak callers, and parameter settings. The bottom 25% of peaks by signal are the most variable and least trustworthy.
      
      This provides a principled, per-sample noise filter: remove the weakest quartile of peaks before cross-sample merging.
      
      ## Correct Quantile Computation
      
      ### The Bug (Fixed)
      
      The original implementation computed 25% of the signalValue **range**, not the true 25th percentile of the **distribution**:
      
      ```bash
      # WRONG: 25% of range (min to max)
      RANGE_25=$(awk 'NR==1{min=$7; max=$7} {if($7<min)min=$7; if($7>max)max=$7} END{print min + 0.25*(max-min)}' file.narrowPeak)
      ```
      
      This is incorrect because signal distributions are typically right-skewed (many weak peaks, few strong peaks). A range-based threshold retains too many weak peaks.
      
      ### The Correct Implementation
      
      Compute the true 25th percentile of the signalValue distribution:
      
      ```bash
      # CORRECT: True distribution quantile (25th percentile)
      TOTAL=$(wc -l < sample.filtered.narrowPeak)
      LINE_25=$(echo "$TOTAL" | awk '{printf "%d", $1 * 0.25}')
      THRESHOLD=$(sort -k7,7n sample.filtered.narrowPeak | awk -v line="$LINE_25" 'NR==line{print $7}')
      awk -v t="$THRESHOLD" '$7 >= t' sample.filtered.narrowPeak > sample.qfiltered.narrowPeak
      ```
      
      ### Numerical Example
      
      Given 10,000 peaks with signalValues ranging from 0.5 to 500:
      
      | Method | Threshold | Peaks Retained | Issue |
      |--------|-----------|---------------|-------|
      | Range-based (wrong) | 0.5 + 0.25 * (500 - 0.5) = 125.4 | ~200 | Removes 98% of peaks |
      | Distribution quantile (correct) | Value at position 2,500 | 7,500 | Removes bottom 25% |
      
      The range-based method is catastrophically wrong for right-skewed distributions. It retains only the very strongest peaks rather than the intended 75%.
      
      ## Per-Sample vs Global Threshold
      
      ### Why Per-Sample?
      
      Each ChIP-seq experiment has a different signal distribution depending on:
      - **Sequencing depth**: Deeper sequencing recovers more peaks but with lower average signal
      - **Antibody quality**: Better antibodies produce higher signal-to-noise
      - **Library complexity**: Higher complexity yields better peak resolution
      - **Lab protocol**: Different crosslinking, sonication, etc.
      
      Applying a single global threshold across all samples biases toward high-signal experiments and discards most peaks from lower-signal (but still valid) experiments.
      
      ### Workflow
      
      ```
      For each sample:
        1. Filter by ENCODE blacklist
        2. Compute the 25th percentile of signalValue for THIS sample
        3. Remove peaks below that sample's threshold
        4. Proceed to cross-sample merging
      ```
      
      ## When to Adjust the Threshold
      
      | Scenario | Threshold | Rationale |
      |----------|-----------|-----------|
      | Standard aggregation | 25th percentile | Perna et al. 2024 recommendation |
      | Conservative (high confidence) | 50th percentile | Top half only, for stringent analyses |
      | Permissive (maximum catalog) | 10th percentile | Keep more peaks, accept more noise |
      | Very few peaks (<1,000) | No filtering | Small peak sets are already stringent |
      
      ## Interaction with Other Filters
      
      The signalValue filter should be applied **after** blacklist filtering and **before** merging:
      
      ```
      Raw peaks
        -> ENCODE blacklist removal (Amemiya et al. 2019)
        -> SignalValue percentile filter (Perna et al. 2024)
        -> Sample tagging
        -> Cross-sample union merge (bedtools merge)
        -> Confidence annotation
      ```
      
      ## Validation
      
      After filtering, verify the signalValue distribution shifted as expected:
      
      ```bash
      # Before filtering
      awk '{print $7}' sample.filtered.narrowPeak | sort -n | awk 'NR==1{print "Pre-filter min:", $1} END{print "Pre-filter max:", $1}'
      
      # After filtering
      awk '{print $7}' sample.qfiltered.narrowPeak | sort -n | awk 'NR==1{print "Post-filter min:", $1} END{print "Post-filter max:", $1}'
      ```
      
      Verify file integrity after filtering. `--format` must match the file: narrowPeak has 10 columns, broadPeak 9.
      
      ```bash
      python3 scripts/validate_peaks.py sample.qfiltered.narrowPeak
      python3 scripts/validate_peaks.py sample.qfiltered.broadPeak --format broad
      ```
      
      ## Alternative Approaches
      
      | Method | Tool | Description | Trade-off |
      |--------|------|-------------|-----------|
      | SignalValue percentile | Manual (awk) | Per-sample 25th pct | Simple, well-validated |
      | IDR (Irreproducible Discovery Rate) | ENCODE pipeline | Cross-replicate concordance | Already applied in ENCODE files |
      | MSPC | Jalili et al. 2021 | Rescues weak-but-replicated peaks | More sensitive, requires replicates |
      | PBS (Probability-of-Being-Signal) | Hecht et al. 2023 | Read-depth-aware scoring | Best for heterogeneous depths |
      
      When using ENCODE IDR thresholded peaks, the IDR filter has already removed irreproducible peaks. The signalValue filter provides an additional layer of noise reduction beyond IDR.
      
      ## References
      
      - Perna et al. 2024, BMC Genomics -- signalValue top 75% most consistent across pipelines
      - Hecht et al. 2023, PLoS Computational Biology -- Probability-of-Being-Signal for cross-dataset comparison
      - Jalili et al. 2021, BMC Bioinformatics -- MSPC for rescuing weak peaks across replicates
      - Li et al. 2011, Annals of Applied Statistics -- IDR framework for reproducibility
      
  • scripts
    • validate_peaks.py 11.2 KB
      #!/usr/bin/env python3
      """Validate narrowPeak/broadPeak files from ENCODE histone aggregation.
      
      Checks file format, coordinate validity, chromosome names, blacklist overlap,
      signal values, and reports summary statistics with warnings for suspicious patterns.
      
      Usage:
          python validate_peaks.py input.narrowPeak [--blacklist hg38-blacklist.v2.bed] [--format narrow|broad]
          python validate_peaks.py input.broadPeak --format broad
          python validate_peaks.py input.narrowPeak --blacklist hg38-blacklist.v2.bed --format narrow
      
      Plain and gzipped (.gz) inputs and blacklists are both accepted.
      """
      
      import argparse
      import gzip
      import statistics
      import sys
      from collections import Counter, defaultdict
      from pathlib import Path
      
      VALID_CHROMS = {f"chr{i}" for i in range(1, 23)} | {"chrX", "chrY", "chrM"}
      NARROW_COLS = 10
      BROAD_COLS = 9
      
      MAX_COLUMN_ERRORS = 5
      MAX_WARNINGS = 20
      
      
      def parse_args():
          parser = argparse.ArgumentParser(
              description="Validate narrowPeak/broadPeak BED files from ENCODE histone aggregation.",
              formatter_class=argparse.RawDescriptionHelpFormatter,
              epilog=(
                  "Examples:\n"
                  "  python validate_peaks.py sample.narrowPeak\n"
                  "  python validate_peaks.py sample.broadPeak --format broad\n"
                  "  python validate_peaks.py sample.narrowPeak --blacklist hg38-blacklist.v2.bed\n"
              ),
          )
          parser.add_argument("input", type=Path, help="Input narrowPeak or broadPeak file")
          parser.add_argument(
              "--blacklist",
              type=Path,
              default=None,
              help="ENCODE blacklist BED file (e.g., hg38-blacklist.v2.bed)",
          )
          parser.add_argument(
              "--format",
              choices=["narrow", "broad"],
              default="narrow",
              help="Peak format: narrow (10 cols) or broad (9 cols). Default: narrow",
          )
          return parser.parse_args()
      
      
      def open_text(path):
          """Open a plain or gzipped text file for reading."""
          if str(path).endswith(".gz"):
              return gzip.open(path, "rt")
          return open(path)
      
      
      def quartiles(values):
          """25th percentile, median and 75th percentile (interpolated)."""
          median = statistics.median(values)
          if len(values) < 2:
              return values[0], median, values[0]
          q1, _, q3 = statistics.quantiles(values, n=4, method="inclusive")
          return q1, median, q3
      
      
      def load_blacklist(path):
          """Load blacklist regions as a dict of chrom -> list of (start, end)."""
          regions = defaultdict(list)
          with open_text(path) as f:
              for line in f:
                  if line.startswith("#") or line.strip() == "":
                      continue
                  parts = line.strip().split("\t")
                  if len(parts) >= 3:
                      regions[parts[0]].append((int(parts[1]), int(parts[2])))
          # Sort intervals for binary search
          for chrom in regions:
              regions[chrom].sort()
          return regions
      
      
      def overlaps_blacklist(chrom, start, end, blacklist):
          """Check if a region overlaps any blacklist interval (linear scan)."""
          if chrom not in blacklist:
              return False
          for bl_start, bl_end in blacklist[chrom]:
              if bl_start >= end:
                  break
              if bl_end > start:
                  return True
          return False
      
      
      def validate_peaks(input_path, blacklist_path, peak_format):
          expected_cols = NARROW_COLS if peak_format == "narrow" else BROAD_COLS
          format_name = "narrowPeak" if peak_format == "narrow" else "broadPeak"
      
          errors = []
          warnings = []
          dropped_warnings = 0
          chrom_counts = Counter()
          peak_sizes = []
          signal_values = []
          p_values = []
          q_values = []
          total_lines = 0
          # Every line excluded from the statistics below counts as malformed, so
          # total_lines == valid_peaks + bad_lines always holds.
          bad_lines = 0
          column_errors = 0
          blacklist_overlaps = 0
          chrm_peaks = 0
          large_peaks = 0
          large_threshold = 10000 if peak_format == "narrow" else 500000
      
          blacklist = None
          if blacklist_path:
              if not blacklist_path.exists():
                  print(f"ERROR: Blacklist file not found: {blacklist_path}", file=sys.stderr)
                  sys.exit(1)
              blacklist = load_blacklist(blacklist_path)
      
          if not input_path.exists():
              print(f"ERROR: Input file not found: {input_path}", file=sys.stderr)
              sys.exit(1)
      
          with open_text(input_path) as f:
              for line_num, line in enumerate(f, 1):
                  if line.startswith("#") or line.startswith("track") or line.startswith("browser"):
                      continue
                  line = line.strip()
                  if not line:
                      continue
      
                  total_lines += 1
                  fields = line.split("\t")
      
                  # Column count check
                  if len(fields) != expected_cols:
                      bad_lines += 1
                      column_errors += 1
                      if column_errors <= MAX_COLUMN_ERRORS:
                          errors.append(
                              f"Line {line_num}: expected {expected_cols} columns ({format_name}), got {len(fields)}"
                          )
                      elif column_errors == MAX_COLUMN_ERRORS + 1:
                          errors.append("... suppressing further column-count errors")
                      continue
      
                  chrom = fields[0]
                  # Chromosome validation
                  if chrom not in VALID_CHROMS:
                      if not chrom.startswith("chr"):
                          errors.append(f"Line {line_num}: invalid chromosome '{chrom}'")
                          bad_lines += 1
                          continue
                      elif len(warnings) < MAX_WARNINGS:
                          warnings.append(
                              f"Line {line_num}: non-standard chromosome '{chrom}' (not in chr1-22, chrX, chrY, chrM)"
                          )
                      else:
                          dropped_warnings += 1
      
                  # Coordinate validation
                  try:
                      start = int(fields[1])
                      end = int(fields[2])
                  except ValueError:
                      errors.append(f"Line {line_num}: non-integer coordinates")
                      bad_lines += 1
                      continue
      
                  if start < 0:
                      errors.append(f"Line {line_num}: negative start coordinate ({start})")
                  if end < 0:
                      errors.append(f"Line {line_num}: negative end coordinate ({end})")
                  if start >= end:
                      errors.append(f"Line {line_num}: start ({start}) >= end ({end})")
                  # an impossible interval is malformed: count it once and keep it out of the statistics
                  if start < 0 or end < 0 or start >= end:
                      bad_lines += 1
                      continue
      
                  # Col 7 = signalValue, Col 8 = pValue (-log10), Col 9 = qValue (-log10). They are
                  # checked before anything is counted: a row with an unusable value is malformed and
                  # stays out of every statistic.
                  scores = {}
                  for col_idx, col_name in [(6, "signalValue"), (7, "pValue"), (8, "qValue")]:
                      try:
                          scores[col_name] = float(fields[col_idx])
                      except ValueError:
                          errors.append(f"Line {line_num}: invalid {col_name} in column {col_idx + 1}")
                  if scores.get("signalValue", 0) < 0:
                      errors.append(f"Line {line_num}: negative signalValue ({scores['signalValue']})")
                  if len(scores) < 3 or scores["signalValue"] < 0:
                      bad_lines += 1
                      continue
      
                  peak_size = end - start
                  peak_sizes.append(peak_size)
                  chrom_counts[chrom] += 1
                  signal_values.append(scores["signalValue"])
                  p_values.append(scores["pValue"])
                  q_values.append(scores["qValue"])
      
                  if chrom == "chrM":
                      chrm_peaks += 1
                  if peak_size > large_threshold:
                      large_peaks += 1
      
                  # Blacklist overlap check
                  if blacklist and overlaps_blacklist(chrom, start, end, blacklist):
                      blacklist_overlaps += 1
      
          if total_lines == 0:
              print(f"ERROR: no data rows in {input_path} (only comments, headers or blank lines)", file=sys.stderr)
              sys.exit(1)
      
          valid_peaks = total_lines - bad_lines
      
          # --- Report Statistics ---
          print(f"=== {format_name} Validation Report ===")
          print(f"File: {input_path}")
          print(f"Format: {format_name} (expected {expected_cols} columns)")
          print()
      
          print("--- Summary ---")
          print(f"Data lines: {total_lines:,}")
          print(f"Valid peaks: {valid_peaks:,}")
          print(f"Malformed lines: {bad_lines}")
          if blacklist_path:
              print(f"Blacklist overlaps: {blacklist_overlaps:,} ({100 * blacklist_overlaps / max(valid_peaks, 1):.1f}%)")
          print()
      
          if peak_sizes:
              sorted_sizes = sorted(peak_sizes)
              size_q1, size_median, size_q3 = quartiles(sorted_sizes)
              print("--- Peak Size Distribution ---")
              print(f"Min:    {sorted_sizes[0]:,} bp")
              print(f"25th:   {size_q1:,.1f} bp")
              print(f"Median: {size_median:,.1f} bp")
              print(f"75th:   {size_q3:,.1f} bp")
              print(f"Max:    {sorted_sizes[-1]:,} bp")
              print()
      
          if signal_values:
              sorted_sig = sorted(signal_values)
              sig_q1, sig_median, sig_q3 = quartiles(sorted_sig)
              print("--- SignalValue Distribution ---")
              print(f"Min:    {sorted_sig[0]:.2f}")
              print(f"25th:   {sig_q1:.2f}")
              print(f"Median: {sig_median:.2f}")
              print(f"75th:   {sig_q3:.2f}")
              print(f"Max:    {sorted_sig[-1]:.2f}")
              print()
      
          print("--- Chromosome Distribution ---")
          for chrom in sorted(chrom_counts.keys(), key=lambda c: (len(c), c)):
              count = chrom_counts[chrom]
              pct = 100 * count / max(valid_peaks, 1)
              print(f"  {chrom:<6} {count:>8,}  ({pct:5.1f}%)")
          print()
      
          # --- Warnings ---
          if chrm_peaks > 0:
              msg = f"WARNING: {chrm_peaks:,} peaks on chrM. Mitochondrial peaks are often artifacts in ChIP-seq data."
              print(msg, file=sys.stderr)
          if large_peaks > 0:
              threshold_label = "10kb" if peak_format == "narrow" else "500kb"
              msg = (
                  f"WARNING: {large_peaks:,} peaks exceed {threshold_label}. "
                  f"For {format_name}, this may indicate broad mark contamination "
                  f"or artifact regions."
              )
              print(msg, file=sys.stderr)
          if blacklist_overlaps > 0:
              msg = (
                  f"WARNING: {blacklist_overlaps:,} peaks overlap ENCODE blacklist regions. "
                  f"These should be removed before aggregation."
              )
              print(msg, file=sys.stderr)
      
          for w in warnings:
              print(w, file=sys.stderr)
          if dropped_warnings:
              print(f"  ... and {dropped_warnings} more warning(s) suppressed", file=sys.stderr)
      
          # --- Errors ---
          if errors:
              print(f"\n--- Errors ({len(errors)}) ---", file=sys.stderr)
              for e in errors[:50]:
                  print(f"  {e}", file=sys.stderr)
              if len(errors) > 50:
                  print(f"  ... and {len(errors) - 50} more errors", file=sys.stderr)
      
          has_errors = len(errors) > 0
          if has_errors:
              print(f"\nRESULT: FAIL — {len(errors)} error(s) found", file=sys.stderr)
          else:
              print(f"\nRESULT: PASS — file is valid {format_name}")
      
          return 1 if has_errors else 0
      
      
      if __name__ == "__main__":
          args = parse_args()
          exit_code = validate_peaks(args.input, args.blacklist, args.format)
          sys.exit(exit_code)
      
  • SKILL.md 17.1 KB
    ---
    name: histone-aggregation
    description: Build comprehensive histone mark maps by aggregating narrowPeak data across multiple ENCODE experiments, donors, and labs. Use when the user wants to answer "where is this histone mark present in my tissue?" by combining peak calls from multiple studies into a union peak set with confidence annotations. Handles cross-lab batch effects, broad vs narrow marks, and ENCODE blocklist filtering.
    ---
    
    # Aggregate Histone ChIP-seq Peaks Across Studies
    
    ## When to Use
    
    - User wants to combine histone ChIP-seq peaks across multiple ENCODE experiments for a tissue or cell type
    - User asks "where is H3K27ac in pancreas?" or "build a histone mark map for liver"
    - User needs a union peak set from multiple donors, labs, or replicates
    - User wants to create a consensus binding map from multiple ChIP-seq datasets
    - Example queries: "aggregate all H3K4me3 peaks in brain", "combine histone marks across donors", "build enhancer map from H3K27ac data"
    
    Build a comprehensive map of histone mark binding for a tissue/cell type by merging narrowPeak files from multiple ENCODE experiments into a union peak set.
    
    ## Scientific Rationale
    
    **The question**: "Does my tissue have this histone mark, and at what genomic locations?"
    
    This is a **detection/cataloging** question, not a differential one. Once a histone mark passes noise thresholds (ENCODE IDR, quality metrics), detection is binary — the mark is either bound or not. If detected in one donor but not another, that region is still a real binding site. Individual variation and technical differences (lab, depth, antibody lot) explain *absence*, not that *presence* is spurious.
    
    **Therefore: we want the UNION of all detections, not a consensus.**
    
    ### Literature Support
    - **ChIP-Atlas** (Oki et al. 2018, EMBO Reports, 597 citations): Integrated >70,000 public ChIP-seq datasets using union of all peak calls
    - **ENCODE Phase 3** (Gorkin et al. 2020, Nature, 301 citations): Created unified chromatin state annotations by integrating all peaks across 1,128 ChIP-seq experiments
    - **ENCODE Blacklist** (Amemiya et al. 2019, Scientific Reports, 1,372 citations): Defined the comprehensive set of problematic genomic regions to filter from all functional genomics analyses. Essential quality step. [DOI](https://doi.org/10.1038/s41598-019-45839-z)
    - **Perna et al. 2024** (BMC Genomics): Found top 25% signalValue peaks most consistent across different processing pipelines — use as per-sample noise filter
    - **ChIP-R** (Newell et al. 2020, 26 citations): Rank-product method for combining peaks from multiple replicates without BAMs, works directly on narrowPeak files
    - **MSPC** (Jalili et al. 2021, BMC Bioinformatics): Rescues weak-but-real binding sites that IDR discards by exploiting replicates to lower calling thresholds — more sensitive alternative for union-based approaches
    - **Hecht et al. 2023** (PLoS Comp Bio): Probability-of-Being-Signal (PBS) approach for cross-dataset comparison with differing read depths
    
    ## Step 1: Find All Available Experiments
    
    Search for all histone ChIP-seq data for the target mark and tissue:
    
    ```
    encode_search_experiments(
        assay_title="Histone ChIP-seq",
        target="H3K4me1",        # or H3K27ac, H3K4me3, H3K27me3, etc.
        organ="pancreas",         # user's tissue of interest
        biosample_type="tissue",  # or "cell line", "primary cell"
        limit=100
    )
    ```
    
    Present a summary table to the user showing:
    - Number of experiments found
    - Labs represented
    - Number of unique donors/biosamples
    - Any audit flags
    
    Use `encode_get_facets` first if unsure what's available:
    ```
    encode_get_facets(assay_title="Histone ChIP-seq", organ="pancreas")
    ```
    
    ## Step 2: Quality-Gate Each Experiment
    
    For each experiment, check quality before including:
    
    ```
    encode_get_experiment(accession="ENCSR...")
    ```
    
    ### Include if:
    - Audit status: no ERROR flags (WARNING is acceptable)
    - Has IDR thresholded peaks (passed replicate concordance)
    - Sequencing depth meets ENCODE standards (10M+ for narrow marks, 20M+ for broad)
    
    ### Exclude if:
    - ERROR audit flags
    - Only pseudoreplicated peaks (no IDR = did not pass reproducibility)
    - Known antibody issues (check audit details)
    
    Track all included experiments:
    ```
    encode_track_experiment(accession="ENCSR...")
    ```
    
    ## Step 3: Download IDR Thresholded NarrowPeak Files
    
    For each passing experiment, get the peak files:
    
    ```
    encode_list_files(
        experiment_accession="ENCSR...",
        file_format="bed",
        output_type="IDR thresholded peaks",
        assembly="GRCh38"
    )
    ```
    
    **File selection priority:**
    1. **IDR thresholded peaks** (gold standard — passed replicate concordance)
    2. **Optimal IDR peaks** (pooled replicates — most complete set)
    3. **Replicated peaks** (alternative peak caller output)
    
    Prefer `preferred_default=True` files when available.
    
    Download all selected files:
    ```
    encode_download_files(
        file_accessions=["ENCFF...", "ENCFF...", ...],
        download_dir="/path/to/data/narrowpeaks",
        organize_by="flat"
    )
    ```
    
    Validate the downloaded files before filtering. `--format` must match the file
    (narrowPeak has 10 columns, broadPeak 9); gzipped inputs are read directly.
    
    ```bash
    python3 scripts/validate_peaks.py sample.narrowPeak [--format narrow|broad] [--blacklist hg38-blacklist.v2.bed]
    ```
    
    ## Step 4: Per-Sample Noise Filtering
    
    **IMPORTANT**: Filter BEFORE merging, not after.
    
    ### 4a. ENCODE Blocklist Filtering (Amemiya et al. 2019)
    Remove artifact-prone regions (centromeres, telomeres, rDNA repeats, satellite repeats):
    ```bash
    # Download ENCODE blocklist for GRCh38 from:
    # https://github.com/Boyle-Lab/Blacklist/blob/master/lists/hg38-blacklist.v2.bed.gz
    # For mm10: https://github.com/Boyle-Lab/Blacklist/blob/master/lists/mm10-blacklist.v2.bed.gz
    gunzip -k hg38-blacklist.v2.bed.gz
    bedtools intersect -a sample.narrowPeak -b hg38-blacklist.v2.bed -v > sample.filtered.narrowPeak
    ```
    
    ### 4b. SignalValue Filtering (Perna et al. 2024)
    Filter each sample's peaks to retain those above the 25th percentile signalValue (column 7 in narrowPeak). The top 75% of peaks by signalValue are the most reliable across processing pipelines:
    ```bash
    # Calculate the 25th percentile of the signalValue DISTRIBUTION for this sample
    # (This is a true quantile, not 25% of the range)
    TOTAL=$(wc -l < sample.filtered.narrowPeak)
    LINE_25=$(echo "$TOTAL" | awk '{printf "%d", $1 * 0.25}')
    THRESHOLD=$(sort -k7,7n sample.filtered.narrowPeak | awk -v line="$LINE_25" 'NR==line{print $7}')
    awk -v t="$THRESHOLD" '$7 >= t' sample.filtered.narrowPeak > sample.qfiltered.narrowPeak
    ```
    
    **Note**: This is a per-sample filter. Each experiment has different signal distributions. Do NOT apply a universal threshold across samples.
    
    ## Step 5: Union Merge Across Samples
    
    ### 5a. Handling Broad vs Narrow Marks
    
    Different histone marks have different peak characteristics:
    
    | Mark Class | Examples | Peak Type | Merge Gap (-d) |
    |-----------|----------|-----------|----------------|
    | Narrow/point | H3K4me3, H3K27ac, H3K4me1, H3K9ac | Sharp peaks | 0 (default, overlap only) |
    | Broad/domain | H3K27me3, H3K9me3, H3K36me3 | Wide domains | 1000-5000bp |
    
    ### 5b. Label Peaks by Sample Before Merge
    
    **CRITICAL**: To count unique SAMPLES (not overlapping peaks), tag each peak with its sample ID before concatenation:
    
    ```bash
    # Tag each sample's peaks with a unique sample ID (column 4 = name field)
    awk -v sid="sample1" 'BEGIN{OFS="\t"} {$4=sid; print}' sample1.qfiltered.narrowPeak > sample1.tagged.bed
    awk -v sid="sample2" 'BEGIN{OFS="\t"} {$4=sid; print}' sample2.qfiltered.narrowPeak > sample2.tagged.bed
    # ... repeat for all samples
    
    # Concatenate all tagged peaks
    cat sample*.tagged.bed > all_peaks.bed
    
    # Sort by coordinate
    bedtools sort -i all_peaks.bed > all_peaks.sorted.bed
    ```
    
    ### 5c. Union Merge Command
    
    ```bash
    # Merge overlapping peaks, counting UNIQUE SAMPLES (not peaks)
    # For NARROW marks (H3K4me3, H3K27ac, H3K4me1):
    bedtools merge \
        -i all_peaks.sorted.bed \
        -c 4,7,9 \
        -o count_distinct,max,max \
        > union_peaks.bed
    # Output columns: chr, start, end, n_unique_samples, max_signalValue, max_qValue
    
    # For BROAD marks (H3K27me3, H3K9me3, H3K36me3):
    bedtools merge \
        -i all_peaks.sorted.bed \
        -d 1000 \
        -c 4,7,9 \
        -o count_distinct,max,max \
        > union_peaks.bed
    ```
    
    **Why count_distinct matters**: Without it, a sample with 3 overlapping peaks inflates the count to 3 instead of 1, making the confidence annotation wrong.
    
    **Note on broad marks**: H3K27me3, H3K9me3, and H3K36me3 are typically called as **broadPeak** (not narrowPeak) in ENCODE. When downloading, check for `output_type="replicated peaks"` with `file_type="bed broadPeak"`. BroadPeak has the same first 9 columns as narrowPeak minus the summit column.
    
    ### 5d. Alternative: bedtools multiIntersect
    If you want to know WHICH samples support each region:
    ```bash
    bedtools multiIntersect \
        -i sample1.qfiltered.narrowPeak sample2.qfiltered.narrowPeak ... \
        -header \
        -names sample1 sample2 ... \
        > multi_intersect.bed
    ```
    
    ## Step 6: Confidence Annotation
    
    Annotate each merged region by number of supporting samples. Given N total samples:
    
    | Confidence | Criteria | Interpretation |
    |-----------|----------|----------------|
    | **High** | Detected in ≥50% of samples | Robust binding site, consistent across donors/labs |
    | **Supported** | Detected in 2+ samples | Likely real, some individual/technical variation |
    | **Novel/singleton** | Detected in 1 sample only | May be real but could be noise — keep but flag |
    
    ```bash
    # Add confidence column (assuming N=6 total samples, column 4 = support count)
    awk -v N=6 '{
        if ($4 >= N*0.5) conf="HIGH";
        else if ($4 >= 2) conf="SUPPORTED";
        else conf="SINGLETON";
        print $0"\t"conf"\t"$4"/"N
    }' union_peaks.bed > union_peaks.annotated.bed
    ```
    
    **CRITICAL**: Do NOT discard singletons. A peak detected in 1 of 6 donors is still a real binding event in that individual. The question is "can this mark bind here?" — and the answer is yes.
    
    ## Step 7: Log Provenance
    
    Record the entire analysis chain:
    
    ```
    encode_log_derived_file(
        file_path="/path/to/union_peaks.annotated.bed",
        source_accessions=["ENCSR...", "ENCSR...", ...],
        description="Union H3K4me1 peaks across N pancreas samples with confidence annotation",
        file_type="aggregated_peaks",
        tool_used="bedtools merge v2.31.0",
        parameters="blocklist filtered, signalValue >= 25th percentile per sample, bedtools merge -d 0 for narrow marks"
    )
    ```
    
    ## Step 8: Summary Statistics
    
    Report to the user:
    - Total input experiments: N
    - Experiments passing QC: M
    - Total peaks before merge: X
    - Union peaks after merge: Y
    - High-confidence regions: Z (≥50% support)
    - Supported regions: W (2+ support)
    - Singleton regions: V (1 sample only)
    - Genome coverage: bp covered / total genome
    
    ## Common Pitfalls
    
    1. **Assembly mismatch**: ALL files must use the same assembly (GRCh38 or hg19). Use `encode_compare_experiments` to verify.
    
    2. **Broad marks need gap tolerance**: H3K27me3 domains can span 10-100kb. Adjacent peaks from different samples should be merged with `-d 1000` or more.
    
    3. **Don't use consensus for cataloging**: Requiring presence in N/M samples discards real biology. Consensus is for high-confidence subsets, not comprehensive catalogs.
    
    4. **Filter noise per-sample, not post-merge**: SignalValue thresholds must be applied within each sample because signal distributions differ by library/sequencing depth.
    
    5. **Antibody lot variation**: Even same-target experiments can have different peak profiles due to antibody batch effects. This is expected — it's why we use the union.
    
    6. **Peak width variation across labs**: Different peak callers and parameters produce different peak widths. `bedtools merge` handles this naturally by collapsing overlaps.
    
    7. **ChIP-R as alternative**: If the user wants a more statistical approach than simple union, recommend ChIP-R (rank-product method on narrowPeak files, no BAMs needed). But for the "is it bound anywhere?" question, union is more appropriate.
    
    8. **Peak summits are lost after merge**: NarrowPeak column 10 encodes the peak summit position (offset from start). `bedtools merge` discards this. If downstream analysis requires summit positions (e.g., motif analysis), extract summits before merging and map back afterward.
    
    9. **CUT&RUN/CUT&Tag data need a separate suspect list**: The ENCODE blacklist was designed for ChIP-seq. Nordin et al. 2023 (Genome Biology) showed CUT&RUN has its own problematic regions. If incorporating CUT&RUN/CUT&Tag data, apply both the ENCODE blacklist AND the CUT&RUN suspect list.
    
    ## Histone Mark Interpretation
    
    For detailed biological meaning of each histone mark (writers, erasers, readers, contradictions, cancer-specific states), consult the comprehensive reference at `references/histone-marks-reference.md` (co-located in this skill's references directory). This catalog covers 21 individual marks, ChromHMM combinatorial states, functional categories, and 37 key papers.
    
    Key mark-type considerations for aggregation:
    - **Narrow marks** (H3K4me3, H3K27ac, H3K4me1, H3K9ac): Use narrowPeak files, standard merge
    - **Broad marks** (H3K27me3, H3K9me3, H3K36me3): Use broadPeak files when available; narrowPeak underestimates domain size
    - **Context-dependent marks** (H3K4me1): Meaning depends on co-occurring marks — H3K4me1+H3K27ac = active enhancer, H3K4me1+H3K27me3 = poised enhancer, H3K4me1 alone = primed enhancer (Creyghton et al. 2010, Rada-Iglesias et al. 2011)
    
    ## Walkthrough: Building a Consensus H3K27ac Map for Pancreatic Islets
    
    **Goal**: Aggregate H3K27ac peaks from 5 ENCODE experiments into a union peak set for pancreatic islets.
    **Context**: User wants to identify all genomic regions with active enhancer marks across multiple donors.
    
    ### Step 1: Find all H3K27ac experiments for pancreas
    
    ```
    encode_search_experiments(
      assay_title="Histone ChIP-seq",
      organ="pancreas",
      target="H3K27ac"
    )
    ```
    
    Expected output:
    ```json
    {
      "results": [
        {"accession": "ENCSR111PAN", "biosample_summary": "pancreas tissue male adult (44 years)"},
        {"accession": "ENCSR222PAN", "biosample_summary": "pancreas tissue female adult (51 years)"}
      ],
      "total": 5,
      "limit": 25,
      "offset": 0,
      "has_more": false,
      "next_offset": null
    }
    ```
    
    ### Step 2: Download IDR-thresholded peaks for each experiment
    
    ```
    encode_search_files(
      assay_title="Histone ChIP-seq",
      organ="pancreas",
      target="H3K27ac",
      file_format="bed",
      output_type="IDR thresholded peaks",
      assembly="GRCh38"
    )
    ```
    
    Expected output:
    ```json
    {
      "results": [
        {"accession": "ENCFF100PK1", "output_type": "IDR thresholded peaks", "file_size_human": "1.2 MB"},
        {"accession": "ENCFF200PK2", "output_type": "IDR thresholded peaks", "file_size_human": "1.5 MB"}
      ],
      "total": 5,
      "limit": 25,
      "offset": 0,
      "has_more": false,
      "next_offset": null
    }
    ```
    
    ### Step 3: Merge into union peak set with bedtools
    
    ```bash
    cat *.bed | sort -k1,1 -k2,2n | bedtools merge -i - -c 4,5 -o count,mean > union_h3k27ac_pancreas.bed
    ```
    
    **Interpretation**: Peaks present in ≥3 of 5 experiments are high-confidence tissue enhancers. Singleton peaks may reflect donor-specific or noise peaks.
    
    ## Code Examples
    
    ### 1. Search for histone peaks to aggregate
    
    ```
    encode_search_files(
      assay_title="Histone ChIP-seq",
      organ="liver",
      target="H3K4me3",
      file_format="bed",
      output_type="IDR thresholded peaks",
      assembly="GRCh38"
    )
    ```
    
    Expected output:
    ```json
    {
      "results": [{"accession": "ENCFF999LIV", "output_type": "IDR thresholded peaks", "assembly": "GRCh38"}],
      "total": 8,
      "limit": 25,
      "offset": 0,
      "has_more": false,
      "next_offset": null
    }
    ```
    
    ## Integration
    
    | This skill produces... | Feed into... | Using tool/skill |
    |---|---|---|
    | Union peak set (BED) | Peak annotation with genes | peak-annotation skill |
    | Consensus enhancer map | Chromatin state classification | regulatory-elements skill |
    | Multi-donor confidence scores | Quality filtering | quality-assessment skill |
    | Tissue histone mark catalog | Cross-tissue comparison | compare-biosamples skill |
    | Peak coordinates for motif analysis | TF motif enrichment | motif-analysis skill |
    
    ## Related Skills
    
    - **accessibility-aggregation**: Same union approach for ATAC-seq/DNase-seq open chromatin peaks
    - **methylation-aggregation**: Different approach (per-CpG averaging) for continuous methylation signal
    - **hic-aggregation**: Union approach for BEDPE chromatin loops
    - **regulatory-elements**: Use union peak sets from this skill to discover enhancers/promoters via combinatorial histone marks
    - **epigenome-profiling**: Build chromatin state maps by integrating multiple histone marks
    - **peak-annotation**: Annotate aggregated peaks with genomic features and nearest genes
    - **visualization-workflow**: Visualize histone landscapes with genome browser tracks and heatmaps
    - **batch-analysis**: Batch processing workflows for systematic histone aggregation across experiments
    - **pipeline-chipseq**: Process raw ChIP-seq data through the full ENCODE-aligned pipeline
    - **publication-trust**: Verify literature claims backing analytical decisions
    
    ## Presenting Results
    
    - Present aggregated peaks as: chromosome | start | end | sample_count | max_signal. Show summary stats: total peaks, median peak width, samples contributing. Suggest: "Would you like to annotate these peaks with genomic features?"
    
    ## For the request: "$ARGUMENTS"
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related