HIT-ImmunologyLab / DBSCAN-SWA

29 stars 13 forks source link

ValueError: LOCUS line does not contain - at position 75 in date #23

Open alexahess opened 11 months ago

alexahess commented 11 months ago

Hello,

I'm currently trying to run DBSCAN-SWA to annotate some assemblies, however, when I try to run itI get the following error with my own data as well as the files supplied in the "test" folder:

Traceback (most recent call last):
  File "/home/miks/mambaforge/envs/dbscan-swa/lib/python3.10/site-packages/Bio/File.py", line 72, in as_handle
    with open(handleish, mode, **kwargs) as fp:
TypeError: expected str, bytes or os.PathLike object, not TextIOWrapper

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/Disk1/projects/programs/DBSCAN-SWA/bin/dbscan-swa.py", line 2810, in <module>
    predict_prophage(strain_id,inputfile_bac,outdir,add_annotation,prefix,diamond_thread_num)
  File "/mnt/Disk1/projects/programs/DBSCAN-SWA/bin/dbscan-swa.py", line 2514, in predict_prophage
    get_bac_protein(inputfile_bac,protein_dir,type,prefix)
  File "/mnt/Disk1/projects/programs/DBSCAN-SWA/bin/dbscan-swa.py", line 1331, in get_bac_protein
    GetFaaSequenc(bac_gb_file,protein_dir,save_prefix)
  File "/mnt/Disk1/projects/programs/DBSCAN-SWA/bin/dbscan-swa.py", line 332, in GetFaaSequenc
    for record in records:
  File "/home/miks/mambaforge/envs/dbscan-swa/lib/python3.10/site-packages/Bio/SeqIO/Interfaces.py", line 72, in __next__
    return next(self.records)
  File "/home/miks/mambaforge/envs/dbscan-swa/lib/python3.10/site-packages/Bio/GenBank/Scanner.py", line 516, in parse_records
    record = self.parse(handle, do_features)
  File "/home/miks/mambaforge/envs/dbscan-swa/lib/python3.10/site-packages/Bio/GenBank/Scanner.py", line 499, in parse
    if self.feed(handle, consumer, do_features):
  File "/home/miks/mambaforge/envs/dbscan-swa/lib/python3.10/site-packages/Bio/GenBank/Scanner.py", line 465, in feed
    self._feed_first_line(consumer, self.line)
  File "/home/miks/mambaforge/envs/dbscan-swa/lib/python3.10/site-packages/Bio/GenBank/Scanner.py", line 1443, in _feed_first_line
    raise ValueError(
ValueError: LOCUS line does not contain - at position 75 in date:
LOCUS       contig_1             2796946 bp    DNA     linear       15-AUG.-2023

Does anyone know what the problem is and how to fix it?

chengzhongyi8 commented 1 month ago

Same error.....