DRAM icon indicating copy to clipboard operation
DRAM copied to clipboard

Database does not exist at path %s' % self.description_loc

Open pulidofabs opened this issue 2 years ago • 18 comments

Hello,

I have installed DRAM on my cluster home account and have attempted to use the script for the last few weeks. However, every time I try to run the code, I get the following error.

"UserWarning: Database does not exist at path None warnings.warn('Database does not exist at path %s' % self.description_loc)"

I have attempted to install the database in different locations. After emailing back and forth with the University cluster IT, they decided to install the software on my account (to make sure that I was not doing something wrong). However, I am still getting the same error, and I cannot figure out how to move forward. Could you please let me know what or how I can tell DRAM the location of the database?

On my cluster home account, I installed DRAM, activated DRAM, and then used the following code to install/download the database (which is installed in my home directory) without access to KEGG.

DRAM-setup.py prepare_databases --output_dir DRAM_data

Any help is highly appreciated.

pulidofabs avatar Mar 16 '22 21:03 pulidofabs

Can you start by showing me what the output of DRAM-setup.py print_config That will tell me a lot about what is missing.

rmFlynn avatar Mar 17 '22 21:03 rmFlynn

Hi, I am having the same problem. Here is the output of the DRAM-setup.py print_config DRAM-setup.py print_config /home/alis/anaconda3/envs/DRAM/lib/python3.9/site-packages/mag_annotator/database_handler.py:51: UserWarning: Database does not exist at path None warnings.warn('Database does not exist at path %s' % self.description_loc) Processed search databases KEGG db: None KOfam db: None KOfam KO list: None UniRef db: None Pfam db: None dbCAN db: None RefSeq Viral db: None MEROPS peptidase db: None VOGDB db: None

Descriptions of search database entries Pfam hmm dat: None dbCAN family activities: None VOG annotations: None

Description db: None

DRAM distillation sheets Genome summary form: None Module step form: None ETC module database: None Function heatmap form: None AMG database: None

alisDRI avatar Mar 22 '22 19:03 alisDRI

Hi @rmFlynn,

I ran the code as you suggested "DRAM-setup.py print_config" and was able to see the location of the database and then changed the location as it was in this link Moving your DRAM database.

pulidofabs avatar Mar 22 '22 19:03 pulidofabs

Hi @pulidofabs and @rmFlynn

Unfortunately, The solution mentioned by @pulidofabs did not help. I am still getting this error:

DRAM-setup.py set_database_locations --kofam_hmm_loc /home/alis/DRAM_database_files/profiles.tar.gz --update_description_db /home/alis/anaconda3/envs/DRAM/lib/python3.9/site-packages/mag_annotator/database_handler.py:51: UserWarning: Database does not exist at path None warnings.warn('Database does not exist at path %s' % self.description_loc)

I would appreciate it if you could please help. Thank you

alisDRI avatar Mar 23 '22 00:03 alisDRI

Try upgrading dram or use the fix from issue 152. Let me know your dram version DRAM-setup.py version and the output file fix_me.txt from DRAM-setup.py export_config --output_file fix_me.txt.

rmFlynn avatar Mar 23 '22 00:03 rmFlynn

Hi @rmFlynn

Thank you for your prompt reply. Here is the error:

