[Biopython-dev] [Bug 2618] back_translate method for the Seq object (in Bio.Seq)?
bugzilla-daemon at portal.open-bio.org
bugzilla-daemon at portal.open-bio.org
Thu Oct 16 12:09:23 EDT 2008
http://bugzilla.open-bio.org/show_bug.cgi?id=2618
------- Comment #1 from biopython-bugzilla at maubp.freeserve.co.uk 2008-10-16 12:09 EST -------
Created an attachment (id=1009)
--> (http://bugzilla.open-bio.org/attachment.cgi?id=1009&action=view)
Patch to Bio/Seq.py for back translation
This follows Bio.Translate and simply uses whatever arbitrary unambiguous codon
Bio.Data.CodonTable object supplies via its back_table.
e.g.
>>> from Bio import Seq
>>> Seq("ACBDEF*").back_translate()
Seq('GCUUGUNNNGAUGAGUUUUAA', IUPACAmbiguousRNA())
>>> Seq("ACBDEF*").back_translate().translate()
Seq('ACXDEF*', HasStopCodon(ExtendedIUPACProtein(), '*'))
If instead we want to return ambiguous codons (e.g. "P" -> "CCN"), then
handling of back-transcription of special cases B (R/N) and J (I/L) or Z (E/Q)
could also be improved (here just "NNN" is used).
e.g. For the standard table, "SAR" codes for "Z". I haven't checked if
something this is possible for all B, J and Z for all NCBI codon tables.
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Biopython-dev
mailing list