You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FragGeneScanPlus makes an error when translating protein fragments in negative frames, as it doesn't transform the sequence to its inverse complement before translating.
Attached to this issue is a small FASTA file, which is wrongly translated to:
#!/usr/bin/env python3fromBioimportSeqIOseq=SeqIO.read('test_fasta.txt', 'fasta').seqprint('Translating the following sequence with length {}:'.format(len(seq)))
print('\n{}\n\n'.format(seq))
print('Performing 6-frame translation:\n')
fors, strandin ((seq, 1), (seq.reverse_complement(), -1)):
forframeinrange(3):
print('{:+2d}: {}'.format((frame+1) *strand, s[frame:].translate(table=11)))
print()
# Known ORF on the negative strand (visible in the 6-frame translation on -3)orf_start=28orf_stop=348orf=seq[(orf_start+2):orf_stop]
print('Solution FragGeneScanPlus:\n{}\n'.format(orf.translate(table=11)))
orf=orf.reverse_complement()
print('Correct solution (using reverse complement of ORF):\n{}\n'.format(orf.translate(table=11)))
The text was updated successfully, but these errors were encountered:
I found the cuplrit, which I think would be solved with PR #15, which I sent in some time ago. More specifically, it's thanks to the if-else checking the strand in print_outputs()
FragGeneScanPlus makes an error when translating protein fragments in negative frames, as it doesn't transform the sequence to its inverse complement before translating.
Attached to this issue is a small FASTA file, which is wrongly translated to:
While the solution should be:
Full test example:
Generating code (don't forget test_fasta.txt):
The text was updated successfully, but these errors were encountered: