schneebergerlab / fixchr

MIT License
13 stars 1 forks source link

UnboundLocalError #3

Closed cistarsa closed 1 year ago

cistarsa commented 1 year ago

Hello again.

Although I've had success using fixchr on some scaffolds, I'm still struggling with the original ones that needed reversecomplementing despite generating pafs and sams with different flags in minimap2. Here's the paf generation with error:

$minimap2 -cx asm20 -L --eqx BAR3230_D13.fasta PSC355_D13.fasta >> PSC355xBAR3230_D13.paf

fixchr:

$fixchr -c PSC355xBAR3230_D13.paf -r BAR3230_D13.fasta -q PSC355_D13.fasta -F P --prefix D13_PSC355xBAR3230

#error 
Traceback (most recent call last):
  File "/home/test/miniconda3/bin/fixchr", line 4, in <module>
    __import__('pkg_resources').run_script('fixchr==0.1', 'fixchr')
  File "/home/test/miniconda3/lib/python3.8/site-packages/pkg_resources/__init__.py", line 662, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/home/test/miniconda3/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1466, in run_script
    exec(script_code, namespace, namespace)
  File "/home/test/miniconda3/lib/python3.8/site-packages/fixchr-0.1-py3.8.egg/EGG-INFO/scripts/fixchr", line 6, in <module>
  File "/home/test/miniconda3/lib/python3.8/site-packages/fixchr-0.1-py3.8.egg/fixchr/scripts/fixchr.py", line 105, in main
  File "/home/test/miniconda3/lib/python3.8/site-packages/fixchr-0.1-py3.8.egg/fixchr/scripts/fixchr.py", line 63, in fixchr
  File "/home/test/miniconda3/lib/python3.8/site-packages/fixchr-0.1-py3.8.egg/fixchr/scripts/func.py", line 632, in homchr
UnboundLocalError: local variable 'coords2' referenced before assignment

thanks!

mnshgl0110 commented 1 year ago

Fixed in https://github.com/schneebergerlab/fixchr/commit/be73a0918912c209a56e49dca7870788f4a7e010

cistarsa commented 1 year ago

Thanks for the update! I believe I've reinstalled all of the dependencies and pulled the newest version 0.2; but now I'm running into a "hometools" no module issue. I've tried to install this using the standard conda install; python pip to no avail. I see this in the func.py script, line 45 but nowhere else...?

mnshgl0110 commented 1 year ago

Ahh.. I am sorry. That needs to be commented out. Done now and should be working.