2022-03-23 11:45:32.239066: Database preparation started 0:00:02.435158: dbCAN database processed 1:40:27.374766: UniRef database processed 2:25:16.347554: PFAM database processed 2:25:28.864731: RefSeq viral database processed 2:26:01.060781: MEROPS database processed 2:27:15.397391: VOGdb database processed 2:30:37.810810: KOfam database processed 2:30:37.845390: KOfam ko list processed 2:30:37.845459: PFAM hmm dat processed 2:30:37.845507: dbCAN fam activities processed 2:30:37.845527: VOGdb annotations processed 2:30:37.845545: DRAM databases and forms downloaded 2:30:37.856631: Files moved to final destination Traceback (most recent call last): File "/home/alis/anaconda3/envs/DRAM/bin/DRAM-setup.py", line 158, in args.func(**args_dict) File "/home/alis/anaconda3/envs/DRAM/lib/python3.9/site-packages/mag_annotator/database_processing.py", line 375, in prepare_databases db_handler.set_database_paths(**output_dbs) File "/home/alis/anaconda3/envs/DRAM/lib/python3.9/site-packages/mag_annotator/database_handler.py", line 104, in set_database_paths self.db_locs['kofam_ko_list'] = check_exists_and_add_to_location_dict(kofam_ko_list_loc, File "/home/alis/anaconda3/envs/DRAM/lib/python3.9/site-packages/mag_annotator/database_handler.py", line 101, in check_exists_and_add_to_location_dict raise ValueError("Database location does not exist: %s" % loc) ValueError: Database location does not exist: /data/alis/DRAM_database/kofam_ko_list.tsv

Here is the output of the DRAM-setup.py print_config

Processed search databases KEGG db: None KOfam db: /data/alis/DRAM_database_files/profiles.tar.gz KOfam KO list: None UniRef db: None Pfam db: None dbCAN db: None RefSeq Viral db: None MEROPS peptidase db: None VOGDB db: None

Descriptions of search database entries Pfam hmm dat: None dbCAN family activities: None VOG annotations: None

Description db: None

DRAM distillation sheets Genome summary form: None Module step form: None ETC module database: None Function heatmap form: None AMG database: None

DRAM-setup.py version 1.3.4

Out of the fix_me.txt

{"kegg": null, "kofam": "/data/alis/DRAM_database_files/profiles.tar.gz", "kofam_ko_list": null, "uniref": null, "pfam": null, "dbcan": null, "viral": null, "peptidase": null, "vogdb": null, "pfam_hmm_dat": null, "dbcan_fam_activities": null, "vog_annotations": null, "genome_summary_form": null, "module_step_form": null, "etc_module_database": null, "function_heatmap_form": null, "amg_database": null, "description_db": "None"}

Here is the script that I am trying to run:

DRAM-setup.py prepare_databases --verbose --keep_database_files --output_dir /data/alis/DRAM_database --uniref_loc /home/alis/DRAM_database_files/uniref90.fasta.gz --pfam_loc /home/alis/DRAM_database_files/Pfam-A.full.gz --pfam_hmm_dat /home/alis/DRAM_database_files/Pfam-A.hmm.dat.gz --kofam_hmm_loc /home/alis/DRAM_database_files/profiles.tar.gz --kofam_ko_list_loc /home/alis/DRAM_database_files/kofam_ko_list.tsv.gz --dbcan_loc /home/alis/DRAM_database_files/dbCAN-HMMdb-V10.txt --dbcan_fam_activities /home/alis/DRAM_database_files/CAZyDB.07292021.fam-activities.txt --vogdb_loc /home/alis/DRAM_database_files/vog.hmm.tar.gz --vog_annotations /home/alis/DRAM_database_files/vog.annotations.tsv.gz --viral_loc /home/alis/DRAM_database_files/viral_merged.protein.faa --peptidase_loc /home/alis/DRAM_database_files/pepunit.lib --genome_summary_form_loc /home/alis/DRAM/data/genome_summary_form.tsv --module_step_form_loc /home/alis/DRAM/data/module_step_form.tsv --etc_module_database_loc /home/alis/DRAM/data/etc_module_database.tsv --function_heatmap_form_loc /home/alis/DRAM/data/function_heatmap_form.tsv --amg_database_loc /home/alis/DRAM/data/amg_database.tsv

Thank you

alisDRI avatar Mar 23 '22 22:03 alisDRI

Hmm put this config in a file like fix1.txt

{"kegg": null, "kofam": null, "kofam_ko_list": null, "uniref": null, "pfam": null, "dbcan": null, "viral": null, "peptidase": null, "vogdb": null, "pfam_hmm_dat": null, "dbcan_fam_activities": null, "vog_annotations": null, "genome_summary_form": null, "module_step_form": null, "etc_module_database": null, "function_heatmap_form": null, "amg_database": null, "description_db": null}

Then run DRAM-setup.py import_config --config_loc fix1.txt and try the same command.

rmFlynn avatar Mar 23 '22 23:03 rmFlynn

Actualy first try to do this gunzip /home/alis/DRAM_database_files/kofam_ko_list.tsv.gz /data/alis/DRAM_database/kofam_ko_list.tsv see if that works

rmFlynn avatar Mar 23 '22 23:03 rmFlynn

@rmFlynn I tried the gunzip /home/alis/DRAM_database_files/kofam_ko_list.tsv.gz and I am getting this error gunzip /home/alis/DRAM_database_files/kofam_ko_list.tsv gzip: /home/alis/DRAM_database_files/kofam_ko_list.tsv: unknown suffix -- ignored

Something is wrong with the gunzip tool?!

alisDRI avatar Mar 24 '22 02:03 alisDRI

No, I just forgot gunzip args unzip /home/alis/DRAM_database_files/kofam_ko_list.tsv.gz I do think there is something wrong with that part of the script. I will need to look at it in the morning, sadly.

rmFlynn avatar Mar 24 '22 02:03 rmFlynn

I see the problem, can you move /home/alis/DRAM_database_files/kofam_ko_list.tsv.gz to /data/alis/DRAM_database/kofam_ko_list.tsv.gz, and still use /data/alis/DRAM_database/ as the output location? It may error because its location is not empty, but I think it will be fine, apparently I need to test this more.

rmFlynn avatar Mar 24 '22 02:03 rmFlynn

@rmFlynn

I tried to run the DRAM setup.py after moving the kofam_ko_list.tsv.gz to /data/alis/DRAM_database It got mad at me. It's telling me that the file exists.

Do you think changing all the /home/alis paths to /data/alis (same as the DRAM_database root) and re-runing the DRAM setup.py again could help?

alisDRI avatar Mar 24 '22 02:03 alisDRI

No, I need to do a patch one line will fix the problem, thank you for your patience.

That said, you could try: let the setup process start, then unzip the file and move it to the destination directory. or Let this one file be downloaded if possible.

rmFlynn avatar Mar 24 '22 03:03 rmFlynn

OK, I'll try it.

alisDRI avatar Mar 25 '22 02:03 alisDRI

@rmFlynn

Hi, Thank you for your help. I was able to fix the problem. I simply transferred the kofam_ko_list.tsv.gz and Vog.annotation.tsv.gz file to the folder that asked DRAM to build the databases. I unzipped the files and worked :). I left a copy of these files in the source folder as well.

