geronimp / graftM

GraftM - Rapid community profiles from metagenomes
http://geronimp.github.io/graftM/
GNU General Public License v3.0
44 stars 16 forks source link

error using decoy_database with hmmsearch+diamond #267

Open yboesch opened 4 years ago

yboesch commented 4 years ago

Hi, I am using your search tool in my research, thank you. I encountered an error during executing the following command.

graftM graft --graftm_package /path/to/package --forward path/to/metagenome.fastq --evalue 1e-6 --resolve_placements --output_directory "DATA_OUT" --decoy_database /path/to/decoy.dmnd --search_method hmmsearch+diamond

The program aborts with an error.

Traceback (most recent call last):
  File "/opt/sw/graftm/0.13.1/bin/graftM", line 415, in <module>
    Run(args).main()
  File "/opt/sw/graftm/0.13.1/lib/python3.7/site-packages/graftm/run.py", line 613, in main
    self.graft()
  File "/opt/sw/graftm/0.13.1/lib/python3.7/site-packages/graftm/run.py", line 388, in graft
    diamond_db
  File "/opt/sw/graftm/0.13.1/lib/python3.7/site-packages/graftm/timeit.py", line 10, in timed
    result = method(*args, **kw)
  File "/opt/sw/graftm/0.13.1/lib/python3.7/site-packages/graftm/sequence_searcher.py", line 849, in aa_db_search
    output_search_file,
UnboundLocalError: local variable 'output_search_file' referenced before assignment

If I run the code with search method diamond it seems to work.