[Bioperl-l] Re: translation using Bioperl

Andrew Dalke dalke@acm.org
Fri, 28 Jul 2000 00:04:11 -0600

Heikki Lehvaslaiho 
>Andrew Dalke (that's me!):
>> Short answer, I agree except that it's impossible for bioperl, as
>> a library, to do this.  It is the responsibility of users of library
>> to decide what to do when the first codon isn't a start codon.
>> The difficulty is knowing the "perhaps" part.  Detail below.

>I think I have to disagree here. In my opinion, these libraries have a
>two equally important roles:
>1. To give default 'computational' behaviour
>   (e.g blindly translate any nucleotide sequence).
>2. Have enough biological sense to give results identical to
>   sequence repositories (EMBL, GenBank, DDBJ).
>   (e.g. translate a valid CDS correctly)

You are correct.  Point (2) is used enough that it should be a library
function, even though other people may have different needs and even
though it doesn't have good algebraic properties.  I think both functions
should exist, with the (2) function building off of (1), where possible.
That allows others with different needs to call the (1) function but put
their own actions in on top of it (like issuing warnings).

> Add one more optional, boolean argument, $fullCDS, to method translate. 

Why not just have two functions?  Otherwise you get a complex interface,
and you don't design things so subcomponents are reusable.