Hi all,
I have successfully called peaks on my bam files using earlier versions of MACS, however, in my first attempt at using MACS2 (using both the normal Galaxy instance and the Cistrome instance), I am getting fatal error messages when trying to use MACS2 callpeaks on my datasets. I have read in posts with errors similar to mine, that this could be due to the files not being aligned correctly. However, I have bam.bai outputs for both of my datasets, and have even successfully generated new ones using the IdxStats tool. Is is possible I need to merge these files in some way before running them through MACS2, or is there a Galaxy server error that could be causing this?
Any help would be much appreciated!
Please post the entire error message.
Fatal error: Exit code 1 ()
Traceback (most recent call last): File "/galaxy/main/deps/macs2/2.1.0.20151222/iuc/package_macs2_2_1_0_20151222/e1370f7d5e2f/bin/macs2", line 5, in <module> pkg_resources.run_script('MACS2==2.1.0.20151222', 'macs2') File "/galaxy-repl/main/venv/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script self.require(requires)[0].run_script(script_name, ns) File "/galaxy-repl/main/venv/lib/python2.7/site-packages/pkg_resources.py", line 1462, in run_script exec_(script_code, namespace, namespace) File "/galaxy-repl/main/venv/lib/python2.7/site-packages/pkg_resources.py", line 41, in exec_ exec("""exec code in globs, locs""") File "<string>", line 1, in <module> File "/galaxy/main/deps/macs2/2.1.0.20151222/iuc/package_macs2_2_1_0_20151222/e1370f7d5e2f/lib/python/MACS2-2.1.0.20151222-py2.7-linux-x86_64.egg/EGG-INFO/scripts/macs2", line 614, in <module>
File "/galaxy/main/deps/macs2/2.1.0.20151222/iuc/package_macs2_2_1_0_20151222/e1370f7d5e2f/lib/python/MACS2-2.1.0.20151222-py2.7-linux-x86_64.egg/EGG-INFO/scripts/macs2", line 56, in main
File "build/bdist.linux-x86_64/egg/MACS2/callpeak_cmd.py", line 261, in run File "MACS2/PeakDetect.pyx", line 105, in MACS2.PeakDetect.PeakDetect.call_peaks (MACS2/PeakDetect.c:1632) File "MACS2/PeakDetect.pyx", line 159, in MACS2.PeakDetect.PeakDetect.__call_peaks_w_control (MACS2/PeakDetect.c:1983) ZeroDivisionError: float division
Did your control sample have any alignments? What does it print out in the
#2 Use XXXX as fragment length
or#2 d: XXXX
or#2 Since --fix-bimodal is set, MACS will use XXXX as fragment length
lines (only one of these will be present)?Yes it does. It's saying to use 0 as fragment length, however I don't get this problem when I run the files as single-end. The data itself was processed using paired-end seq, but the files I have been given are in BAM format, instead of BAMPE. Do you think this could be causing the issue?
There have been bugs at various points with paired-end reads, this is presumably one of them. The "Use 0 as fragment length" is what's causing this crash that you're seeing, but you're not doing anything that's causing this to happen.
I suspect that you can get around this by specify "Do not build the shifting model" under "Build Model" and setting the "Arbitrary extension size in bp" to whatever the median fragment size is (you can use "bamPEFragmentSize" to get this). The results should be pretty close to what you'd get if you weren't running into this bug.
Thank you so much! This worked perfectly.