MACS: Model-based Analysis for ChIP-Seq

Status License Programming languages CI x64 CI non x64 CI Mac OS PyPI download

Latest Release:

  • Github: Github Release

  • PyPI: PyPI Release

  • Bioconda:Bioconda Badge

  • Debian Med: Debian StableDebian Unstable

Introduction

With the advancement of sequencing technologies, Chromatin Immunoprecipitation followed by high-throughput sequencing (ChIP-Seq) has become a popular method for studying genome-wide protein-DNA interactions. With the purpose of addressing the need for a robust ChIP-Seq analysis tool, we introduce Model-based Analysis of ChIP-Seq (MACS), a powerful tool for identifying transcription factor binding sites. MACS accounts for the complexity of the genome to assess the significance of enriched ChIP regions and enhances the spatial resolution of binding sites by integrating both sequencing tag position and orientation. MACS can be readily applied to ChIP-Seq data alone, or in conjunction with a control sample, thus enhancing specificity. Furthermore, as a versatile peak-caller, MACS can be employed in any “DNA enrichment assay” to answer the fundamental question: Where are the regions with significant read coverage compared to random background?

Changes for MACS 3.0.5

Features added

  1. Added PETrackII.return_anndata to build a sparse barcode-by-peak AnnData count matrix directly from single-cell fragment data. The method preserves fragment counts and merges overlapping or adjacent input regions.

  2. Added hmmratac --jump to control the update factor used by the fragment-length EM algorithm. The default is 0.5.

Performance improvements

  1. Reworked and vectorized the NumPy-backed PileupV2 implementation. callpeak, pileup, peak-model construction, and the single-end and paired-end track classes now use the optimized routines by default. Now it has 1.5x speedup over 3.0.4.

  2. Improved the performance of PETrackII.exclude and sparse barcode-by-peak matrix construction.

  3. Replaced cykhash caches with Python dictionaries and removed the cykhash dependency.

Bugs fixed

  1. Fixed bdgdiff region scores being truncated to integers before calculating their length-weighted mean. Decimal scores are now preserved, including with cutoffs below 1 (#715).

  2. Fixed callpeak --call-summits assigning the first above-cutoff chunk’s score to a smoothed maximum in a below-cutoff gap. Invalid gap maxima are now discarded (#741).

  3. Fixed an IndexError in bedGraph peak refinement when a peak has no overlapping bedGraph content, as encountered in hmmratac (#735).

  4. hmmratac --cutoff-analysis-only now exits with status 0 after successfully writing its report (#704).

Compatibility changes

  1. MACS3 now requires Python 3.12 or later and declares support for Python 3.12, 3.13, and 3.14.

  2. pandas and anndata are now runtime dependencies for the AnnData export API.

Documentation

  1. Added automated major-version and release-to-release performance benchmarking and their documentation.

  2. Corrected the cutoff-analysis documentation for callpeak, bdgpeakcall, and hmmratac, and updated the recommended MACS3 citation.

Install

The common way to install MACS is through PYPI) or conda. Please check the INSTALL document for detail.

MACS3 has been tested using GitHub Actions for every push and PR in the following architectures:

  • x86_64 (Ubuntu 22, Python 3.9, 3.10, 3.11, 3.12, 3.13)

  • aarch64 (Ubuntu 22, Python 3.10)

  • armv7 (Ubuntu 22, Python 3.10)

  • ppc64le (Ubuntu 22, Python 3.10)

  • s390x (Ubuntu 22, Python 3.10)

  • Apple chips (Mac OS 13, Python 3.9, 3.10, 3.11, 3.12, 3.13)

In general, you can install through PyPI as pip install macs3. To use virtual environment is highly recommended. Or you can install after unzipping the released package downloaded from Github, then use pip install . command. Please note that, we haven’t tested installation on any Windows OS, so currently only Linux and Mac OS systems are supported. Also, for aarch64, armv7, ppc64le and s390x, due to some unknown reason potentially related to the scientific calculation libraries MACS3 depends on, such as Numpy, Scipy, hmm-learn, scikit-learn, the results from hmmratac subcommand may not be consistent with the results from x86 or Apple chips. Please be aware.

Usage

Example for regular peak calling on TF ChIP-seq:

macs3 callpeak -t ChIP.bam -c Control.bam -f BAM -g hs -n test -B -q 0.01

Example for broad peak calling on Histone Mark ChIP-seq:

macs3 callpeak -t ChIP.bam -c Control.bam --broad -g hs --broad-cutoff 0.1

Example for peak calling on ATAC-seq (paired-end mode):

macs3 callpeak -f BAMPE -t ATAC.bam -g hs -n test -B -q 0.01

Example for peak calling on ATAC-seq with HMMATAC:

macs3 hmmratac -i ATAC.bam -f BAMPE -n test

There are currently 14 functions available in MACS3 serving as sub-commands. Please click on the link to see the detail description of the subcommands.

Subcommand

Description

callpeak

Main MACS3 Function to call peaks from alignment results.

bdgpeakcall

Call peaks from bedGraph file.

bdgbroadcall

Call nested broad peaks from bedGraph file.

bdgcmp

Comparing two signal tracks in bedGraph format.

bdgopt

Operate the score column of bedGraph file.

cmbreps

Combine bedGraph files of scores from replicates.

bdgdiff

Differential peak detection based on paired four bedGraph files.

filterdup

Remove duplicate reads, then save in BED/BEDPE format file.

predictd

Predict d or fragment size from alignment results. In case of PE data, report the average insertion/fragment size from all pairs.

pileup

Pileup aligned reads (single-end) or fragments (paired-end)

randsample

Randomly choose a number/percentage of total reads, then save in BED/BEDPE format file.

refinepeak

Take raw reads alignment, refine peak summits.

callvar

Call variants in given peak regions from the alignment BAM files.

hmmratac

Dedicated peak calling based on Hidden Markov Model for ATAC-seq or scATAC-seq data.

For advanced usage, for example, to run macs3 in a modular way, please read the advanced usage. There is a Q&A document where we collected some common questions from users.

Contribute

Please read our CODE OF CONDUCT and How to contribute documents. If you have any questions, suggestion/ideas, or just want to have conversions with developers and other users in the community, we recommend using the MACS Discussions instead of posting to our Issues page.

Support MACS3

I maintain MACS3 in my spare time. If you find the project useful and would like to support its continued development, you can Buy Me a Coffee. Your contribution will help cover my ever-growing consumption of coffee and tokens.

Ackowledgement

MACS3 project is sponsored by CZI's Essential Open Source Software for Science through EOSS2 (2020-2022) and EOSS4 (2021-2025). And we particularly want to thank the user community for their supports, feedbacks and contributions over the years.

Citation

For MACS version 2 and 3, please cite our 2026 paper MACS3: A Peak-calling Platform for Bulk and Single-cell Regulatory Genomics

If you are using MACS version 1, please cite our 2008 paper Model-based Analysis of ChIP-Seq (MACS)