[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EBGSS08GD0DPCH424N5FE3":3,"skill-same:01M7EBGSS08GD0DPCH424N5FE3":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":14,"repositoryHtmlUrl":33,"repositoryHomepageUrl":33,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":49},"01M7EBGSS08GD0DPCH424N5FE3","bio-atac-seq-atac-peak-calling",null,"Call accessible chromatin regions from ATAC-seq BAM files using MACS3, MACS2, Genrich, or HMMRATAC. Use when identifying open chromatin from aligned ATAC-seq, choosing between point-source vs HMM peak callers, applying ENCODE-style pseudoreplicate IDR, removing blacklist regions, or fixing 501bp consensus peaks for downstream differential analysis.","Mr-Nobody-Anonymous\u002FAll-skills","Mr-Nobody-Anonymous","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F184253119?v=4","01M7AEXFJHKTYQW5R0ZCQQTWFV","anonymous","01M7C00M3GQR4QKP9GZA42GFAK",0,"MIT","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-atac-seq-atac-peak-calling\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bio-atac-seq-atac-peak-calling\ndescription: Call accessible chromatin regions from ATAC-seq BAM files using MACS3, MACS2, Genrich, or HMMRATAC. Use when identifying open chromatin from aligned ATAC-seq, choosing between point-source vs HMM peak callers, applying ENCODE-style pseudoreplicate IDR, removing blacklist regions, or fixing 501bp consensus peaks for downstream differential analysis.\ntool_type: cli\nprimary_tool: macs3\nsource: \"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills\"\nsource_repository: \"GPTomics\u002FbioSkills\"\nsource_path: \"atac-seq\u002Fatac-peak-calling\u002FSKILL.md\"\nlicense: \"MIT\"\nimported_at: \"2026-09-20\"\n---\n\n## Version Compatibility\n\nReference examples tested with: MACS3 3.0.2+, MACS2 2.2.9+, Genrich 0.6.1+, HMMRATAC 1.2+ (now bundled in MACS3 as `macs3 hmmratac`), samtools 1.19+, bedtools 2.31+, IDR 2.0.4+.\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- CLI: `\u003Ctool> --version` then `\u003Ctool> --help` to confirm flags\n\nIf code throws unexpected errors, introspect the installed binary (`\u003Ctool> -h`) and adapt the example to match the actual CLI rather than retrying.\n\n# ATAC-seq Peak Calling\n\n**\"Call accessible regions from my ATAC-seq BAM\"** -> Identify Tn5-hypersensitive open chromatin, treating fragments as point insertion events (not protein-bound regions as in ChIP-seq) and accounting for the lack of input control.\n\n- CLI (canonical, ENCODE 4): `macs2 callpeak -t atac.bam -f BAM -g hs -n sample --nomodel --shift -75 --extsize 150 --keep-dup all -B --SPMR -p 0.01` (use `-f BAM`, not `-f BAMPE` -- BAMPE reads true fragment ends and ignores `--shift`\u002F`--extsize`)\n- CLI (HMM-based, single sample): `macs3 hmmratac -i atac.bam -n sample --outdir hmm_out`\n- CLI (joint replicates): `Genrich -j -t rep1.bam,rep2.bam -o peaks.narrowPeak -e chrM -E blacklist.bed`\n\nThe `-p 0.01` (loose) plus IDR is the ENCODE pattern: low stringency increases peak overlap between replicates, and IDR rescues the reproducible set. Single-sample workflows usually swap to `-q 0.05` instead.\n\n## Algorithmic Taxonomy\n\n| Tool | Model | Treats fragments as | Min reps | Strength | Fails when |\n|------|-------|---------------------|----------|----------|------------|\n| MACS3\u002FMACS2 | Local Poisson lambda + FDR | Point-source insertions (+\u002F- shift) | 1 | Mature, ENCODE-default, fast, narrow + broad modes | Confounds NFR with broad accessible domains; no input means lambda from local genome only |\n| Genrich (ATAC mode -j) | q-value on log-transformed p-value, joint replicate model | Whole fragments (paired-end intervals) | 1 (multi-rep optional) | Treats reps jointly; can exclude chrM via `-e chrM`; auto blacklist via `-E`; PCR-dup removal via `-r` | Less peer-reviewed than MACS; thin literature; slow on deep libraries |\n| MACS3 hmmratac (was HMMRATAC) | 3-state HMM (open \u002F nucleosomal \u002F background) on fragment-size signal | Fragment-size classes | 1 | Models nucleosome periodicity directly; differentiates NFR and flanking nucleosomes | Needs >= 30M de-duplicated nuclear reads; memory-hungry; slow; flat fragment distribution -> garbage HMM |\n| HOMER `findPeaks -style dnase` | Fixed window + fold-change cutoff | Tag positions | 1 | Convenient for downstream HOMER motif analysis | Less calibrated p-values than MACS; window-size sensitive |\n| nf-core\u002Fatacseq | Wrapper (MACS2 by default) | Same as MACS2 | 1 | Reproducible Nextflow pipeline with QC built in | Only as good as the underlying caller |\n\nMethodology evolves; verify the current ENCODE ATAC-seq Standards (encodeproject.org pipelines\u002Fatac-seq) before locking parameters. ENCODE 4 still defaults to MACS2 (not MACS3) at time of writing; `macs3 callpeak` is API-compatible for ATAC parameters but not yet the official ENCODE binary.\n\n## Shift-Extend vs BAMPE: The Critical Choice\n\nTwo valid ways to feed paired-end ATAC into MACS:\n\n**Pattern A (ENCODE \u002F \"single-end-ified\"):** `-f BAMPE` actually IGNORES `--shift\u002F--extsize`. To activate them, use `-f BAM` and treat each end independently. ENCODE's pipeline uses `-f BAM --shift -75 --extsize 150` to model each Tn5 cut as a 150 bp window centered on the insertion site, ignoring fragment lengths.\n\n**Pattern B (paired-fragment):** `-f BAMPE` uses the full paired-end fragment span as the signal interval. Best when fragment lengths are biologically meaningful (e.g., NFR-only peak calling at 38\u002F75 bp). In BAMPE mode, do NOT set `--shift\u002F--extsize` (silently ignored, but confusing).\n\nFor most bulk ATAC, Pattern A matches ENCODE convention and is reproducible against published peak sets. Pattern B can be more sensitive at narrow regulatory elements but does not match ENCODE outputs.\n\n## Effective Genome Size\n\n`-g hs` and `-g mm` are MACS shorthands for old defaults. Modern values:\n\n| Genome | MACS shorthand | Actual mappable size | Source |\n|--------|---------------|----------------------|--------|\n| hg38 | `-g hs` (2.7e9) | 2.701e9 (50bp), 2.748e9 (75bp), 2.806e9 (100bp), 2.862e9 (150bp) | deepTools `effectiveGenomeSize` |\n| hg19 | `-g hs` (2.7e9) | 2.686e9 (50bp), 2.777e9 (100bp) | deepTools |\n| mm10 | `-g mm` (1.87e9) | 2.308e9 (50bp), 2.408e9 (75bp), 2.467e9 (100bp) | deepTools |\n| mm39 | none | 2.310e9 (50bp), 2.468e9 (100bp) | deepTools |\n\nWrong size shifts every q-value but rarely changes peak ranks. Use `unique-kmers.py` (khmer) or the deepTools tabulated values for exact sizes; the shorthand is a decade-old approximation.\n\n## Effective Genome Size: When It Matters\n\n**Trigger:** Comparing peaks across genome builds or species; reproducing published q-value cutoffs; hi-resolution lambda estimation.\n\n**Mechanism:** MACS estimates genome-wide lambda as `total_reads \u002F effective_size`. Wrong size -> wrong null -> shifted q-values, especially at the marginal cutoff.\n\n**Symptom:** Peak counts diverge ~10-20% from published numbers when re-running an old dataset.\n\n**Fix:** Pull the read-length-matched value from deepTools `effectiveGenomeSize` table. For pipelines, parameterize this; never inline the shorthand for cross-study comparisons.\n\n## Per-Tool Failure Modes\n\n### MACS2\u002FMACS3 -- Confounded NFR + broad accessibility\n\n**Trigger:** Cell type with extended open domains (e.g., active super-enhancers, MYOD1 regulons, locus-control regions).\n\n**Mechanism:** Default narrow-peak mode segments wide accessible domains into multiple smaller peaks at local lambda spikes; `--broad --broad-cutoff 0.1` merges them but inflates total length and breaks IDR comparability.\n\n**Symptom:** Peak count >> 200k for human bulk ATAC at ENCODE depth; mean peak width \u003C 200 bp; visual inspection in IGV shows 3-5 calls under one continuous accessibility block.\n\n**Fix:** Run both narrow and broad; use narrow for differential analysis, broad for domain-level enrichment (e.g., super-enhancer overlap). Do NOT use `--call-summits` for broad mode.\n\n### Genrich -- Replicate weighting and chrM exclusion\n\n**Trigger:** Replicates with very different library sizes; high-mitochondrial samples not pre-filtered.\n\n**Mechanism:** Genrich's joint mode combines the per-replicate p-values at each position via Fisher's method. Library-size imbalance dominates the joint p-value; chrM reads inflate background unless `-e chrM` is set.\n\n**Symptom:** Most-significant peaks cluster on chrM or on the largest-library replicate's high-coverage regions.\n\n**Fix:** Always pass `-e chrM` (Genrich 0.6+) and `-E blacklist.bed`. Down-sample BAMs to common depth (`samtools view -s`) before joint calling if libraries differ >2x. Add `-r` to remove PCR duplicates inside Genrich, OR pre-deduplicate (do not do both).\n\n### MACS3 hmmratac (HMMRATAC) -- Depth and fragment-size dependence\n\n**Trigger:** Library \u003C 25M nuclear reads, or libraries with degraded chromatin and flat fragment-size distribution.\n\n**Mechanism:** The 3-state HMM is trained from fragment-size classes (NFR ~50 bp, mono ~200 bp, di ~400 bp peaks). Without periodicity the emission distributions collapse and the HMM cannot separate states.\n\n**Symptom:** Output BED is empty, or all peaks are tiny (~150 bp) with no nucleosome flanks called; runtime explodes (>24h) on shallow data.\n\n**Fix:** Verify fragment-size periodicity in QC first (atac-qc skill). If flat, fall back to MACS3 callpeak. HMMRATAC needs deep coverage (a practical minimum around 30M deduplicated nuclear reads).\n\n### HOMER findPeaks -- Window-size sensitivity\n\n**Trigger:** Default `-style dnase` uses 75 bp peaks; ATAC peaks are 250-500 bp typically.\n\n**Mechanism:** HOMER's window-based caller does not auto-fit width to ATAC.\n\n**Fix:** Use `-style factor -size 150` for narrow ATAC peaks, or skip HOMER for peak calling and use it only for downstream motif analysis on MACS peaks.\n\n### Aligner choice -- chromap vs bwa-mem2 vs bowtie2 affects peak shape\n\n**Trigger:** Switching aligners between datasets and expecting reproducible peaks.\n\n**Mechanism:** chromap (Zhang 2021) applies its own ATAC-specific 4 bp \u002F -5 bp Tn5 shift before fragment output; bwa-mem2 and bowtie2 do not. Downstream `--shift -75 --extsize 150` parameters are calibrated for unshifted bwa\u002Fbowtie BAMs; applying them to chromap output double-shifts the signal.\n\n**Symptom:** Peaks called from chromap output are shifted by ~5-10 bp relative to bwa output at the same locus.\n\n**Fix:** When using chromap, drop `--shift` and `--extsize` (chromap's pre-shift is sufficient) OR omit chromap's `--Tn5-shift` (the shift is opt-in, applied only when that flag or an ATAC preset is set) so it is not double-applied, then proceed with standard MACS parameters. Document the aligner version and any shift choices in methods. Within a project, pin the aligner.\n\n### Single-sample (no replicate) -- Rotation \u002F circular-shift permutation\n\n**Trigger:** Single biological sample without any replicate for IDR.\n\n**Mechanism:** IDR requires two replicates by construction. For n=1, statistical confidence per peak comes from local background (Poisson p-value) but reproducibility cannot be assessed.\n\n**Fix:** Apply a stricter `-q 0.01` (vs ENCODE `-p 0.01` + IDR pattern) and additionally apply rotation\u002Fcircular-shift permutation: shift the BAM cuts by a random distance modulo each chromosome and re-call peaks; the per-peak persistence rate across rotations is a non-parametric reproducibility proxy. Document this is a single-sample heuristic, not ENCODE-compliant.\n\n## ENCODE 3 vs ENCODE 4 Differences\n\n| Feature | ENCODE 3 (legacy) | ENCODE 4 (current) |\n|---------|-------------------|---------------------|\n| Per-rep significance threshold | `-q 0.05` directly | `-p 0.01` (loose) + IDR |\n| Pseudoreplicate IDR cutoff | Not formalized | `--idr-threshold 0.10` self-consistency |\n| TSS enrichment threshold | >= 6 (older) | >= 7 (hg38, GENCODE v29) |\n| Mt fraction expectation | \u003C 25% | \u003C 20% (Omni-ATAC \u003C 5%) |\n| Blacklist | v1 | v2 (Amemiya 2019) |\n| Default genome size | hardcoded `hs`\u002F`mm` | encouraged: deepTools effectiveGenomeSize |\n\nTo reproduce a published ENCODE 3 dataset, pin the original pipeline and threshold exactly. ENCODE 4 results are not directly numerically comparable to ENCODE 3 even on the same input BAM.\n\n## Super-Enhancer Detection\n\nFor active super-enhancer (SE) annotation alongside narrow-peak workflow, ROSE (Whyte 2013) and LILY (Boeva 2017) stitch ATAC or H3K27ac peaks separated by \u003C 12.5 kb and rank by signal:\n\n```bash\n# ROSE expects H3K27ac BAM but works on ATAC narrowPeak with care\nROSE_main.py -g hg38 -i atac_peaks.gff -r atac.bam -o rose_out\u002F -t 2500\n```\n\nROSE-style stitching is complementary to MACS3 narrow peaks: narrow peaks for differential analysis; SE annotation for biology interpretation. SE calls require H3K27ac input for definitive annotation; ATAC alone produces \"stretch enhancers\" that overlap but are not identical to H3K27ac SE.\n\n## ENCODE 4 ATAC-seq Pipeline (Reference Implementation)\n\nThe exact ENCODE pattern produces the most-comparable peak sets:\n\n```bash\n# Per-replicate peak calling (loose threshold)\nmacs2 callpeak \\\n    -t rep1.filt.dedup.bam \\\n    -f BAM -g hs \\\n    -n rep1 --outdir peaks\u002Frep1\u002F \\\n    --nomodel --shift -75 --extsize 150 \\\n    --keep-dup all \\\n    -B --SPMR \\\n    -p 0.01\n\n# Pooled (all replicates)\nmacs2 callpeak \\\n    -t rep1.filt.dedup.bam rep2.filt.dedup.bam \\\n    -f BAM -g hs -n pooled --outdir peaks\u002Fpooled\u002F \\\n    --nomodel --shift -75 --extsize 150 --keep-dup all -B --SPMR -p 0.01\n\n# Pseudoreplicates (two independent 50% subsamples; approximate, not a disjoint partition)\nsamtools view -b -h -s 1.5 rep1.filt.dedup.bam > rep1.psr1.bam   # seed.fraction\nsamtools view -b -h -s 2.5 rep1.filt.dedup.bam > rep1.psr2.bam   # different seed\n# (call peaks on each pseudoreplicate the same way)\n```\n\n`--SPMR` writes signal as Signal Per Million Reads (normalized bedGraph). `-p 0.01` is intentionally loose; IDR will tighten to a reproducible set.\n\n## IDR for Reproducible Peaks\n\n**Goal:** Find peaks reproducible across biological replicates at controlled IDR.\n\n**Approach:** Score paired peak lists by signalValue, fit IDR's two-component mixture (reproducible + noise), threshold at IDR \u003C= 0.05 (true reps) or 0.10 (pseudoreplicates).\n\n```bash\n# Sort peaks by p-value (column 8) so IDR scores by significance\nsort -k8,8nr rep1_peaks.narrowPeak > rep1.sorted.narrowPeak\nsort -k8,8nr rep2_peaks.narrowPeak > rep2.sorted.narrowPeak\n\n# True replicates -- threshold IDR \u003C= 0.05\nidr --samples rep1.sorted.narrowPeak rep2.sorted.narrowPeak \\\n    --input-file-type narrowPeak --rank p.value \\\n    --output-file true_reps.idr \\\n    --idr-threshold 0.05 --plot --log-output-file idr.log\n\n# Pseudoreplicates -- threshold IDR \u003C= 0.10 (looser, ENCODE Nself \u003C= 2 rule)\nidr --samples psr1_peaks.narrowPeak psr2_peaks.narrowPeak \\\n    --input-file-type narrowPeak --rank p.value \\\n    --output-file psr.idr --idr-threshold 0.10 --plot\n```\n\n**ENCODE consistency rules:** Nt = peaks passing IDR on true reps; Nself = peaks passing IDR on pseudoreps. Library passes if `max(Nt, Nself) \u002F min(Nt, Nself) \u003C= 2`. If both ratios > 2, the library is rejected.\n\n**IDR fails when:** Ranking column choice matters. `--rank p.value` (column 8) is robust; `--rank signal.value` (column 7) breaks if MACS pile-up scaling differs between replicates.\n\n## Decision Tree by Experimental Scenario\n\n| Scenario | Recommended caller | Why |\n|----------|-------------------|-----|\n| Bulk ATAC, 2-3 reps, depth >= 25M | MACS2 ENCODE pipeline + IDR | Reproducible, comparable to published peaksets |\n| Bulk ATAC, 1 sample (no rep) | MACS3 callpeak with `-q 0.05`; do not run IDR | IDR is meaningless without reps; tighter q-value substitutes |\n| Bulk ATAC, depth >= 30M, want NFR + flanking nuc structure | MACS3 hmmratac | HMM separates NFR from nucleosome flanks |\n| Multi-replicate joint analysis where rep weighting is symmetric | Genrich `-j` ATAC mode | Joint p-value across reps; built-in chrM and blacklist |\n| Cell type with broad super-enhancer accessibility | MACS3 `--broad --broad-cutoff 0.1` for SE; narrow for differential | Domain-level inference vs site-level |\n| FFPE \u002F degraded chromatin (flat fragment dist) | MACS3 callpeak with stringent `-q 0.01`; never HMMRATAC | HMM needs fragment periodicity |\n| scATAC pseudobulk per cluster | MACS3 callpeak per cluster + iterative overlap | See atac-seq\u002Fsingle-cell-atac |\n| Want fixed-width consensus peaks for differential | Call broadly, then re-center to summits +\u002F- 250 bp | See atac-seq\u002Fconsensus-peakset |\n| Plant \u002F non-model organism | MACS3 with `-g \u003Ceffective_size>`; verify size empirically | Default `-g hs\u002Fmm` invalid; compute via khmer |\n\n## Reconciliation: When Callers Disagree\n\n| Pattern | Likely cause | Action |\n|---------|--------------|--------|\n| MACS narrow peaks much fewer than Genrich | Genrich q-cutoff different default (`-q 0.05` log-scale, MACS `-q 0.05` linear) | Re-run with `-q 0.01` (Genrich) for parity |\n| HMMRATAC misses peaks MACS finds | Library too shallow OR fragment-size periodicity weak | Trust MACS; HMMRATAC is depth-sensitive |\n| HMMRATAC calls peaks MACS misses | HMM is sensitive to mid-strength accessibility flanked by phased nucleosomes | Inspect; often genuine but unconfirmed by short-fragment signal |\n| Same peak called by all but width 2x different | Broad mode vs narrow mode mismatch | Standardize: re-center to summit +\u002F- 250 bp for differential |\n| Per-rep MACS calls peak; pooled MACS does not | One rep dominates; lambda smoothes it out in pooled | Trust pooled + IDR over per-rep counts |\n\n**Operational rule for high-confidence reporting:** Require a peak to pass IDR \u003C= 0.05 on true replicates AND survive blacklist\u002Fgreylist filtering AND have mean signalValue >= 5 across reps. Two callers from different families (MACS + Genrich) agreeing within 250 bp is acceptable evidence when IDR is unavailable.\n\n## Blacklist and Greylist\n\n```bash\n# ENCODE blacklist (Amemiya 2019) -- always remove\nwget https:\u002F\u002Fgithub.com\u002FBoyle-Lab\u002FBlacklist\u002Fraw\u002Fmaster\u002Flists\u002Fhg38-blacklist.v2.bed.gz\ngunzip hg38-blacklist.v2.bed.gz\nbedtools intersect -v -a peaks.narrowPeak -b hg38-blacklist.v2.bed > peaks.no_blacklist.narrowPeak\n\n# Sample-specific greylist (input-derived high-signal regions; rarely available for ATAC)\n# For ATAC, ENCODE recommends pooling all samples' top-percentile signal and removing\n# regions exceeding 100x median coverage as a \"soft greylist\"\n```\n\nBlacklist is mandatory; greylist is optional and most useful when the same library prep produces consistent artifact regions across samples.\n\n## NFR-Only Peak Calling\n\n**Goal:** Call peaks using only sub-nucleosomal fragments (\u003C100 bp) for sharper TF-binding-relevant accessibility.\n\n**Approach:** Pre-filter BAM to short fragments, then call peaks with parameters scaled to the smaller fragment length.\n\n```bash\nsamtools view -h sample.dedup.bam | \\\n    awk 'substr($0,1,1)==\"@\" || ($9 > 0 && $9 \u003C 100) || ($9 \u003C 0 && $9 > -100)' | \\\n    samtools view -b > nfr.bam\nsamtools index nfr.bam\n\nmacs2 callpeak -t nfr.bam -f BAM -g hs -n sample_nfr \\\n    --nomodel --shift -37 --extsize 75 \\\n    --keep-dup all -p 0.01\n```\n\n`--shift -37 --extsize 75` halves both parameters to match shorter fragments; this is a fragment-scaled convention for NFR-focused input, not a TOBIAS-specified setting (TOBIAS instead applies the +4\u002F-5 Tn5 correction to the full BAM via ATACorrect).\n\n## Output Files (narrowPeak)\n\n| Column | Field | Notes |\n|--------|-------|-------|\n| 1-3 | chrom, start, end | 0-based, half-open |\n| 4 | name | MACS auto-numbers |\n| 5 | score | Min(int(-10*log10(qvalue)), 1000) |\n| 6 | strand | `.` for ATAC |\n| 7 | signalValue | Fold enrichment over local lambda |\n| 8 | pValue | -log10 p |\n| 9 | qValue | -log10 q (BH-FDR) |\n| 10 | summit_offset | Peak summit relative to start |\n\nConvert to bigWig for browsers: `sort -k1,1 -k2,2n sample_treat_pileup.bdg > sample.sorted.bdg && bedGraphToBigWig sample.sorted.bdg chrom.sizes sample.bw` (bedGraphToBigWig is multi-pass and cannot read from a pipe\u002Fstdin, so sort to a file first).\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|-----------------|-------|----------|\n| `--shift\u002F--extsize ignored` warning | Used `-f BAMPE` with these flags | Switch to `-f BAM` or remove the flags |\n| 0 peaks called | Forgot `--nomodel`; MACS tries to build a shifting model and fails | Add `--nomodel --shift -75 --extsize 150` |\n| Peak count >> 500k | Did not deduplicate; or did not remove chrM; or `-q` too loose | Pre-filter (samtools view -F 1804 -q 30; samtools idxstats); use `-q 0.01` |\n| `Sequence chrM not found` (Genrich) | Wrong chromosome name in `-e` flag (chrM vs MT) | Match BAM header naming convention |\n| HMMRATAC out of memory | Deep library \u002F large genome; the current tool is `macs3 hmmratac` (Python, not Java) | Increase available RAM and use a scratch `--outdir`; the `-Xmx`\u002F`HMMRATAC.jar` heap flags apply only to the deprecated standalone Java HMMRATAC |\n| Peaks shifted by 75 bp from expected positions | Forgot `--shift -75` (cuts at one end of read) | Add the shift; positions are now centered on Tn5 cut site |\n| IDR returns 0 reproducible peaks | Sorted by wrong column; ranks are random | Sort each peakset by `-k8,8nr` (p-value descending) |\n\n## References\n\n- Buenrostro JD et al 2013 Nat Methods 10:1213 (ATAC-seq protocol)\n- Corces MR et al 2017 Nat Methods 14:959 (Omni-ATAC protocol)\n- Corces MR et al 2018 Science 362:eaav1898 (iterative-overlap fixed-width 501 bp consensus peaks)\n- Tarbell ED & Liu T 2019 Nucleic Acids Res 47:e91 (HMMRATAC)\n- Gaspar JM, Genrich: detecting sites of genomic enrichment (github.com\u002Fjsh58\u002FGenrich; no published paper)\n- Li Q et al 2011 Ann Appl Stat 5:1752 (IDR framework)\n- Landt SG et al 2012 Genome Res 22:1813 (ENCODE\u002FmodENCODE peak calling guidelines, IDR Nself rule)\n- Amemiya HM et al 2019 Sci Rep 9:9354 (ENCODE blacklist v2)\n- ENCODE ATAC-seq Standards (encodeproject.org\u002Fatac-seq) -- canonical pipeline parameters\n\n## Related Skills\n\n- atac-seq\u002Fatac-qc - Verify TSS enrichment, FRiP, and fragment periodicity before calling\n- atac-seq\u002Fconsensus-peakset - Combine per-sample peaks into a fixed-width differential-ready set\n- atac-seq\u002Fsingle-cell-atac - Pseudobulk peak calling per cluster\n- atac-seq\u002Fdifferential-accessibility - Downstream DiffBind\u002Fcsaw\u002FDESeq2 testing\n- atac-seq\u002Fdeep-learning-atac - chromBPNet bias-corrected per-base profiles as alternative input\n- read-alignment\u002Fbowtie2-alignment - Upstream ATAC alignment\n- alignment-files\u002Fduplicate-handling - Pre-call dedup with Picard MarkDuplicates\n- chip-seq\u002Fpeak-calling - ChIP-seq comparison (uses input control)\n- chip-seq\u002Fsuper-enhancers - ROSE \u002F LILY for super-enhancer annotation\n- genome-intervals\u002Fbed-file-basics - Peak file manipulation\n","## Version Compatibility\n\nReference examples tested with: MACS3 3.0.2+, MACS2 2.2.9+, Genrich 0.6.1+, HMMRATAC 1.2+ (now bundled in MACS3 as `macs3 hmmratac`), samtools 1.19+, bedtools 2.31+, IDR 2.0.4+.\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- CLI: `\u003Ctool> --version` then `\u003Ctool> --help` to confirm flags\n\nIf code throws unexpected errors, introspect the installed binary (`\u003Ctool> -h`) and adapt the example to match the actual CLI rather than retrying.\n\n# ATAC-seq Peak Calling\n\n**\"Call accessible regions from my ATAC-seq BAM\"** -> Identify Tn5-hypersensitive open chromatin, treating fragments as point insertion events (not protein-bound regions as in ChIP-seq) and accounting for the lack of input control.\n\n- CLI (canonical, ENCODE 4): `macs2 callpeak -t atac.bam -f BAM -g hs -n sample --nomodel --shift -75 --extsize 150 --keep-dup all -B --SPMR -p 0.01` (use `-f BAM`, not `-f BAMPE` -- BAMPE reads true fragment ends and ignores `--shift`\u002F`--extsize`)\n- CLI (HMM-based, single sample): `macs3 hmmratac -i atac.bam -n sample --outdir hmm_out`\n- CLI (joint replicates): `Genrich -j -t rep1.bam,rep2.bam -o peaks.narrowPeak -e chrM -E blacklist.bed`\n\nThe `-p 0.01` (loose) plus IDR is the ENCODE pattern: low stringency increases peak overlap between replicates, and IDR rescues the reproducible set. Single-sample workflows usually swap to `-q 0.05` instead.\n\n## Algorithmic Taxonomy\n\n| Tool | Model | Treats fragments as | Min reps | Strength | Fails when |\n|------|-------|---------------------|----------|----------|------------|\n| MACS3\u002FMACS2 | Local Poisson lambda + FDR | Point-source insertions (+\u002F- shift) | 1 | Mature, ENCODE-default, fast, narrow + broad modes | Confounds NFR with broad accessible domains; no input means lambda from local genome only |\n| Genrich (ATAC mode -j) | q-value on log-transformed p-value, joint replicate model | Whole fragments (paired-end intervals) | 1 (multi-rep optional) | Treats reps jointly; can exclude chrM via `-e chrM`; auto blacklist via `-E`; PCR-dup removal via `-r` | Less peer-reviewed than MACS; thin literature; slow on deep libraries |\n| MACS3 hmmratac (was HMMRATAC) | 3-state HMM (open \u002F nucleosomal \u002F background) on fragment-size signal | Fragment-size classes | 1 | Models nucleosome periodicity directly; differentiates NFR and flanking nucleosomes | Needs >= 30M de-duplicated nuclear reads; memory-hungry; slow; flat fragment distribution -> garbage HMM |\n| HOMER `findPeaks -style dnase` | Fixed window + fold-change cutoff | Tag positions | 1 | Convenient for downstream HOMER motif analysis | Less calibrated p-values than MACS; window-size sensitive |\n| nf-core\u002Fatacseq | Wrapper (MACS2 by default) | Same as MACS2 | 1 | Reproducible Nextflow pipeline with QC built in | Only as good as the underlying caller |\n\nMethodology evolves; verify the current ENCODE ATAC-seq Standards (encodeproject.org pipelines\u002Fatac-seq) before locking parameters. ENCODE 4 still defaults to MACS2 (not MACS3) at time of writing; `macs3 callpeak` is API-compatible for ATAC parameters but not yet the official ENCODE binary.\n\n## Shift-Extend vs BAMPE: The Critical Choice\n\nTwo valid ways to feed paired-end ATAC into MACS:\n\n**Pattern A (ENCODE \u002F \"single-end-ified\"):** `-f BAMPE` actually IGNORES `--shift\u002F--extsize`. To activate them, use `-f BAM` and treat each end independently. ENCODE's pipeline uses `-f BAM --shift -75 --extsize 150` to model each Tn5 cut as a 150 bp window centered on the insertion site, ignoring fragment lengths.\n\n**Pattern B (paired-fragment):** `-f BAMPE` uses the full paired-end fragment span as the signal interval. Best when fragment lengths are biologically meaningful (e.g., NFR-only peak calling at 38\u002F75 bp). In BAMPE mode, do NOT set `--shift\u002F--extsize` (silently ignored, but confusing).\n\nFor most bulk ATAC, Pattern A matches ENCODE convention and is reproducible against published peak sets. Pattern B can be more sensitive at narrow regulatory elements but does not match ENCODE outputs.\n\n## Effective Genome Size\n\n`-g hs` and `-g mm` are MACS shorthands for old defaults. Modern values:\n\n| Genome | MACS shorthand | Actual mappable size | Source |\n|--------|---------------|----------------------|--------|\n| hg38 | `-g hs` (2.7e9) | 2.701e9 (50bp), 2.748e9 (75bp), 2.806e9 (100bp), 2.862e9 (150bp) | deepTools `effectiveGenomeSize` |\n| hg19 | `-g hs` (2.7e9) | 2.686e9 (50bp), 2.777e9 (100bp) | deepTools |\n| mm10 | `-g mm` (1.87e9) | 2.308e9 (50bp), 2.408e9 (75bp), 2.467e9 (100bp) | deepTools |\n| mm39 | none | 2.310e9 (50bp), 2.468e9 (100bp) | deepTools |\n\nWrong size shifts every q-value but rarely changes peak ranks. Use `unique-kmers.py` (khmer) or the deepTools tabulated values for exact sizes; the shorthand is a decade-old approximation.\n\n## Effective Genome Size: When It Matters\n\n**Trigger:** Comparing peaks across genome builds or species; reproducing published q-value cutoffs; hi-resolution lambda estimation.\n\n**Mechanism:** MACS estimates genome-wide lambda as `total_reads \u002F effective_size`. Wrong size -> wrong null -> shifted q-values, especially at the marginal cutoff.\n\n**Symptom:** Peak counts diverge ~10-20% from published numbers when re-running an old dataset.\n\n**Fix:** Pull the read-length-matched value from deepTools `effectiveGenomeSize` table. For pipelines, parameterize this; never inline the shorthand for cross-study comparisons.\n\n## Per-Tool Failure Modes\n\n### MACS2\u002FMACS3 -- Confounded NFR + broad accessibility\n\n**Trigger:** Cell type with extended open domains (e.g., active super-enhancers, MYOD1 regulons, locus-control regions).\n\n**Mechanism:** Default narrow-peak mode segments wide accessible domains into multiple smaller peaks at local lambda spikes; `--broad --broad-cutoff 0.1` merges them but inflates total length and breaks IDR comparability.\n\n**Symptom:** Peak count >> 200k for human bulk ATAC at ENCODE depth; mean peak width \u003C 200 bp; visual inspection in IGV shows 3-5 calls under one continuous accessibility block.\n\n**Fix:** Run both narrow and broad; use narrow for differential analysis, broad for domain-level enrichment (e.g., super-enhancer overlap). Do NOT use `--call-summits` for broad mode.\n\n### Genrich -- Replicate weighting and chrM exclusion\n\n**Trigger:** Replicates with very different library sizes; high-mitochondrial samples not pre-filtered.\n\n**Mechanism:** Genrich's joint mode combines the per-replicate p-values at each position via Fisher's method. Library-size imbalance dominates the joint p-value; chrM reads inflate background unless `-e chrM` is set.\n\n**Symptom:** Most-significant peaks cluster on chrM or on the largest-library replicate's high-coverage regions.\n\n**Fix:** Always pass `-e chrM` (Genrich 0.6+) and `-E blacklist.bed`. Down-sample BAMs to common depth (`samtools view -s`) before joint calling if libraries differ >2x. Add `-r` to remove PCR duplicates inside Genrich, OR pre-deduplicate (do not do both).\n\n### MACS3 hmmratac (HMMRATAC) -- Depth and fragment-size dependence\n\n**Trigger:** Library \u003C 25M nuclear reads, or libraries with degraded chromatin and flat fragment-size distribution.\n\n**Mechanism:** The 3-state HMM is trained from fragment-size classes (NFR ~50 bp, mono ~200 bp, di ~400 bp peaks). Without periodicity the emission distributions collapse and the HMM cannot separate states.\n\n**Symptom:** Output BED is empty, or all peaks are tiny (~150 bp) with no nucleosome flanks called; runtime explodes (>24h) on shallow data.\n\n**Fix:** Verify fragment-size periodicity in QC first (atac-qc skill). If flat, fall back to MACS3 callpeak. HMMRATAC needs deep coverage (a practical minimum around 30M deduplicated nuclear reads).\n\n### HOMER findPeaks -- Window-size sensitivity\n\n**Trigger:** Default `-style dnase` uses 75 bp peaks; ATAC peaks are 250-500 bp typically.\n\n**Mechanism:** HOMER's window-based caller does not auto-fit width to ATAC.\n\n**Fix:** Use `-style factor -size 150` for narrow ATAC peaks, or skip HOMER for peak calling and use it only for downstream motif analysis on MACS peaks.\n\n### Aligner choice -- chromap vs bwa-mem2 vs bowtie2 affects peak shape\n\n**Trigger:** Switching aligners between datasets and expecting reproducible peaks.\n\n**Mechanism:** chromap (Zhang 2021) applies its own ATAC-specific 4 bp \u002F -5 bp Tn5 shift before fragment output; bwa-mem2 and bowtie2 do not. Downstream `--shift -75 --extsize 150` parameters are calibrated for unshifted bwa\u002Fbowtie BAMs; applying them to chromap output double-shifts the signal.\n\n**Symptom:** Peaks called from chromap output are shifted by ~5-10 bp relative to bwa output at the same locus.\n\n**Fix:** When using chromap, drop `--shift` and `--extsize` (chromap's pre-shift is sufficient) OR omit chromap's `--Tn5-shift` (the shift is opt-in, applied only when that flag or an ATAC preset is set) so it is not double-applied, then proceed with standard MACS parameters. Document the aligner version and any shift choices in methods. Within a project, pin the aligner.\n\n### Single-sample (no replicate) -- Rotation \u002F circular-shift permutation\n\n**Trigger:** Single biological sample without any replicate for IDR.\n\n**Mechanism:** IDR requires two replicates by construction. For n=1, statistical confidence per peak comes from local background (Poisson p-value) but reproducibility cannot be assessed.\n\n**Fix:** Apply a stricter `-q 0.01` (vs ENCODE `-p 0.01` + IDR pattern) and additionally apply rotation\u002Fcircular-shift permutation: shift the BAM cuts by a random distance modulo each chromosome and re-call peaks; the per-peak persistence rate across rotations is a non-parametric reproducibility proxy. Document this is a single-sample heuristic, not ENCODE-compliant.\n\n## ENCODE 3 vs ENCODE 4 Differences\n\n| Feature | ENCODE 3 (legacy) | ENCODE 4 (current) |\n|---------|-------------------|---------------------|\n| Per-rep significance threshold | `-q 0.05` directly | `-p 0.01` (loose) + IDR |\n| Pseudoreplicate IDR cutoff | Not formalized | `--idr-threshold 0.10` self-consistency |\n| TSS enrichment threshold | >= 6 (older) | >= 7 (hg38, GENCODE v29) |\n| Mt fraction expectation | \u003C 25% | \u003C 20% (Omni-ATAC \u003C 5%) |\n| Blacklist | v1 | v2 (Amemiya 2019) |\n| Default genome size | hardcoded `hs`\u002F`mm` | encouraged: deepTools effectiveGenomeSize |\n\nTo reproduce a published ENCODE 3 dataset, pin the original pipeline and threshold exactly. ENCODE 4 results are not directly numerically comparable to ENCODE 3 even on the same input BAM.\n\n## Super-Enhancer Detection\n\nFor active super-enhancer (SE) annotation alongside narrow-peak workflow, ROSE (Whyte 2013) and LILY (Boeva 2017) stitch ATAC or H3K27ac peaks separated by \u003C 12.5 kb and rank by signal:\n\n```bash\n# ROSE expects H3K27ac BAM but works on ATAC narrowPeak with care\nROSE_main.py -g hg38 -i atac_peaks.gff -r atac.bam -o rose_out\u002F -t 2500\n```\n\nROSE-style stitching is complementary to MACS3 narrow peaks: narrow peaks for differential analysis; SE annotation for biology interpretation. SE calls require H3K27ac input for definitive annotation; ATAC alone produces \"stretch enhancers\" that overlap but are not identical to H3K27ac SE.\n\n## ENCODE 4 ATAC-seq Pipeline (Reference Implementation)\n\nThe exact ENCODE pattern produces the most-comparable peak sets:\n\n```bash\n# Per-replicate peak calling (loose threshold)\nmacs2 callpeak \\\n    -t rep1.filt.dedup.bam \\\n    -f BAM -g hs \\\n    -n rep1 --outdir peaks\u002Frep1\u002F \\\n    --nomodel --shift -75 --extsize 150 \\\n    --keep-dup all \\\n    -B --SPMR \\\n    -p 0.01\n\n# Pooled (all replicates)\nmacs2 callpeak \\\n    -t rep1.filt.dedup.bam rep2.filt.dedup.bam \\\n    -f BAM -g hs -n pooled --outdir peaks\u002Fpooled\u002F \\\n    --nomodel --shift -75 --extsize 150 --keep-dup all -B --SPMR -p 0.01\n\n# Pseudoreplicates (two independent 50% subsamples; approximate, not a disjoint partition)\nsamtools view -b -h -s 1.5 rep1.filt.dedup.bam > rep1.psr1.bam   # seed.fraction\nsamtools view -b -h -s 2.5 rep1.filt.dedup.bam > rep1.psr2.bam   # different seed\n# (call peaks on each pseudoreplicate the same way)\n```\n\n`--SPMR` writes signal as Signal Per Million Reads (normalized bedGraph). `-p 0.01` is intentionally loose; IDR will tighten to a reproducible set.\n\n## IDR for Reproducible Peaks\n\n**Goal:** Find peaks reproducible across biological replicates at controlled IDR.\n\n**Approach:** Score paired peak lists by signalValue, fit IDR's two-component mixture (reproducible + noise), threshold at IDR \u003C= 0.05 (true reps) or 0.10 (pseudoreplicates).\n\n```bash\n# Sort peaks by p-value (column 8) so IDR scores by significance\nsort -k8,8nr rep1_peaks.narrowPeak > rep1.sorted.narrowPeak\nsort -k8,8nr rep2_peaks.narrowPeak > rep2.sorted.narrowPeak\n\n# True replicates -- threshold IDR \u003C= 0.05\nidr --samples rep1.sorted.narrowPeak rep2.sorted.narrowPeak \\\n    --input-file-type narrowPeak --rank p.value \\\n    --output-file true_reps.idr \\\n    --idr-threshold 0.05 --plot --log-output-file idr.log\n\n# Pseudoreplicates -- threshold IDR \u003C= 0.10 (looser, ENCODE Nself \u003C= 2 rule)\nidr --samples psr1_peaks.narrowPeak psr2_peaks.narrowPeak \\\n    --input-file-type narrowPeak --rank p.value \\\n    --output-file psr.idr --idr-threshold 0.10 --plot\n```\n\n**ENCODE consistency rules:** Nt = peaks passing IDR on true reps; Nself = peaks passing IDR on pseudoreps. Library passes if `max(Nt, Nself) \u002F min(Nt, Nself) \u003C= 2`. If both ratios > 2, the library is rejected.\n\n**IDR fails when:** Ranking column choice matters. `--rank p.value` (column 8) is robust; `--rank signal.value` (column 7) breaks if MACS pile-up scaling differs between replicates.\n\n## Decision Tree by Experimental Scenario\n\n| Scenario | Recommended caller | Why |\n|----------|-------------------|-----|\n| Bulk ATAC, 2-3 reps, depth >= 25M | MACS2 ENCODE pipeline + IDR | Reproducible, comparable to published peaksets |\n| Bulk ATAC, 1 sample (no rep) | MACS3 callpeak with `-q 0.05`; do not run IDR | IDR is meaningless without reps; tighter q-value substitutes |\n| Bulk ATAC, depth >= 30M, want NFR + flanking nuc structure | MACS3 hmmratac | HMM separates NFR from nucleosome flanks |\n| Multi-replicate joint analysis where rep weighting is symmetric | Genrich `-j` ATAC mode | Joint p-value across reps; built-in chrM and blacklist |\n| Cell type with broad super-enhancer accessibility | MACS3 `--broad --broad-cutoff 0.1` for SE; narrow for differential | Domain-level inference vs site-level |\n| FFPE \u002F degraded chromatin (flat fragment dist) | MACS3 callpeak with stringent `-q 0.01`; never HMMRATAC | HMM needs fragment periodicity |\n| scATAC pseudobulk per cluster | MACS3 callpeak per cluster + iterative overlap | See atac-seq\u002Fsingle-cell-atac |\n| Want fixed-width consensus peaks for differential | Call broadly, then re-center to summits +\u002F- 250 bp | See atac-seq\u002Fconsensus-peakset |\n| Plant \u002F non-model organism | MACS3 with `-g \u003Ceffective_size>`; verify size empirically | Default `-g hs\u002Fmm` invalid; compute via khmer |\n\n## Reconciliation: When Callers Disagree\n\n| Pattern | Likely cause | Action |\n|---------|--------------|--------|\n| MACS narrow peaks much fewer than Genrich | Genrich q-cutoff different default (`-q 0.05` log-scale, MACS `-q 0.05` linear) | Re-run with `-q 0.01` (Genrich) for parity |\n| HMMRATAC misses peaks MACS finds | Library too shallow OR fragment-size periodicity weak | Trust MACS; HMMRATAC is depth-sensitive |\n| HMMRATAC calls peaks MACS misses | HMM is sensitive to mid-strength accessibility flanked by phased nucleosomes | Inspect; often genuine but unconfirmed by short-fragment signal |\n| Same peak called by all but width 2x different | Broad mode vs narrow mode mismatch | Standardize: re-center to summit +\u002F- 250 bp for differential |\n| Per-rep MACS calls peak; pooled MACS does not | One rep dominates; lambda smoothes it out in pooled | Trust pooled + IDR over per-rep counts |\n\n**Operational rule for high-confidence reporting:** Require a peak to pass IDR \u003C= 0.05 on true replicates AND survive blacklist\u002Fgreylist filtering AND have mean signalValue >= 5 across reps. Two callers from different families (MACS + Genrich) agreeing within 250 bp is acceptable evidence when IDR is unavailable.\n\n## Blacklist and Greylist\n\n```bash\n# ENCODE blacklist (Amemiya 2019) -- always remove\nwget https:\u002F\u002Fgithub.com\u002FBoyle-Lab\u002FBlacklist\u002Fraw\u002Fmaster\u002Flists\u002Fhg38-blacklist.v2.bed.gz\ngunzip hg38-blacklist.v2.bed.gz\nbedtools intersect -v -a peaks.narrowPeak -b hg38-blacklist.v2.bed > peaks.no_blacklist.narrowPeak\n\n# Sample-specific greylist (input-derived high-signal regions; rarely available for ATAC)\n# For ATAC, ENCODE recommends pooling all samples' top-percentile signal and removing\n# regions exceeding 100x median coverage as a \"soft greylist\"\n```\n\nBlacklist is mandatory; greylist is optional and most useful when the same library prep produces consistent artifact regions across samples.\n\n## NFR-Only Peak Calling\n\n**Goal:** Call peaks using only sub-nucleosomal fragments (\u003C100 bp) for sharper TF-binding-relevant accessibility.\n\n**Approach:** Pre-filter BAM to short fragments, then call peaks with parameters scaled to the smaller fragment length.\n\n```bash\nsamtools view -h sample.dedup.bam | \\\n    awk 'substr($0,1,1)==\"@\" || ($9 > 0 && $9 \u003C 100) || ($9 \u003C 0 && $9 > -100)' | \\\n    samtools view -b > nfr.bam\nsamtools index nfr.bam\n\nmacs2 callpeak -t nfr.bam -f BAM -g hs -n sample_nfr \\\n    --nomodel --shift -37 --extsize 75 \\\n    --keep-dup all -p 0.01\n```\n\n`--shift -37 --extsize 75` halves both parameters to match shorter fragments; this is a fragment-scaled convention for NFR-focused input, not a TOBIAS-specified setting (TOBIAS instead applies the +4\u002F-5 Tn5 correction to the full BAM via ATACorrect).\n\n## Output Files (narrowPeak)\n\n| Column | Field | Notes |\n|--------|-------|-------|\n| 1-3 | chrom, start, end | 0-based, half-open |\n| 4 | name | MACS auto-numbers |\n| 5 | score | Min(int(-10*log10(qvalue)), 1000) |\n| 6 | strand | `.` for ATAC |\n| 7 | signalValue | Fold enrichment over local lambda |\n| 8 | pValue | -log10 p |\n| 9 | qValue | -log10 q (BH-FDR) |\n| 10 | summit_offset | Peak summit relative to start |\n\nConvert to bigWig for browsers: `sort -k1,1 -k2,2n sample_treat_pileup.bdg > sample.sorted.bdg && bedGraphToBigWig sample.sorted.bdg chrom.sizes sample.bw` (bedGraphToBigWig is multi-pass and cannot read from a pipe\u002Fstdin, so sort to a file first).\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|-----------------|-------|----------|\n| `--shift\u002F--extsize ignored` warning | Used `-f BAMPE` with these flags | Switch to `-f BAM` or remove the flags |\n| 0 peaks called | Forgot `--nomodel`; MACS tries to build a shifting model and fails | Add `--nomodel --shift -75 --extsize 150` |\n| Peak count >> 500k | Did not deduplicate; or did not remove chrM; or `-q` too loose | Pre-filter (samtools view -F 1804 -q 30; samtools idxstats); use `-q 0.01` |\n| `Sequence chrM not found` (Genrich) | Wrong chromosome name in `-e` flag (chrM vs MT) | Match BAM header naming convention |\n| HMMRATAC out of memory | Deep library \u002F large genome; the current tool is `macs3 hmmratac` (Python, not Java) | Increase available RAM and use a scratch `--outdir`; the `-Xmx`\u002F`HMMRATAC.jar` heap flags apply only to the deprecated standalone Java HMMRATAC |\n| Peaks shifted by 75 bp from expected positions | Forgot `--shift -75` (cuts at one end of read) | Add the shift; positions are now centered on Tn5 cut site |\n| IDR returns 0 reproducible peaks | Sorted by wrong column; ranks are random | Sort each peakset by `-k8,8nr` (p-value descending) |\n\n## References\n\n- Buenrostro JD et al 2013 Nat Methods 10:1213 (ATAC-seq protocol)\n- Corces MR et al 2017 Nat Methods 14:959 (Omni-ATAC protocol)\n- Corces MR et al 2018 Science 362:eaav1898 (iterative-overlap fixed-width 501 bp consensus peaks)\n- Tarbell ED & Liu T 2019 Nucleic Acids Res 47:e91 (HMMRATAC)\n- Gaspar JM, Genrich: detecting sites of genomic enrichment (github.com\u002Fjsh58\u002FGenrich; no published paper)\n- Li Q et al 2011 Ann Appl Stat 5:1752 (IDR framework)\n- Landt SG et al 2012 Genome Res 22:1813 (ENCODE\u002FmodENCODE peak calling guidelines, IDR Nself rule)\n- Amemiya HM et al 2019 Sci Rep 9:9354 (ENCODE blacklist v2)\n- ENCODE ATAC-seq Standards (encodeproject.org\u002Fatac-seq) -- canonical pipeline parameters\n\n## Related Skills\n\n- atac-seq\u002Fatac-qc - Verify TSS enrichment, FRiP, and fragment periodicity before calling\n- atac-seq\u002Fconsensus-peakset - Combine per-sample peaks into a fixed-width differential-ready set\n- atac-seq\u002Fsingle-cell-atac - Pseudobulk peak calling per cluster\n- atac-seq\u002Fdifferential-accessibility - Downstream DiffBind\u002Fcsaw\u002FDESeq2 testing\n- atac-seq\u002Fdeep-learning-atac - chromBPNet bias-corrected per-base profiles as alternative input\n- read-alignment\u002Fbowtie2-alignment - Upstream ATAC alignment\n- alignment-files\u002Fduplicate-handling - Pre-call dedup with Picard MarkDuplicates\n- chip-seq\u002Fpeak-calling - ChIP-seq comparison (uses input control)\n- chip-seq\u002Fsuper-enhancers - ROSE \u002F LILY for super-enhancer annotation\n- genome-intervals\u002Fbed-file-basics - Peak file manipulation\n",{"name":5,"source":24,"license":15,"tool_type":25,"description":7,"imported_at":26,"source_path":27,"primary_tool":28,"source_repository":29},"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills","cli","2026-09-20","atac-seq\u002Fatac-peak-calling\u002FSKILL.md","macs3","GPTomics\u002FbioSkills","main","2d1750717747097b602acf30bd09a7cbd4b4c6ea","awesome_skills\u002Fbiology\u002Fbio-atac-seq-atac-peak-calling","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous","2026-11-09 11:45:36",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-atac-seq-atac-peak-calling",{"tool":42,"command":43},"bunx","bunx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-atac-seq-atac-peak-calling",{"tool":45,"command":46},"pnpm","pnpm dlx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-atac-seq-atac-peak-calling","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-atac-seq-atac-peak-calling\u002FSKILL.md",true,[50,56],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"examples\u002Fcall_atac_peaks.sh","SCRIPT","脚本",3282,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-atac-seq-atac-peak-calling\u002Fexamples\u002Fcall_atac_peaks.sh",{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"usage-guide.md","REFERENCE","参考文档",6704,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-atac-seq-atac-peak-calling\u002Fusage-guide.md",[63,71,78,85,92,99],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":70},"01M7EXRQF9GFM7D9BG6N5HAT34","oath","Auditing regulatory compliance (SOC2\u002FPCI-DSS\u002FHIPAA\u002FISO 27001): maps requirements, checks controls, designs audit trails, implements Policy as Code. Use when compliance auditing is needed.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fdevsecops\u002Foath\u002FSKILL.md",[],[],"2026-11-15 14:25:24",{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7EXRH7TYTNZJT0BQXEWAMW7","nexus","Orchestrating multi-specialist task chains and scope-adaptive product delivery: classifies intent, selects and executes the minimum viable chain, aggregates results, and verifies acceptance criteria. For multi-domain tasks, build-first delivery, and product lifecycle execution.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fdevsecops\u002Fnexus\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7EXRCDPFWVEEEFR2ZQGJCYY","nest","Designing LLM-optimized folder structures: audits and restructures directories for context efficiency, progressive disclosure, and prompt cache performance. Not for general repo structure (Grove).","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fdevsecops\u002Fnest\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7EXR7JEER60TH0HD0AH4EE9","native","Implementing production iOS\u002FAndroid\u002FmacOS native features (SwiftUI, Compose) and iterating a screen against a reference design. Not for cross-platform RN\u002FFlutter (Port) or web (Artisan).","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fdevsecops\u002Fnative\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":19},"01M7EXR133J7DD5961R80QTRZY","muse","Defining and managing design tokens, applying token systems to existing codebases, building design system foundations. Use for spacing, color, typography, dark mode, cross-platform output.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fdevsecops\u002Fmuse\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":19},"01M7EXQWWX7ECQN0J50B41YN5N","morph","Converting document formats (Markdown\u002FWord\u002FExcel\u002FPDF\u002FHTML) and generating reusable conversion scripts. Use for distributable specs, accessibility-compliant PDFs, or Pandoc\u002FLibreOffice pipelines.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fdevsecops\u002Fmorph\u002FSKILL.md",[],[]]