[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 14:44:15 UTC 2008


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





------- Comment #31 from dalloliogm at gmail.com  2008-11-04 09:44 EST -------
(In reply to comment #30)
> (In reply to comment #29)
> > (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] [details] [details]
> 
> It's quite a complicated concept, and if we wanted to be completely explicit,
> an option called 'assert_first_codon_is_initiation_and_translate_to_met' would
> be clear, but would be far too long to be sensible.  Most other shorter options
> are either ambiguous, misleading, or ambiguously misleading - largely because
> people will assume that the term means what they want it to mean instead of
> what it does, as described below:
> 
> > 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.
> 
> I am not too worried about long arguments, so 'assert_first_codon_init' would
> be fine for me (though does this mean that the first codon of the sequence
> should be an initiation codon, or that translation should start from the first
> initiation codon?), but I see the drive for, and value of, brevity.  If there's
> a short, unambiguous option name that you can think of, I'm all for it.  An
> option name that is a little cryptic, but not misleading, such as 'init', also
> works for me. 

When I saw 'init' for the first time, I thought there it was some kind of
complicated calculus associated with the translate function, that init=False
was meant to skip in order to have some kind of faster but less accurate
translation.

> I would have to go to the minor effort of typing
> help(seq.translate) to find out what it meant, but it's not very much of a
> chore.


It is also a matter of code readibility; I don't think many people would
understand that init is meant for that by looking at a script.

If I use this option in one of my scripts, and a colleague reads it, I want to
be sure that he will be easily understand that I am forcing the first position
to be a Methionine.
Otherwise, the risk is that he won't understand properly my results.

In which of these examples do you understand that the first position is being
forced to a Methionine?
>>> translate("TTGAAACCCTAG", init=True, to_stop=True)

>>> translate("TTGAAACCCTAG", force_as_translating=True, to_stop=True)

>>> translate("TTGAAACCCTAG", force_methionine=True, to_stop=True)

>>> translate("TTGAAACCCTAG", force_methionine=True, force_stop=True)

>>> translate("TTGAAACCCTAG", alt_start=True, alt_stop=True)

Also, I don't think this option will be used very often. 
So, it shouldn't be a problem if its name is too long to type, and it would be
better if it is easy to understand.


> 
> Also, people learn all kinds of non-standard uses for cryptic terms, all the
> time.  For example, what on earth does 'popen3' mean?  Why not
> open_pipes_with_stdin_stdout_stderr?  'popen3' is short, unambiguous (if not
> immediately obvious),

When I was a python newbie, I really hated the name popen3 :)

> and if you want to know what it means, then help() or a
> dip in the documentation will tell you.  I think the same will be true of
> 'init', so long as no-one is likely to confuse it with some other meaning.
> 
> L.
> 


-- 
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