[Bioperl-l] PrimarySeq::length

Hilmar Lapp hlapp@gnf.org
Fri, 11 Oct 2002 00:34:50 -0700


I changed this to possibly function as a real attribute. I.e., you 
can set a value and it will then return this value in get mode. (If 
you don't set a value it will still report the length of what seq() 
returns.)

This is useful especially if you don't want to keep the actual 
sequence around (for memory efficiency for instance, or because you 
told the SeqBuilder not to parser the sequence). To this end, there 
is now also a parameter -length you can supply to new().

I also changed seq() such that it allows setting to undef. Note that 
if you set seq to something not undef and different from the 
previous value, a previously set length() attribute will be 
invalidated (you need to set it again if you still want it).

There was discussion a while ago regarding PrimarySeqIs without a 
sequence (VirtualSeq, EmptySeq, etc) ... I'm not convinced we need a 
separate class to allow this, but people should note that a format 
writer is not required to be able to cope with an empty sequence.

	-hilmar
--
-------------------------------------------------------------
Hilmar Lapp                            email: lapp at gnf.org
GNF, San Diego, Ca. 92121              phone: +1-858-812-1757
-------------------------------------------------------------