[BioPython] codons and complements

Jeffrey Chang jchang@SMI.Stanford.EDU
Wed, 13 Oct 1999 09:17:05 -0700 (PDT)


> So: maybe just the simple "translate" (read past stop codons, use
> standard-or-passed-code-table, do _no_ check for modulu 3) should be a
> method.

These defaults seem reasonable to me.


> My proposal: translate is a method, special translates are user-written
> functions. 

I'm still a little bit uncomfortable with this.  Translating a sequence
with the wrong genetic code would be meaningless.  Thus, having a
translate method on a sequence object implies that the genetic code should
be carried around as well.  This may be superfluous to people's use of the
object, or at worst, unnecessarily force someone to look up the proper
code for the sequence to preserve the semantics of the object.

For example, I'm currently working with genetic sequences from many
different organisms, and do not know or care whether they use the standard
alphabet.  It's irrelevant to my current research.  Thus, if there were a
translate method on the sequence object, I (or somebody using my objects)
would not know whether it's proper to use.  A solution would be to embed
the genetic code as part of the sequence object, so that the translate
method always worked properly, but that means I'd have to look up the
code, even if it weren't relevant to how I use the object.

Jeff