[BioPython] Rethinking Seq objects
Michiel Jan Laurens de Hoon
mdehoon at ims.u-tokyo.ac.jp
Sat May 7 01:25:28 EDT 2005
bneron at pasteur.fr wrote:
> just an exemple:
>
> Python 2.3.4 (#1, Mar 11 2005, 17:34:27)
> [GCC 3.3.5 (Gentoo Linux 3.3.5-r1, ssp-3.3.2-3, pie-8.7.7.1)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>
>>>>from Bio.Seq import Seq
>>>>from Bio import Translate
>>>>from Bio.Alphabet import IUPAC
>>>>my_alpha = IUPAC.unambiguous_dna
>>>>my_seq_upper = Seq('GATCGATGGGCCTATTAGGATCGAAAATCGC', my_alpha)
>>>>my_seq_lower = Seq('gatcgatgggcctattaggatcgaaaatcgc', my_alpha)
>>>>standard_translator = Translate.unambiguous_dna_by_id[1]
>>>>standard_translator.translate(my_seq_upper)
>
> Seq('DRWAY*DRKS', HasStopCodon(IUPACProtein(), '*'))
>
>>>>standard_translator.translate(my_seq_lower)
>
> Seq('**********', HasStopCodon(IUPACProtein(), '*'))
>
>
> obviously the lower case doesn't work in the Seq object.
I agree, this should be corrected. The translate and transcribe methods should
work with both uppercase and lowercase.
--Michiel.
--
Michiel de Hoon, Assistant Professor
University of Tokyo, Institute of Medical Science
Human Genome Center
4-6-1 Shirokane-dai, Minato-ku
Tokyo 108-8639
Japan
http://bonsai.ims.u-tokyo.ac.jp/~mdehoon
More information about the BioPython
mailing list