[Biopython-dev] [Bug 2381] translate and transcibe methods for the Seq object (in Bio.Seq)

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Tue Nov 4 12:28:56 UTC 2008


http://bugzilla.open-bio.org/show_bug.cgi?id=2381





------- Comment #29 from biopython-bugzilla at maubp.freeserve.co.uk  2008-11-04 07:28 EST -------
(In reply to comment #28)
> (In reply to comment #27)
> > Created an attachment (id=1032)
 --> (http://bugzilla.open-bio.org/attachment.cgi?id=1032&action=view) [details] [details]
> > Docstring:
> > 
> >         init - Boolean, defaults to False.  Should translation check the
> >                first codon is a valid initiation (start) codon and translate
> >                it as methionine (M)?  If False, nothing special is done with
> >                the first codon.
> 
> I don't like the name 'init' :( it would be better to use an argument with the
> word 'force' in it. E.g.: force_has_coding, force_first_position, etc..

Maybe - but I don't think force_has_coding, force_first_position are any
clearer, and they are very long.  Do you like "with_start_codon" or
"with_init_codon"?

Note that I used "init" rather than "initiation (codon)" because python already
uses init as shorthand for initiation/initialisation.

> If you didn't have read this discussion in this bug report, it is not very
> clear what happens when init=True and why.

If it have been called "start" or "from_start" or "start_codon" the meaning
isn't clear either - you might "start" or expect "from_start" to take an
integer location, and start_codon to take a three letter string.

> You should add a description of why there is this options in the docstring.

OK - That makes sense.

> > 
> > Example usage of the translate function,
> > 
> > >>> from Bio.Seq import translate
> > >>> translate("TTGAAACCCTAG")
> > 'LKP*'
> > >>> translate("TTGAAACCCTAG", init=True, to_stop=True)
> > 'MKP'
> 
> Without having read the discussion in this bug report, I was expecting an
> exception here.. why does it forces a Methionine to be in the first position? 
> It loses the information of a Leu in the first position.

Because if this was a CDS using an alternative start codon of TTG it would be
translated as a methionine and NOT as a leucine (because instead of a typical
tRNA-Leu, an initiation tRNA is used).  This is whole point of this optional
argument.  If you want TTG translated blindly as M, don't use the init argument
(or set it to False).

See also http://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi which
explicitly lists these alternative codons as giving M when used as starts, e.g.

    AAs  = FFLLSSSSYY**CC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG
  Starts = ---M---------------M---------------M----------------------------
  Base1  = TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
  Base2  = TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
  Base3  = TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG

Peter


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the Biopython-dev mailing list