# Why MACS2 callpeak for Cut&Run analysis shows error?

**URL:** <https://help.galaxyproject.org/t/why-macs2-callpeak-for-cut-run-analysis-shows-error/16545>\
**Category:** Uncategorized\
**Tags:** macs2, reference-genome\
**Created:** [December 4, 2025, 9:00pm UTC](https://help.galaxyproject.org/t/why-macs2-callpeak-for-cut-run-analysis-shows-error/16545 "2025-12-04T21:00:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![candyc](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/candyc/32/6927_2.png) [@candyc](https://help.galaxyproject.org/u/candyc)\
**Post date:** [December 4, 2025, 9:00pm UTC](https://help.galaxyproject.org/t/why-macs2-callpeak-for-cut-run-analysis-shows-error/16545/1 "2025-12-04T21:00:47Z")

</div>

I’m testing just one PE sample, not tagged, and I have no idea why MACS2 callpeak is showing error.

History: [Galaxy](https://usegalaxy.org/u/candyc/h/c-r)

Thanks so much!

---

<div class="post-metadata">

**Author:** ![jennaj](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/jennaj/32/27_2.png) [@jennaj](https://help.galaxyproject.org/u/jennaj)\
**Post date:** [December 5, 2025, 9:32pm UTC](https://help.galaxyproject.org/t/why-macs2-callpeak-for-cut-run-analysis-shows-error/16545/2 "2025-12-05T21:32:24Z")

</div>

Hello @candyc

Thanks for sharing the history!

Yes, this error is a bit confusing. The tool is complaining about unexpected data content within the genome index. This comes from **MACS2 callpeak** itself and indicates that the tool found unexpected mapping positions it couldn’t parse when building up the internal data structures.

 ![macs2-error-ref-genome](https://us1.discourse-cdn.com/flex020/uploads/galaxy/original/2X/8/8e69ad334f27bd77454b3714649a6dd4a1f296ba.png)

This can sometimes be from [a genome mismatch](https://help.galaxyproject.org/t/atac-seq-analysis-using-macs2-callpeak/13888/2) but for your case, it has to do with including the haplotype/fragments in the genome when mapping. Using the [canonical reference](https://help.galaxyproject.org/t/hg38-canonical-genome/11807) instead is the solution.

🎓 GTN Example → [Hands-on: CUT&RUN data analysis / CUT&RUN data analysis / Epigenetics](https://training.galaxyproject.org/training-material/topics/epigenetics/tutorials/cut_and_run/tutorial.html#hands-on-mapping-reads-to-reference-genome) (#hands-on-mapping-reads-to-reference-genome)

#### Two solutions

You may get a slightly different result between the two, since the original competition for a mapping position will be a bit different. But that should be minor due to the other strict mapping quality filters applied. Your choice!

1. Remap the reads against the hg38 canonical reference genome.

2. Or, you can use [one of the filtering tools](https://training.galaxyproject.org/training-material/search2?query=olympics) on the BAM or BED files to restrict the reported regions to the primary autosomes + sex chromosomes (and sometimes just chrX).

Please give that a try and let us know if it helps! 🙂

---

<div class="post-metadata">

**Author:** ![candyc](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/candyc/32/6927_2.png) [@candyc](https://help.galaxyproject.org/u/candyc)\
**Post date:** [December 8, 2025, 1:12am UTC](https://help.galaxyproject.org/t/why-macs2-callpeak-for-cut-run-analysis-shows-error/16545/3 "2025-12-08T01:12:52Z")

</div>

Thanks so much for your quick reply and help!

I tried remapping the reads against hg38 canonical, however MACS2 callpeak is still showing up error:

 ![Screenshot 2025-12-07 at 7.07.16 PM](https://us1.discourse-cdn.com/flex020/uploads/galaxy/original/2X/8/817d4c6af01ac230ee8a26b58580ca5c0168dd30.png)

Please let me know if you have other suggestions, thank you!

---

<div class="post-metadata">

**Author:** ![jennaj](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/jennaj/32/27_2.png) [@jennaj](https://help.galaxyproject.org/u/jennaj)\
**Post date:** [December 8, 2025, 8:42pm UTC](https://help.galaxyproject.org/t/why-macs2-callpeak-for-cut-run-analysis-shows-error/16545/4 "2025-12-08T20:42:31Z")

</div>

Hi @candyc

Great! Thanks for giving that a try.

It seems the tool is still getting overwhelmed by the volume of reference data, and while I think your results are technically correct so far (those hits are valid but numerous), filtering the data down a little bit more to get rid of the fragments might help! Cut&Run produces a more complicated analysis for MACS2 so .. doing whatever you can to give the tool only what will end up processed tends to work better (reduces the load on the tool).

I’ve run the other steps you were originally applying on your new data and started up MACS2 again. Let’s see what happens!

- [https://usegalaxy.org/u/jen-galaxyproject/h/copy-of-c-r-https-help-galaxyproject-org-t-why-macs2-callpeak-for-cut-run-analysis-shows-error-16545-updated](https://usegalaxy.org/u/jen-galaxyproject/h/copy-of-c-r-https-help-galaxyproject-org-t-why-macs2-callpeak-for-cut-run-analysis-shows-error-16545-updated)

If I somehow missed those filtering steps applied to your original rerun, my apologies. I think a rerun will still have some utility, so, let’s see what happens! 🛠
