[Bioperl-l] zero length sequence in PrimarySeq
Heikki Lehvaslaiho
heikki@ebi.ac.uk
Wed, 14 Mar 2001 10:26:49 +0000
Since Bio::PrimarySeq is one of the most important classes in BioPerl, read
carefully the the following:
If you reset the sequence of a PrimarySeq to a zero length after first
setting it to some value and you had not set moltype, method _guess_type
got called and threw an exception. I've now fixed it in both 07 branch and
main trunk by conditionally calling _guess_type only if the sequence ne ''.
One could argue that one should always set the moltype but I think that is
expecting a bit too much from a casual user.
One alternative would be for _guess_type to silently do nothing rather than
throw an exception.
If you feel that some other implementation of the fix is better than the
one I did, feel free to change the code, but please keep the functionality.
-Heikki
--
______ _/ _/_____________________________________________________
_/ _/ http://www.ebi.ac.uk/mutations/
_/ _/ _/ Heikki Lehvaslaiho heikki@ebi.ac.uk
_/_/_/_/_/ EMBL Outstation, European Bioinformatics Institute
_/ _/ _/ Wellcome Trust Genome Campus, Hinxton
_/ _/ _/ Cambs. CB10 1SD, United Kingdom
_/ Phone: +44 (0)1223 494 644 FAX: +44 (0)1223 494 468
___ _/_/_/_/_/________________________________________________________