Hi, when executing the following code:
from Bio.SeqUtils import six_frame_translations
blah = six_frame_translations("ATCGATCGATCG")
print(blah)
I get the following error:
File "C:\Python32\lib\site-packages\Bio\SeqUtils\__init__.py", line 263, in six_frame_translations
frames[-(i+1)] = reverse(translate(anti[i:], genetic_code))
NameError: global name 'reverse' is not defined
I am using Python 3.23, Biopython 1.59
Any suggestions? Thanks,
Charles
the reverse function is broken in Python 3.X, BioPython has a reverse_complement function (http://biopython.org/DIST/docs/tutorial/Tutorial.html#htoc23) and the translation function (http://biopython.org/DIST/docs/tutorial/Tutorial.html#htoc25) so you can easily built a function to call all six frames and produce the respective translations.