[BioPython] one function, two behaivors
Sebastian Bassi
sbassi at gmail.com
Sat Jun 28 14:46:45 UTC 2008
If I invoke "transcribe" with a RNA sequence like this:
>>> from Bio.Seq import transcribe
>>> from Bio.Seq import Seq
>>> import Bio.Alphabet
>>> rna_seq = Seq('CCGGGUU',Bio.Alphabet.IUPAC.unambiguous_rna)
>>> transcribe(rna_seq) # Look!, I am "transcribing a RNA"
Seq('CCGGGUU', RNAAlphabet())
But I can't "transcribe" a RNA sequence if I invoke it this way:
>>> from Bio import Transcribe
>>> transcriber = Transcribe.unambiguous_transcriber
>>> transcriber.transcribe(rna_seq)
Traceback (most recent call last):
File "<pyshell#13>", line 1, in <module>
transcriber.transcribe(rna_seq)
File "/usr/local/lib/python2.5/site-packages/Bio/Transcribe.py",
line 13, in transcribe
"transcribe has the wrong DNA alphabet"
AssertionError: transcribe has the wrong DNA alphabet
The same result I get when using "translate". What is the rationale behind this?
--
Curso Biologia Molecular para programadores: http://tinyurl.com/2vv8w6
Bioinformatics news: http://www.bioinformatica.info
Tutorial libre de Python: http://tinyurl.com/2az5d5
More information about the Biopython
mailing list