alisDRI avatar Mar 29 '22 21:03 alisDRI

Thanks for letting me know that that worked out, and thank you for using dram and helping us improve it. I'll be eager to get this issue fixed for future versions!

rmFlynn avatar Mar 29 '22 21:03 rmFlynn

One question:

Where can I get this kofam_ko_list.tsv.gz file? I downloaded a text file from the Kofam database called ko_list then I converted that file to a tsv file.

Alireza Saidi-Mehrabad, Ph. D. Postdoctoral Scholar @.*** Division of Hydrological Sciences Desert Research Institute 755 E. Flamingo Rd. Las Vegas, NV 89119 Office: 702-8625469


From: Rory M Flynn @.> Sent: Wednesday, March 23, 2022 4:33 PM To: WrightonLabCSU/DRAM @.> Cc: Ali Saidi-Mehrabad @.>; Comment @.> Subject: Re: [WrightonLabCSU/DRAM] Database does not exist at path %s' % self.description_loc (Issue #157)

Actualy first try to do this gunzip /home/alis/DRAM_database_files/kofam_ko_list.tsv.gz /data/alis/DRAM_database/kofam_ko_list.tsv see if that works

— Reply to this email directly, view it on GitHubhttps://github.com/WrightonLabCSU/DRAM/issues/157#issuecomment-1076918668, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AYLTHFVTUKGSKVYRLLATUALVBOS3ZANCNFSM5Q5CRZDQ. You are receiving this because you commented.Message ID: @.***>

PUBLIC RECORDS NOTICE: In accordance with NRS Chapter 239, this email and responses, unless otherwise made confidential by law, may be subject to the Nevada Public Records laws and may be disclosed to the public upon request.

alisDRI avatar Oct 11 '22 08:10 alisDRI

Get the ko-list from 'ftp://ftp.genome.jp/pub/db/kofam/ko_list.gz' you just need to unzip it.

rmFlynn avatar Oct 11 '22 14:10 rmFlynn