Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skipping --kofam_hmm_loc works if anyone fails to prepare database for KOfam #402

Open
hellopeccat opened this issue Mar 12, 2025 · 0 comments

Comments

@hellopeccat
Copy link

I noted an interesting bug relevant to ko_list.gz and its decompressed file kofam_ko_list.tsv.

When I manually downloaded my desired databases, including KOfam, and run prepare database module as follows:
DRAM-setup.py prepare_databases --output_dir /mnt/8T_1/DRAM_db/ --skip_uniref --pfam_loc /mnt/8T_1/DRAM_db/Pfam-A.full.gz --pfam_hmm_dat /mnt/8T_1/DRAM_db/Pfam-A.hmm.dat.gz --kofam_hmm_loc /mnt/8T_1/DRAM_db/profiles.tar.gz --kofam_ko_list_loc /mnt/8T_1/DRAM_db/ko_list.gz --dbcan_loc /mnt/8T_1/DRAM_db/dbCAN-HMMdb-V9.txt --dbcan_fam_activities /mnt/8T_1/DRAM_db/CAZyDB.07302020.fam-activities.txt --vogdb_loc /mnt/8T_1/DRAM_db/vog.hmm.tar.gz --vog_annotations /mnt/8T_1/DRAM_db/vog.annotations.tsv.gz --viral_loc /mnt/8T_1/DRAM_db/viral.1.protein.faa.gz

The kofam succeeded to be processed, however triggered another surprising error

2025-03-11 13:32:33.675820: Database preparation started
0:44:08.388304: PFAM database processed
0:44:10.698177: dbCAN database processed
0:44:26.101377: RefSeq viral database processed
0:48:53.351218: MEROPS database processed
0:50:41.912514: VOGdb database processed
1:02:47.263757: KOfam database processed
1:02:48.296860: KOfam ko list processed
1:02:48.296958: PFAM hmm dat processed
1:02:48.297030: dbCAN fam activities processed
1:02:48.297055: VOGdb annotations processed
1:03:22.357565: DRAM databases and forms downloaded
1:03:22.369840: Files moved to final destination
1:03:22.369994: Setting database paths
Traceback (most recent call last):
  File "/usr/local/software/anaconda3/envs/DRAM/bin/DRAM-setup.py", line 146, in <module>
    args.func(**args_dict)
  File "/usr/local/software/anaconda3/envs/DRAM/lib/python3.6/site-packages/mag_annotator/database_processing.py", line 528, in prepare_databases
    set_database_paths(**output_dbs, use_current_locs=False, update_description_db=True, start_time=start_time)
  File "/usr/local/software/anaconda3/envs/DRAM/lib/python3.6/site-packages/mag_annotator/database_processing.py", line 335, in set_database_paths
    db_dict = check_exists_and_add_to_location_dict(kofam_ko_list_loc, 'kofam_ko_list', db_dict)
  File "/usr/local/software/anaconda3/envs/DRAM/lib/python3.6/site-packages/mag_annotator/database_processing.py", line 305, in check_exists_and_add_to_location_dict
    if check_file_exists(loc):
  File "/usr/local/software/anaconda3/envs/DRAM/lib/python3.6/site-packages/mag_annotator/database_processing.py", line 34, in check_file_exists
    raise ValueError("Database location does not exist: %s" % db_loc)
ValueError: Database location does not exist: /mnt/8T_1/DRAM_db/kofam_ko_list.tsv

At first, I moved the decompressed file, named ko_list to kofam_ko_list.tsv, and made a copy of ko_list.gz to give the argument of --kofam_hmm_loc. However, the program returned
subprocess.CalledProcessError: Command '['gunzip', '/mnt/8T_1/DRAM_db/ko_list.gz']' returned non-zero exit status 2.

I didn't figure out what happened to the command gunzip, but I subsequently skipped to set --kofam_hmm_loc and that worked. Hope this bug fixed soon.

@hellopeccat hellopeccat changed the title Skipping --kofam_hmm_loc works if anyone fail to prepare database for KOfam Skipping --kofam_hmm_loc works if anyone fails to prepare database for KOfam Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant