Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnboundLocalError for BAMPE #189

Open
liuqing1992 opened this issue Apr 26, 2017 · 1 comment
Open

UnboundLocalError for BAMPE #189

liuqing1992 opened this issue Apr 26, 2017 · 1 comment

Comments

@liuqing1992
Copy link

Dear Tao,
Recently, I'm trying to use MACS2 for my ChIP-seq data. When I run MACS2 , I got error "UnboundLocalError".
On the script "PairedEndTrack.pyx": #325 if size <= 1: new_locs = locs else:
then if size <=1, the "dup_locs" have not been assignment value
So if there has only one read in a single scaffold, then I will got the "UnboundLocalError"?

My script:
macs2 callpeak -t input.bam -c control.bam -f BAMPE -g 5.94e9 -q 0.05 -B --name out --outdir outdir

The Error list as follows:

INFO  @ Mon, 24 Apr 2017 22:20:41: #1 filter out redundant fragments by allowing at most 1 identical fragment(s) 
Traceback (most recent call last):
  File "/panfs/home/kang/jiangfeng/software/99.others/Python-2.7.3/bin/macs2", line 4, in <module>
    __import__('pkg_resources').run_script('MACS2==2.1.1.20160309', 'macs2')
  File "/panfs/home/kang/jiangfeng/software/98.lib/01.python/lib/python2.7/site-packages/site-packages/pkg_resources.py", line 534, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/panfs/home/kang/jiangfeng/software/98.lib/01.python/lib/python2.7/site-packages/site-packages/pkg_resources.py", line 1434, in run_script
    execfile(script_filename, namespace, namespace)
  File "/panfs/home/kang/jiangfeng/software/99.others/Python-2.7.3/lib/python2.7/site-packages/MACS2-2.1.1.20160309-py2.7-linux-x86_64.egg/EGG-INFO/scripts/macs2", line 617, in <module>
    main()
  File "/panfs/home/kang/jiangfeng/software/99.others/Python-2.7.3/lib/python2.7/site-packages/MACS2-2.1.1.20160309-py2.7-linux-x86_64.egg/EGG-INFO/scripts/macs2", line 57, in main
    run( args )
  File "/panfs/home/kang/jiangfeng/software/99.others/Python-2.7.3/lib/python2.7/site-packages/MACS2-2.1.1.20160309-py2.7-linux-x86_64.egg/MACS2/callpeak_cmd.py", line 142, in run
    control.separate_dups(treatment_max_dup_tags) # changed 5-29
  File "MACS2/IO/PairedEndTrack.pyx", line 354, in MACS2.IO.PairedEndTrack.PETrackI.separate_dups (MACS2/IO/PairedEndTrack.c:5870)
UnboundLocalError: local variable 'dup_locs' referenced before assignment

Liu

@taoliu
Copy link
Contributor

taoliu commented May 5, 2017

You are right. I will fix it. Thanks for the feedback!

taoliu added a commit that referenced this issue May 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants