pharokka
pharokka copied to clipboard
KeyError: 'Name contig'
- pharokka version: 1.6.1
- Python version: Python 3.10.8
- Operating System: Ubuntu 22.04.3 LTS
Description
Dear Developer! Could you clarify please. What does this error mean?
2024-02-01 13:48:24.337 | INFO | __main__:main:379 - Post Processing Output.
Traceback (most recent call last):
File "/home/mambaforge/envs/pharokka_env/bin/pharokka.py", line 7, in <module>
exec(compile(f.read(), __file__, 'exec'))
File "/home/pharokka/bin/pharokka.py", line 499, in <module>
main()
File "/home/pharokka/bin/pharokka.py", line 412, in main
pharok.get_contig_name_lengths()
File "/home/pharokka/bin/post_processing.py", line 445, in get_contig_name_lengths
transl_table = transl_table_dict[record.id]
KeyError: 'NODE_2112_length_1290_cov_26.021364'
What I Did
pharokka.py -i /home/My_data/contigs_500.fasta -o /home/My_data/Results -d /home/pharokka/DB -t 64 -e 0.00001 -m -g prodigal-gv
Hi @SergeyBaikal ,
Looks like a bug with contig names in the post processing (looks like spades output). I think it is because that contig is too short to have a gene, which is breaking parsing pyrodigal-gv.
I would recommend filtering that contig out for now while I look into this bug (or all really short ones under say 2 or 3 kb).
George
Dear George Thanks for the reply, I'll check it out.
It really helped.
Awesome. I am planning on doing some bug fixing next week for pharokka, so I will try and fix it next week regardless.
George