SunPengChuan / wgdi

WGDI: A user-friendly toolkit for evolutionary analyses of whole-genome duplications and ancestral karyotypes
https://wgdi.readthedocs.io/en/latest/
BSD 2-Clause "Simplified" License
114 stars 22 forks source link

UnboundLocalError: local variable 'group' referenced before assignment #7

Closed tiramisutes closed 3 years ago

tiramisutes commented 3 years ago

Hi, I get follows stderr when run wgdi -icl for collinearity.

Traceback (most recent call last):
  File "/home/wgdi", line 10, in <module>
    sys.exit(main())
  File "/home/lib/python3.7/site-packages/wgdi/run.py", line 218, in main
    module_to_run(arg)
  File "/home/lib/python3.7/site-packages/wgdi/run.py", line 183, in module_to_run
    return switcher.get(argument)()
  File "/home/lib/python3.7/site-packages/wgdi/run.py", line 157, in run_collinearity
    col.run()
  File "/home/lib/python3.7/site-packages/wgdi/run_colliearity.py", line 82, in run
    del blast, group
UnboundLocalError: local variable 'group' referenced before assignment

I have tried my best to find a solution. But no ideal. So, can you help me? Thankls.

SunPengChuan commented 3 years ago

The blast file may not correspond to your gff or lens.

tiramisutes commented 3 years ago

How can get more detailed stderr information? Such as which file or which row or which gene id caused this error? Thanks.

tiramisutes commented 3 years ago

I think I found the problem. Example I have follows gff file. gff1👇

A1   A11.1  17370   26509   +   1   A11

gff2👇

B1   B11.1  17370   26509   +   1   B11

Then the blastp file should have same order. It's meaning the gene id in first column should be from gff1 and gene id in second column should be from gff2.

A11.1   B11.1   86.786  1120    113 3   1   1119    1   1086    0.0 1982