I want to translate a sequence which I have already parsed the translation table from the genbank file.
My code works on some of the files, but in one file I have tranlation table = 24 and I'm getting the following error:
codon_table = CodonTable.ambiguous_generic_by_id[table_id]
KeyError: 24
The following is my code:
with open(file, 'r') as inF:
for line in inF:
if '/transl_table' in line:
l=line.split('=')
#I extracted already the gene sequence...
protein=gene.translate(table=l[1])
What is the cause of this error and how to solve it?
always show the actual error that you get
this is the error :