xthua / bacant

This program is designed for annotation of antimicrobal resistance(AMR), transposon(Tn) and integron(In) in bacteria.
GNU General Public License v3.0
19 stars 7 forks source link

FileNotFoundError: [Errno 2] No such file or directory: 'Bacant_out/annotation.gb' #1

Closed neptuneyt closed 2 years ago

neptuneyt commented 3 years ago

Dear developer, Thanks for your such good job. My issue is that "FileNotFoundError: [Errno 2] No such file or directory: 'Bacant_out/annotation.gb'" occurenced and command line is

bacant -n ISO_1051.fna -o  Bacant_out/

and output:

-rw-r--r--  1 yu husn  150 Jun  1 21:27 AMR.possible.xls
-rw-r--r--  1 yu husn  150 Jun  1 21:27 AMR.xls
-rw-r--r--  1 yu husn  603 Jun  1 21:27 gb_location.txt
drwxr-xr-x  2 yu husn 4.0K Jun  1 21:27 multi_contig
-rw-r--r--  1 yu husn 2.9M Jun  1 21:27 nucleotide.fasta
-rw-r--r--  1 yu husn   20 Jun  1 21:27 nucleotide.integrons
-rw-r--r--  1 yu husn   58 Jun  1 21:27 replicon.tsv
drwxr-xr-x 50 yu husn 4.0K Jun  1 21:27 Results_Integron_Finder_nucleotide
-rw-r--r--  1 yu husn    7 Jun  1 21:27 seqLen.txt
-rw-r--r--  1 yu husn    5 Jun  1 21:27 tmp.fasta
-rw-r--r--  1 yu husn  162 Jun  1 21:27 transposon.filter.xls
-rw-r--r--  1 yu husn  162 Jun  1 21:27 transposon.possible.xls

but the results except header line without anything. and log:

Analysing file /share/disk6/yutao/test/ISO_1051.fna  at 2021-06-01 21:27:27
replicon search done
AMR done
transposon done
integron_finder done
Traceback (most recent call last):
  File "/home/yu/.local/bin/bacant", line 8, in <module>
    sys.exit(run())
  File "/home/yu/.local/lib/python3.7/site-packages/BacAnt/bacant.py", line 1194, in run
    merge_genbank(resultdir)
  File "/home/yu/.local/lib/python3.7/site-packages/BacAnt/bacant.py", line 1011, in merge_genbank
    for rec in SeqIO.parse(annotation_file,'genbank'):
  File "/home/yu/.local/lib/python3.7/site-packages/Bio/GenBank/Scanner.py", line 514, in parse_records
    with as_handle(handle, "rU") as handle:
  File "/home/miniconda2/envs/denovo/lib/python3.7/contextlib.py", line 112, in __enter__
    return next(self.gen)
  File "/home/yu/.local/lib/python3.7/site-packages/Bio/File.py", line 120, in as_handle
    with open(handleish, mode, **kwargs) as fp:
FileNotFoundError: [Errno 2] No such file or directory: 'Bacant_out/annotation.gb'

Looking forward your reply

xthua commented 3 years ago

Thanks for your issue, this is a bug when none of annotation exists in generating annotaion html. We have fixed it in v3.3.1.1.