Question: MACS2 not working on bam files - possible error with alignment?
0
gravatar for staceyvincent13
2.1 years ago by
staceyvincent1310 wrote:

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!

error tool macs2 bam • 1.3k views
ADD COMMENTlink modified 2.1 years ago by Jennifer Hillman Jackson25k • written 2.1 years ago by staceyvincent1310
1

Please post the entire error message.

ADD REPLYlink written 2.1 years ago by Devon Ryan1.9k

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

ADD REPLYlink written 2.1 years ago by staceyvincent1310

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)?

ADD REPLYlink written 2.1 years ago by Devon Ryan1.9k

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?

ADD REPLYlink written 2.1 years ago by staceyvincent1310
2

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.

ADD REPLYlink written 2.1 years ago by Devon Ryan1.9k
1

Thank you so much! This worked perfectly.

ADD REPLYlink written 2.1 years ago by staceyvincent1310
1
gravatar for Jennifer Hillman Jackson
2.1 years ago by
United States
Jennifer Hillman Jackson25k wrote:

Hello,

This tool does have an open issue concerning one of the parameters. Is your problem the same problem as in the ticket? (it includes a workaround - in short, to skip the problematic setting): https://github.com/galaxyproject/tools-iuc/issues/583

Jen, Galaxy team

ADD COMMENTlink written 2.1 years ago by Jennifer Hillman Jackson25k

Sorry, I have posted the error message above, and this does not appear to be the same one. Thank you anyway.

ADD REPLYlink written 2.1 years ago by staceyvincent1310
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 172 users visited in the last hour