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

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

Open
yyyuechen opened this issue Jan 29, 2024 · 1 comment
Open

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

yyyuechen opened this issue Jan 29, 2024 · 1 comment

Comments

@yyyuechen
Copy link

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
Copy link
Author

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

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