11: Epigenomics & Peak Calling (ChIP-Seq & ATAC-Seq)
Tested Stacks:
GATK 4.6.1
Samtools 1.21
Nextflow 24.10
Seurat v5.1
Python 3.12
Prerequisites: Basic Linux CLI & Sequencing Formats
📚 Chapter 11 of 13
0% Course Completed
Chapter 11: Epigenomics & Peak Calling (ChIP-Seq & ATAC-Seq)
While the primary DNA sequence is identical across nearly all somatic cells in an organism, epigenetic modifications dictate cell-type-specific gene expression. Epigenomics assays profile open chromatin landscapes (ATAC-seq), transcription factor binding sites, and post-translational histone modifications (ChIP-seq and CUT&RUN).
The Crucial Role of the ChIP-Seq Input Control
Sonication shearing does not break genomic DNA uniformly: open chromatin regions fragment far more easily than dense heterochromatin. Without an Input DNA control (un-immunoprecipitated crosslinked DNA), an aligner and peak caller will identify open regions as false-positive antibody binding sites. MACS3 explicitly subtracts the local Poisson background estimated from the Input control.
1. Peak Calling with MACS3
# 1. Call narrow peaks for a Transcription Factor (e.g. CTCF, FOXA1)
macs3 callpeak \
-t chip_treatment.bam \
-c chip_input_control.bam \
-f BAMPE \
-g hs \
-n ctcf_sample \
-q 0.01 \
--outdir macs3_results/
# 2. Call broad peaks for repressive histone marks (e.g. H3K27me3, H3K9me3)
macs3 callpeak \
-t h3k27me3.bam \
-c input.bam \
-f BAMPE \
-g hs \
--broad \
--broad-cutoff 0.05 \
-n h3k27me3_broad \
--outdir macs3_broad_results/2. De Novo Motif Discovery with HOMER
# Discover transcription factor consensus motifs within MACS3 peaks
findMotifsGenome.pl \
macs3_results/ctcf_sample_peaks.narrowPeak \
hg38 \
homer_motifs_output/ \
-size 200 \
-mask
⚠️
Common Pitfalls & Troubleshooting Checklist
- Java Heap Exhaustion (GATK / Picard): If processes terminate with
java.lang.OutOfMemoryError, set your environment variable explicitly:export _JAVA_OPTIONS="-Xmx16g -Djava.io.tmpdir=/tmp". - Index Timestamp Mismatch: If tools complain that a BAM index is missing or out of date, regenerate with
samtools index -@ 4 sample.bam. - Conda Channel Conflicts: Avoid ABI incompatibilities between bioconda and conda-forge by setting strict priority:
conda config --set channel_priority strict. - Chromosome Naming Contamination: Always verify whether reference FASTA headers use
chr1or1; divergent naming causes silent alignment drops.
Was this guide helpful to your research?
Help us maintain 100% accurate, peer-reviewed bioinformatics standards.