[BioPython] codons and complements
Iddo Friedberg
idoerg@cc.huji.ac.il
Wed, 13 Oct 1999 10:10:29 +0200 (GMT+0200)
On Tue, 12 Oct 1999, Andrew Dalke wrote:
: Iddo Friedberg <idoerg@cc.huji.ac.il> said:
: > [...]
: > Also, there are other mistranslations of specific codons, which are
: > environment-dependent. The user/caller should handle that.
:
: Then this means there is no (simple) generic function function which
: will do the correct translation?
No, there isn't.
: If so, I'm willing to defer the
: problem to a "selenocysteine_translate" or "environment_translate"
: function which deals with these cases, and let the translate only
: be concerned about 1 to 1 (or 3 to 1 :) mappings between nucleotides
: and proteins.
:
: Ummm, but then this lead us naturally to wanting "translate" be
: a method of the object, since that knows the environment the best.
: And I am still convinced that it shouldn't be a method, since that
: makes the object more complicated than I think it needs to be.
:
Context-dependent translations are in the realm of a user-written
application, since they are within the milieu of the user's system. As
pointed out, biopython cannot, and should not, cover all contextual cases.
What about RNA editing, when the central dogma of molecular biology is
"violated", and there is an information change at the mRNA level? (DNA !~
mRNA, where ~ is the standard transcription process, and !~ the negation
of that; ergo, the translated sequence is different than expected, because
of a change in the standard transcription process).
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. This is good for most cases. We can write a couple of "special"
translates, as functions; but special translate functions should really be
up to the user.
My proposal: translate is a method, special translates are user-written
functions.
:
: > Once you have a sequence with a '*' in it, it reallystops having
: > any biological meaning. So it shouldn't be made into a PEPSeq object
: > anyhow. (Which, as I opined last week, should be the output of the
: > translate method: not a string, but a PEPSeq instantiation).
:
: BTW, I now strongly agree with your opinion.
Actually, I now agree with Thomas' :-) But they're converging. Also, your
scheme supports the '*' character, so what the heck.
Iddo
--
/* --- */main(c){float t,x,y,b=-2,a=b;for(;b-=a>2?.1/(a=-2):0,b<2;
/* | */putchar(30+c),a+=.0503) for(x=y=c=0;++c<90&x*x+y*y<4;y=2*
/* | */x*y+b,x=t)t=x*x-y*y+a;}
/* --- ddo Friedberg */