WrightonLabCSU / DRAM

Distilled and Refined Annotation of Metabolism: A tool for the annotation and curation of function for microbial and viral genomes
GNU General Public License v3.0
239 stars 50 forks source link

key error: K01566 when using DRAM-v.py annotate #328

Open yyyuechen opened 5 months ago

yyyuechen commented 5 months ago

Hi, Thank you so much for providing this powerful tool,I got an error when using DRAM-v.py annotate. My command line is :

DRAM.py annotate -i '/ibex/project/c2252/Chimneys/trim/Metabat/bins/2_bins_dir/2_good_bins/*.fa' -o /ibex/project/c2252/Chimneys/trim/DRAM/2_bis_DRAM_annotation --min_contig_size 1000

2_good_bins contains 6 .fa files in total

The log file shows: Loading module for DRAM DRAM 1.4.6 is now loaded 2024-01-28 15:11:24,341 - The log file is created at /ibex/project/c2252/Chimneys/trim/DRAM/2_bis_DRAM_annotation/annotate.log. 2024-01-28 15:11:24,349 - 2 FASTAs found 2024-01-28 15:11:24,365 - Starting the Annotation of Bins with database configuration:

2024-01-28 15:11:24,374 - Retrieved database locations and descriptions 2024-01-28 15:11:24,374 - Annotating 2_bac_Gammaproteobacteria_bin.16 2024-01-28 15:11:44,631 - Turning genes from prodigal to mmseqs2 db 2024-01-28 15:11:46,933 - Getting hits from kofam Traceback (most recent call last): File "/ibex/sw/csi/dram/1.4.6/el7.9_conda/miniconda3/envs/DRAM/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 3802, in get_loc return self._engine.get_loc(casted_key) File "pandas/_libs/index.pyx", line 138, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/index.pyx", line 165, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/hashtable_class_helper.pxi", line 5745, in pandas._libs.hashtable.PyObjectHashTable.get_item File "pandas/_libs/hashtable_class_helper.pxi", line 5753, in pandas._libs.hashtable.PyObjectHashTable.get_item KeyError: 'K01566' The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/ibex/sw/csi/dram/1.4.6/el7.9_conda/miniconda3/envs/DRAM/bin/DRAM.py", line 207, in args.func(**args_dict) File "/ibex/sw/csi/dram/1.4.6/el7.9_conda/miniconda3/envs/DRAM/lib/python3.10/site-packages/mag_annotator/annotate_bins.py", line 1513, in annotate_bins all_annotations = annotate_fastas( File "/ibex/sw/csi/dram/1.4.6/el7.9_conda/miniconda3/envs/DRAM/lib/python3.10/site-packages/mag_annotator/annotate_bins.py", line 1394, in annotate_fastas annotate_fasta( File "/ibex/sw/csi/dram/1.4.6/el7.9_conda/miniconda3/envs/DRAM/lib/python3.10/site-packages/mag_annotator/annotate_bins.py", line 1239, in annotate_fasta annotations = annotate_orfs( File "/ibex/sw/csi/dram/1.4.6/el7.9_conda/miniconda3/envs/DRAM/lib/python3.10/site-packages/mag_annotator/annotate_bins.py", line 1009, in annotate_orfs run_hmmscan( File "/ibex/sw/csi/dram/1.4.6/el7.9_conda/miniconda3/envs/DRAM/lib/python3.10/site-packages/mag_annotator/utils.py", line 210, in run_hmmscan return formater(hits) File "/ibex/sw/csi/dram/1.4.6/el7.9_conda/miniconda3/envs/DRAM/lib/python3.10/site-packages/mag_annotator/annotate_bins.py", line 344, in kofam_hmmscan_formater hits_sig = sig_scores(hits, hmm_info) File "/ibex/sw/csi/dram/1.4.6/el7.9_conda/miniconda3/envs/DRAM/lib/python3.10/site-packages/mag_annotator/utils.py", line 250, in sig_scores row = score_db.loc[i] File "/ibex/sw/csi/dram/1.4.6/el7.9_conda/miniconda3/envs/DRAM/lib/python3.10/site-packages/pandas/core/indexing.py", line 1073, in getitem return self._getitem_axis(maybe_callable, axis=axis) File "/ibex/sw/csi/dram/1.4.6/el7.9_conda/miniconda3/envs/DRAM/lib/python3.10/site-packages/pandas/core/indexing.py", line 1312, in _getitem_axis return self._get_label(key, axis=axis) File "/ibex/sw/csi/dram/1.4.6/el7.9_conda/miniconda3/envs/DRAM/lib/python3.10/site-packages/pandas/core/indexing.py", line 1260, in _get_label return self.obj.xs(label, axis=axis) File "/ibex/sw/csi/dram/1.4.6/el7.9_conda/miniconda3/envs/DRAM/lib/python3.10/site-packages/pandas/core/generic.py", line 4056, in xs loc = index.get_loc(key) File "/ibex/sw/csi/dram/1.4.6/el7.9_conda/miniconda3/envs/DRAM/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 3804, in get_loc raise KeyError(key) from err KeyError: 'K01566'

for the output file: and for the output files, while I have 6 files in 2_good_bins, the result has only the first files which is 2_bac_Gammaproteobacteria_bin.16

Do you have any suggestions to solve this problem? Thanks in advance.

yyyuechen commented 4 months ago

hello people that fall into the same hole as I did: I tried DRAM1.5 and all issue solved