[BioPython] Trying to transcribe RNA = error?
Martin MOKREJŠ
mmokrejs at ribosome.natur.cuni.cz
Wed Jul 16 13:20:48 UTC 2008
Peter Cock wrote:
> I wrote:
>>> You could do my_seq.reverse_complement().transcribe() if you did want
>>> the other strand transcribed.
>
> Actually right now the Seq object doesn't have a transcribe method
> (but I think maybe it should, see Bug 2381). In the meantime, you
> would have to use either of these:
>
> from Bio.Seq import transcribe, reverse_complement
> print transcribe(reverse_complement(my_seq))
> print transcribe(my_seq.reverse_complement())
>
> Martin wrote:
>> Exactly, to get rid of this I would see some advantage to have
>> transcribe() which is more intuitive but only if it would be able to cope
>> with reverse strand as well.
>
> You would really prefer a single function call to do a combined
> "transcribe reverse-complement" or "transcribe the other strand" over
> doing the reverse complement and transcription in two steps?
Yes, a single function handling arguments would be nice.
>
> e.g.
> print transcribe(my_seq, use_reverse_complement=True)
>
> or,
> print transcribe(my_seq, strand=-1)
>
> or, maybe:
> print transcribe_rc(my_seq)
This one handling optional argument strand with default value -1,
but accepting [-1, 1, +1, 'watson', 'crick']. Ideally extended
in the future to splice-out the single intron by default or raise
an exception unless told to remove introns a,c,d,e or maybe instructed
to keep specific exons ... I am not sure what one would need more
often. I haven't checked but guess that GenBank files have more
often annotated introns and the exon region are more deeply buried
in the file structure so probably the first would impose less work
onto the parser.
Martin
More information about the Biopython
mailing list