[Bioperl-l] Re: translation using Bioperl
Wed, 26 Jul 2000 13:07:46 +0100
Add one more optional, boolean argument, $fullCDS, to method
If it is true:
1. Check and replace the initial amino acid.
2. Remove the trailing stop character
Note that this is the default behaviour now. In my opinion ,
the trailing stops should be left there by default.
3. Warn if a) first codon is not a valid initiator
b) last codon is not a stop
At first glance, sounds okay except for the last point. My comments are
1) If you can put up rules having certain consequences, that is, if
there is a contract, and the rules are not met, this is an exception.
So, don't warn, but throw an exception. I wonder how you want to catch a
warning programmatically and react upon it properly.
2) The conditions you are mentioning in 3) sound like a validation. So,
one (the user) might like to validate whether a given sequence could be
a full CDS. If a sequence does not pass this validation, translate()
with $fullCDS == 1 should throw an exception. The validation may be even
a method offered by a module other than PrimarySeqI, maybe even
CodonTable, but that's just a first guess.