macs3-peak-calling
БесплатноБез исполняемых скриптовНе проверенPoisson-model peak caller for ChIP-seq/ATAC-seq BAMs. MACS3 callpeak finds enriched regions (TF sites or histone marks) vs input/IgG; outputs BED…
от FridrichMethod★ 17 звёзд на GitHubОб этом скилле
MACS3 — ChIP-seq and ATAC-seq Peak Caller
Overview
MACS3 (Model-based Analysis of ChIP-seq) identifies regions of significant read enrichment (peaks) from ChIP-seq, ATAC-seq, CUT&RUN, and CUT&TAG experiments. It models the fragment length distribution from paired-end data or estimates it from mono-nucleosomal read shifting in single-end data, then applies a Poisson model to identify fold-enrichment over an input/IgG control. MACS3 produces BED-format narrowPeak (for transcription factors) or broadPeak (for histone marks) files with signal and q-value tracks for visualization in IGV or UCSC Genome Browser.
When to Use
- Calling transcription factor binding peaks from ChIP-seq experiments (use
--nomodel --extsize 200or let MACS3 estimate fragment length) - Identifying open chromatin regions from ATAC-seq experiments (use
--nomodel --shift -100 --extsize 200 -f BAMPE) - Calling broad histone modification peaks (H3K27me3, H3K9me3, H3K36me3) with
--broad - Generating peak signal tracks (bedGraph/bigWig) for genome browser visualization with
-B --SPMR - Performing differential binding analysis: MACS3 peaks as input to DiffBind or DESeq2
- Use HMMRATAC (part of MACS3) for nucleosome-resolution ATAC-seq peak calling
- Use SPP or HOMER as alternatives; MACS3 is the ENCODE-recommended standard
Prerequisites
- Python packages:
macs3(Python ≥ 3.8) - Input: Sorted BAM files (with index) from ChIP-seq or ATAC-seq alignment (e.g., using STAR or Bowtie2)
- Optional: Input/IgG control BAM for background normalization
Check before installing: The tool may already be available in the current environment (e.g., inside a
pixi/condaenv). Runcommand -v macs3first and skip the install commands below if it returns a path. When running inside a pixi project, invoke the tool viapixi run macs3rather than baremacs3.
# Install with pip or conda
pip install macs3
# or
conda install -c bioconda macs3
# Verify
macs3 --version
# macs3 3.0.2
Pre-flight Interview
Settle these with the user before writing any analysis code.
decisions:
- id: D1
param: assayType
kind: required
source: user
ask: "What produced these reads - a transcription-factor ChIP, a histone mark, or open-chromatin (ATAC)?"
default: null
- id: D2
param: controlSample
kind: required
source: data
ask: "Is there a matched input or IgG control for this sample?"
default: "none - background is estimated locally instead"
- id: D3
param: effectiveGenomeSize
kind: derived
source: upstream
ask: "Which genome were the reads aligned to?"
default: "carried from the alignment reference"
- id: D4
param: peakShape
kind: optional
source: user
depends_on: [D1]
ask: "Are the enriched regions sharp summits or broad domains?"
default: "narrow for TF and ATAC; broad for spreading histone marks"
- id: D5
param: significanceThreshold
kind: required
source: user
ask: "How strong must enrichment be before a region is called a peak?"
default: "q-value 0.05"
- id: D6
param: fragmentModel
kind: optional
source: user
depends_on: [D1]
ask: "Should fragment length be modelled from the data, or fixed because the assay's signal is not paired summits?"
default: "model for ChIP; fixed shift/extension for ATAC"
- id: D7
param: duplicateHandling
kind: optional
source: user
depends_on: [D1]
ask: "Are identical read positions PCR duplicates, or real independent insertions?"
default: "one per position for ChIP; keep all for ATAC"
- id: D8
param: signalTracks
kind: optional
source: user
ask: "Emit normalized coverage tracks alongside the peak calls?"
default: "peaks only"
D1 is asked first because four later settings follow from it. ATAC in particular inverts three ChIP defaults at once - no fragment model, a negative shift, and duplicates kept - so running ATAC through ChIP defaults produces peaks that look plausible and are wrong.
Quick Start
# Call peaks for TF ChIP-seq (narrow peaks, with input control)
macs3 callpeak \
-t chip.bam \
-c input.bam \
-f BAM \
-g hs \
-n sample_tf \
--outdir peaks/ \
-q 0.05
# Output: peaks/sample_tf_peaks.narrowPeak
wc -l peaks/sample_tf_peaks.narrowPeak
Workflow
Step 1: Prepare Input BAM Files
MACS3 requires sorted, indexed BAM files from genome alignment.
# Sort and index ChIP and control BAMs (if not already done)
samtools sort -@ 8 chip_raw.bam -o chip.bam
samtools sort -@ 8 input_raw.bam -o input.bam
samtools index chip.bam
samtools index input.bam
# Check read counts
echo "ChIP reads: $(samtools view -c -F 4 chip.bam)"
echo "Input reads: $(samtools view -c -F 4 input.bam)"
Step 2: Call Narrow Peaks (TF ChIP-seq)
Use the default mode for transcription factor binding site identification.
# TF C
Установить macs3-peak-calling в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл macs3-peak-calling?
Poisson-model peak caller for ChIP-seq/ATAC-seq BAMs. MACS3 callpeak finds enriched regions (TF sites or histone marks) vs input/IgG; outputs BED narrowPeak/broadPeak for motif analysis, annotation, and differential binding. Use narrow peaks for TF ChIP-seq and ATAC-seq; broad for H3K27me3, H3K9me3, and other broad marks.
Как установить скилл macs3-peak-calling?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл macs3-peak-calling запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic