[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 15:39:42 UTC 2008


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





------- Comment #32 from lpritc at scri.sari.ac.uk  2008-11-04 10:39 EST -------
(In reply to comment #31)
> (In reply to comment #30)

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

True enough, but if someone's already used it, and you don't know what it means
when reading their script, looking it up isn't hard.  What's hard is guessing
which option you need to invoke, and calling help() is one way to do that,
too...

Not that I want to extend this argument to single-letter options with *no*
relevance to their intent ;)

seq.translate(a=True, b='GUG', c=9)

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

Maybe put it in a comment-line?   Even if the colleague understands from the
code *that* you've translated an alternative start to a methionine, they may
not understand *why* - and the comment line is essential, then.

> In which of these examples do you understand that the first position is being
> forced to a Methionine?

None are particularly clear, but only one of them doesn't give me the wrong
idea...

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

Because I've read this thread (or looked at the docs) - I understand this one
;)

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

I don't intuitively understand this.  Does it mean that the sequence should be
translatable?

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

Does this mean that the sequence will be translated from the first methionine
the method finds?

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

As above, and does force_stop mean that you add a '*' to the end of the
translation?  Or that you stop at a stop codon?

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

'alt_start' I would think referred to allowing translation from alternative
start codons.  I don't know what alt_stop would mean...

> Also, I don't think this option will be used very often. 

Maybe not.  The first use case that comes to mind is QA on CDS-finding:

# Check if sequence is CDS:
assert candidate_cds.translate(init=True)
# Check if reported CDS start is valid
assert est[37:].translate(init=True)

A second use case is slower in presenting itself...

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

That's a fair argument, I think.  On the whole, though, I would favour a short,
unambiguous, slightly cryptic name over a very long, unambiguous name, over an
ambiguous name of any length.

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

At least we have subprocess, now. 

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