Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Call accessible chromatin regions from ATAC-seq data using MACS3 with ATAC-specific parameters. Use when identifying open chromatin regions from aligned ATAC-seq BAM files, different from ChIP-seq peak calling.
.claude/skills/bio-atac-seq-atac-peak-calling/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | — | — |
| case-02 | ✗→✓ | ▲ Improved | — | — |
| case-04 | ✗→✓ | ▲ Improved | — | — |
| case-12 | ✗→✓ | ▲ Improved | — | — |
| case-14 | ✗→✓ | ▲ Improved | — | — |
Reference examples tested with: Bowtie2 2.5.3+, MACS3 3.0+, samtools 1.19+
Before using code patterns, verify installed versions match. If versions differ:
<tool> --version then <tool> --help to confirm flagsIf code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.
"Call peaks from my ATAC-seq data" → Identify open chromatin regions using ATAC-specific parameters (no input control, shifted Tn5 cut sites, paired-end mode).
macs3 callpeak -t atac.bam -f BAMPE -g hs --nomodel --shift -75 --extsize 150Goal: Identify open chromatin regions from ATAC-seq data using ATAC-specific peak calling parameters.
Approach: Run MACS3 in paired-end mode with Tn5 shift correction, no model building, and duplicate retention since ATAC-seq generates natural duplicates at accessible sites.
bash# Standard ATAC-seq peak calling macs3 callpeak \ -t sample.bam \ -f BAMPE \ -g hs \ -n sample \ --outdir peaks/ \ -q 0.05 \ --nomodel \ --shift -75 \ --extsize 150 \ --keep-dup all \ -B
bash# Explained parameters macs3 callpeak \ -t sample.bam \ # Treatment BAM -f BAMPE \ # Paired-end BAM (uses fragment size) -g hs \ # Genome size: hs (human), mm (mouse) -n sample \ # Output name prefix --nomodel \ # Don't build shifting model --shift -75 \ # Shift reads to center on Tn5 cut site --extsize 150 \ # Extend reads to this size --keep-dup all \ # Keep duplicates (ATAC has natural duplicates) -B \ # Generate bedGraph for visualization --call-summits # Call peak summits
| Parameter | Reason | |-----------|--------| | --nomodel | ATAC doesn't have control, can't build model | | --shift -75 | Centers on Tn5 insertion site | | --extsize 150 | Smooths signal around cut sites | | --keep-dup all | Tn5 creates duplicate cuts at accessible sites | | -f BAMPE | Uses actual fragment size from paired-end |
bash# Paired-end (recommended for ATAC) macs3 callpeak -f BAMPE -t sample.bam ... # Single-end (less common) macs3 callpeak -f BAM -t sample.bam \ --nomodel --shift -75 --extsize 150 ...
Goal: Call peaks using only nucleosome-free fragments for sharper regulatory element detection.
Approach: Filter BAM to fragments <100 bp (NFR), then call peaks with adjusted shift/extsize parameters matching the shorter fragment size.
bash# First, filter to nucleosome-free reads (<100bp fragments) samtools view -h sample.bam | \ awk 'substr($0,1,1)=="@" || ($9>0 && $9<100) || ($9<0 && $9>-100)' | \ samtools view -b > nfr.bam # Call peaks on NFR macs3 callpeak \ -t nfr.bam \ -f BAMPE \ -g hs \ -n sample_nfr \ --nomodel \ --shift -37 \ --extsize 75 \ --keep-dup all \ -q 0.01
bash# For broader accessible regions macs3 callpeak \ -t sample.bam \ -f BAMPE \ -g hs \ -n sample_broad \ --nomodel \ --shift -75 \ --extsize 150 \ --broad \ --broad-cutoff 0.1
Goal: Call peaks on multiple ATAC-seq samples in one pass.
Approach: Loop over BAM files and run MACS3 with consistent ATAC-specific parameters for each sample.
bash#!/bin/bash GENOME=hs # hs for human, mm for mouse OUTDIR=peaks mkdir -p $OUTDIR for bam in *.bam; do sample=$(basename $bam .bam) echo "Processing $sample..." macs3 callpeak \ -t $bam \ -f BAMPE \ -g $GENOME \ -n $sample \ --outdir $OUTDIR \ --nomodel \ --shift -75 \ --extsize 150 \ --keep-dup all \ -q 0.05 \ -B \ --call-summits done
| File | Description | |------|-------------| | _peaks.narrowPeak | Peak locations (BED-like) | | _summits.bed | Peak summit positions | | _peaks.xls | Peak statistics (Excel format) | | _treat_pileup.bdg | Signal track (bedGraph) | | _control_lambda.bdg | Background (if control provided) |
chr1 100 500 peak1 500 . 10.5 50.2 45.1 200Columns: chrom, start, end, name, score, strand, signalValue, pValue, qValue, summit_offset
bash# Sort bedGraph sort -k1,1 -k2,2n sample_treat_pileup.bdg > sample.sorted.bdg # Convert to BigWig bedGraphToBigWig sample.sorted.bdg chrom.sizes sample.bw
bash# Pool BAMs before peak calling (recommended for final peaks) samtools merge -@ 8 merged.bam rep1.bam rep2.bam rep3.bam # Call peaks on merged macs3 callpeak -t merged.bam -f BAMPE -g hs -n merged ...
Goal: Identify reproducible peaks across biological replicates using the Irreproducible Discovery Rate framework.
Approach: Call peaks on each replicate independently, then run IDR to score peak reproducibility and filter to a high-confidence set.
bash# Call peaks on each replicate macs3 callpeak -t rep1.bam -f BAMPE -g hs -n rep1 ... macs3 callpeak -t rep2.bam -f BAMPE -g hs -n rep2 ... # Run IDR idr --samples rep1_peaks.narrowPeak rep2_peaks.narrowPeak \ --input-file-type narrowPeak \ --output-file idr_peaks.txt \ --plot # Filter by IDR threshold awk '$5 >= 540' idr_peaks.txt > reproducible_peaks.bed
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-16 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +27 percentage points is the difference between those two pass rates over the 22 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.