[BioPython] Translation method for Seq object

Peter biopython at maubp.freeserve.co.uk
Mon Oct 13 15:27:37 UTC 2008


So I did manage to leave off at least one other option from my short list :)

Michiel de Hoon wrote:
>
> (f) Use .translate both for the Python .translate and for the Biopython .translate.
>
> S.translate() ===> Biopython .translate
>
> S.translate(table [,deletechars]) ===> Python .translate
>
> We can tell from the presence or absence of arguments whether the user intends Python's translate or Biopython's translate.

Sadly its not quite that simple.

For a biological translation we'd probably want to offer optional
arguments for at least the codon table and stop symbol (like the
current Bio.Seq.translate() function), with other further arguments
possible (e.g. to treat the sequence as a complete CDS where the start
codon should be validated and taken as M).

It would still be possible to automatically detect which translation
was required, but it wouldn't be very nice.  So overall I'm not keen
on this approach.

Peter



More information about the Biopython mailing list