Skip to content
peak-calling logo

Peak Calling

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.

SKILL.md

Full skill instructions

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 ${proj_dir} in Step 0.
  • Always prompt user for genome_size to use (e.g. hs or mm). Never decide by yourself.
  • 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 (filtered.bam) if available.
  • Detect sequencing type (single-end or paired-end) using SAM/​BAM flags.
  • Perform MACS3 peak calling accordingly.
  • Generate a parameter log file (${sample}_used_parameters.txt) with justification for each chosen option.

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:

  • sample: all
  • task: peak_calling
  • genome: provided by user

The tool will:

  • Create ${sample}_peak_calling directory.
  • Return the full path of the ${sample}_peak_calling directory, which will be used as ${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 (*.filtered.bam) if available.

Step 2. Detect Sequencing Type (Single-End or Paired-End)

Command Example

samtools flagstat sample.bam | egrep "properly paired|singletons"
  • If properly paired > 0 → Paired-end (-f BAMPE)
  • If singletons ≈ total → Single-end (-f BAM)

Step 3. Detect Experiment Type and Choose Peak Mode

Detected PatternExperiment TypePeak TypeParameter Key Options
TF name (CTCF, GATA1, MYC, TP53…)TF ChIP-seqNarrow--call-summits -q 0.01
Active histone marks (H3K4me3, H3K27ac, H3K9ac)Histone (sharp)Narrow--call-summits -q 0.05
Broad histone marks (H3K27me3, H3K9me3, H3K36me3)Histone (broad)Broad--broad --broad-cutoff 0.1 -q 0.05
H3K4me1IntermediateNarrow--call-summits -q 0.05 (optional --broad)
ATACATAC-seqNarrow--nomodel --shift -100 --extsize 200 -q 0.05

Step 4. Execute MACS3 with Auto Parameters

Call:

  • mcp__macs2-tools__run_macs2

with:

  • treatment_file: Path to treatment BAM file.
  • control_file: Path to control/​input BAM file. Required for ChIP-seq data. Prompt the user for the required file if not provided.
  • genome_size: Always provided by user.
  • name: Experiment name (prefix for output files).
  • out_dir: ${proj_dir}/​peaks
  • broad: If True, call broad peaks (for histone marks).
  • broad_cutoff: Cutoff for broad region calling.
  • qvalue: Q-value cutoff for peak detection. Prompt the user for the q value cutoff.
  • format: use BAMPE for pair-end data, BAM for single-end data.
  • nomodel: True for ATAC-seq, False for ChIP-seq.
  • shift: Shift size in bp (e.g., -100 for ATAC-seq).
  • extsize:"Extension size in bp (e.g., 200 for ATAC-seq).

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

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View