Discovers de novo motifs and tests known motif enrichment in ChIP-seq, ATAC-seq, or other peak sequences using HOMER, MEME-ChIP (STREME, CentriMo, TOMTOM, FIMO), monaLisa (regression-based binned analysis), and AME (differential enrichment). Embeds background-selection theory (GC-matched, dinucleotide-shuffled, Markov order-2, peak-flanks), summit-centering requirements, and recognizes when to use deep-learning attribution methods (TF-MoDISco on BPNet/chromBPNet) for soft motif syntax.
# HOMER
conda install -c bioconda homer
perl $CONDA_PREFIX/share/homer/configureHomer.pl -install hg38 mm10
# MEME suite (5.4+ has STREME, not DREME)
conda install -c bioconda meme
# Motif databases
wget https://jaspar.genereg.net/download/data/2024/CORE/JASPAR2024_CORE_vertebrates_non-redundant_pfms_meme.txt
wget https://hocomoco12.autosome.org/final_bundle/hocomoco12/H12CORE/formatted_motifs/H12CORE_meme_format.meme
# Optional: monaLisa for regression-based binned analysis
BiocManager::install(c('monaLisa', 'JASPAR2024', 'BSgenome.Hsapiens.UCSC.hg38'))
Tell the agent what to do: - "Run HOMER findMotifsGenome.pl on summit-centered narrowPeak with repeat masking and 8 cores" - "Run MEME-ChIP with JASPAR 2024 motifs on peaks resized to ±100 bp around summit" - "Find motifs central to my CTCF peaks (test direct vs tethered binding via CentriMo)" - "Compare motif enrichment between gained-in-treatment and gained-in-control peaks (AME differential)" - "Use monaLisa to find motifs discriminating top-quintile log2FC peaks from bottom-quintile" - "Scan my motif of interest genome-wide with FIMO at p < 1e-5" - "My top motif is the AluY consensus; diagnose and fix the background"
"Run HOMER de novo + known motif discovery on FOXA1 ChIP-seq peaks. Recenter to ±100 bp around summit, mask repeats, use 8 cores. Report top 10 known motifs and top 5 de novo."
"Run MEME-ChIP on H3K27ac peaks with JASPAR 2024 vertebrates database. Include STREME for short motifs, MEME for longer motifs, CentriMo for central enrichment, TOMTOM for known-motif matching."
"I have peaks gained in EZH2-inhibitor treatment vs DMSO control. Run AME to find motifs enriched in gained-only peaks."
"Split my peaks into quintiles by log2FC from differential analysis. Run monaLisa to find which TF motifs discriminate top quintile from bottom, controlling for GC content."
"Run CentriMo on my CTCF peaks to verify direct sequence-specific binding (motif should be centrally enriched within ±50 bp of summit) vs tethered/indirect binding (no central enrichment)."
"Scan the human genome (hg38) for FOXA1 motif occurrences at p < 1e-5 with HOCOMOCO v12 PWM."
"My top motif is GC-rich, doesn't match any TF in TOMTOM, and looks like an Alu fragment. Check for repeat contamination and re-run with
-maskplus GC-matched background."
"Extract motifs from a trained chromBPNet model using TF-MoDISco from the attribution scores."
bedtools getfasta with the matching genome FASTA-mask), Markov order-2 (STREME / MEME-ChIP default), peak-flanks (when peak GC differs from genome), or differential set (AME)| Goal | Tool |
|---|---|
| Quick discovery + known + report | HOMER findMotifsGenome.pl |
| Comprehensive (de novo + central + DB + scan) | MEME-ChIP |
| Long or gapped motifs | MEME (classical, 5.4+ still works) |
| Short motifs (3-15 bp) at scale | STREME |
| Central enrichment of known motifs | CentriMo |
| Differential between two peak sets | AME |
| Binned regression (correlate with continuous variable) | monaLisa |
| Genome-wide motif scanning | FIMO (tighten p ≤ 1e-5) |
| Soft motif syntax / cooperativity | TF-MoDISco on BPNet/chromBPNet attribution (see chip-deep-learning) |
| Position-specific motifs (TF dimer arrangements) | STREME + CentriMo + ME-Aria |
-bg.Causes in order of frequency: 1. Peak quality / hyper-ChIPable contamination -> see chipseq-qc, filter blacklist + custom hyper-ChIPable 2. Too few peaks (< 500) -> motif discovery needs ≥ 500-1000 high-confidence peaks 3. Wrong sequence window -> recenter to summit ±100-250 bp 4. Wrong background -> for unusual GC composition, supply matched background explicitly 5. Broad histone mark -> motif analysis may not apply
-mask (HOMER) or pre-mask sequencesDefault --thresh 1e-4 generates millions of false positives genome-wide. Use --thresh 1e-5 for whole-genome OR restrict to peaks fimo motif.meme peaks.fa.
MEME requires sequences ≥ motif min width. Resize peaks to ≥ 200 bp.
Long sequences (> 1 kb each) at large counts exceed RAM. Resize to ±100-250 bp around summit; downsample peak count if needed.