apcamargo / genomad

geNomad: Identification of mobile genetic elements
https://portal.nersc.gov/genomad/
Other
168 stars 17 forks source link

FileNotFoundError #32

Closed chengzhongyi8 closed 10 months ago

chengzhongyi8 commented 10 months ago

Hi, Thanks for developing this tool. I use it to predict viral classification. However, I meet some problems: my command: genomad annotate ../checkv_contigs.fa genomad /public/zycheng/database/virus.db/genomad_db_v1.3 And the log:

  Executing geNomad annotate (v1.5.2). This will perform gene calling in the input sequences and annotate the predicted proteins with geNomad's  markers. 
[09:58:03] Executing genomad annotate.                                                                                                                    
[09:58:03] Creating the genomad/checkv_contigs_annotate directory.                                                                                        
Traceback (most recent call last):
  File "/public/home/zycheng/anaconda3/envs/genomad/bin/genomad", line 10, in <module>
    sys.exit(cli())
  File "/public/home/zycheng/anaconda3/envs/genomad/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/public/home/zycheng/anaconda3/envs/genomad/lib/python3.10/site-packages/rich_click/rich_group.py", line 21, in main
    rv = super().main(*args, standalone_mode=False, **kwargs)
  File "/public/home/zycheng/anaconda3/envs/genomad/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/public/home/zycheng/anaconda3/envs/genomad/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/public/home/zycheng/anaconda3/envs/genomad/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/public/home/zycheng/anaconda3/envs/genomad/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/public/home/zycheng/anaconda3/envs/genomad/lib/python3.10/site-packages/genomad/cli.py", line 425, in annotate
    genomad.annotate.main(
  File "/public/home/zycheng/anaconda3/envs/genomad/lib/python3.10/site-packages/genomad/modules/annotate.py", line 167, in main
    database_obj = database.Database(database_path)
  File "/public/home/zycheng/anaconda3/envs/genomad/lib/python3.10/site-packages/genomad/database.py", line 10, in __init__
    with open(database_directory / "version.txt") as fin:
FileNotFoundError: [Errno 2] No such file or directory: '/public/zycheng/database/virus.db/genomad_db/version.txt'

I downloaded the database from Zenodo and extract it manually, and there are only four files, without version.txt.

Best, Zhongyi

apcamargo commented 10 months ago

The Zenodo release should have the version.txt file. Which version of the database did you download? I'll check that

chengzhongyi8 commented 10 months ago

I download dbv1.3 (https://zenodo.org/record/7793532).

apcamargo commented 10 months ago

I just downloaded it and version.txt is there. Not really sure what happened on your end, but you can just create the version.txt file within the genomad_db_v1.3 directory. Just run this command:

echo "1.3" > genomad_db_v1.3/version.txt
chengzhongyi8 commented 10 months ago

Thanks a lot!

apcamargo commented 10 months ago

No problem!