Claude-skill-registry peak-calling
Perform peak calling for ChIP-seq or ATAC-seq data using MACS3, with intelligent parameter detection from user feedback. Use it when you want to call peaks for ChIP-seq data or ATAC-seq data.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/3-peak-calling" ~/.claude/skills/majiayu000-claude-skill-registry-peak-calling && rm -rf "$T"
manifest:
skills/data/3-peak-calling/SKILL.mdsource content
Peak Calling
Overview
This skill automatically performs core peak calling with MACS2 for ChIP-seq and ATAC-seq data, based on the BAM files in the current directory. It includes automatic experiment recognition and parameter selection.
Main steps include:
- Refer to the Inputs & Outputs section to check inputs and build the output architecture. All the output file should located in
in Step 0.${proj_dir} - Always prompt user for
to use (e.g. hs or mm). Never decide by yourself.genome_size - Always prompt user if required control files are missing for ChIP-seq data.
- Always prompt user for the q value cutoff for peak calling.
- Detect experiment type (TF, histone mark, or ATAC-seq).
- Automatically decide whether to call narrow or broad peaks.
- Always use filtered BAM file (
) if available.filtered.bam - Detect sequencing type (single-end or paired-end) using SAM/BAM flags.
- Perform MACS3 peak calling accordingly.
- Generate a parameter log file (
) with justification for each chosen option.${sample}_used_parameters.txt
Inputs & Outputs
Inputs
${sample}.bam # filtered bam files
Outputs
all_peak_calling/ peaks/ ${sample}.narrowPeak # or ${sample}.broadPeak temp/ logs/ ${sample}_used_parameters.txt
Decision Tree
Step 0: Initialize Project
Call:
mcp__project-init-tools__project_init
with:
: allsample
: peak_callingtask
: provided by usergenome
The tool will:
- Create
directory.${sample}_peak_calling - Return the full path of the
directory, which will be used as${sample}_peak_calling
.${proj_dir}
Step 1. Identify and Classify BAM Files
Command Example
find . -name "*.bam" | sort
- Treatment BAMs: filenames contain TF names or histone marks (e.g.,
,CTCF
,H3K27me3
).ATAC - Control BAMs: filenames contain “input”, “control”, or “IgG”.
- Prefer filtered BAMs (
) if available.*.filtered.bam
Step 2. Detect Sequencing Type (Single-End or Paired-End)
Command Example
samtools flagstat sample.bam | egrep "properly paired|singletons"
- If
→ Paired-end (properly paired > 0
)-f BAMPE - If
→ Single-end (singletons ≈ total
)-f BAM
Step 3. Detect Experiment Type and Choose Peak Mode
| Detected Pattern | Experiment Type | Peak Type | Parameter Key Options |
|---|---|---|---|
| TF name (CTCF, GATA1, MYC, TP53…) | TF ChIP-seq | Narrow | |
| Active histone marks (H3K4me3, H3K27ac, H3K9ac) | Histone (sharp) | Narrow | |
| Broad histone marks (H3K27me3, H3K9me3, H3K36me3) | Histone (broad) | Broad | |
| H3K4me1 | Intermediate | Narrow | (optional ) |
| ATAC | ATAC-seq | Narrow | |
Step 4. Execute MACS3 with Auto Parameters
Call:
- mcp__macs2-tools__run_macs2
with:
: Path to treatment BAM file.treatment_file
: Path to control/input BAM file. Required for ChIP-seq data. Prompt the user for the required file if not provided.control_file
: Always provided by user.genome_size
: Experiment name (prefix for output files).name
: ${proj_dir}/peaksout_dir
: If True, call broad peaks (for histone marks).broad
: Cutoff for broad region calling.broad_cutoff
: Q-value cutoff for peak detection. Prompt the user for the q value cutoff.qvalue
: use BAMPE for pair-end data, BAM for single-end data.format
: True for ATAC-seq, False for ChIP-seq.nomodel
: Shift size in bp (e.g., -100 for ATAC-seq).shift
:"Extension size in bp (e.g., 200 for ATAC-seq).extsize
Step 5. Generate Parameter Log File
After auto-selection, the skill writes a log file:
Example content:
Genome detected: Experiment type: H3K27me3 (broad histone) Sequencing type: paired-end Control used: input_control.bam MACS3 mode: --broad --broad-cutoff 0.1 -q 0.05 Reasoning: - Broad mark (H3K27me3) requires domain-level detection - Control detected and applied - Genome identified as <*>; using -g <*> - Paired-end library; use -f BAMPE