[Bioperl-l] PrimarySeq properties in LocatableSeqs

Mark A. Jensen maj at fortinbras.us
Tue Nov 18 22:05:34 EST 2008

I ran into a interesting 'bug' while taking slices of a
Bio::SimpleAlign. I had set the primary_id of the original
LocatableSeqs while constructing the aln. When the slice is 
delivered using Bio::SimpleAlign::slice(), the primary_id's didn't 
travel with the subseqs constructed for the subalignment, and this
hammered subsequent manipulations with the subalignment.
Inspecting slice(), I saw that the new objects created for the subseqs 
get the id (display_id) from the old, but that other properties 
with valid accessors in the base class are not passed along, which
seemed a bit arbitrary. Course, I can set the other properties after
the slice is delivered, but that seems kludgy, and the bug was strange
and led to 'time spent in deeper understanding of BioPerl'.
What is the philosophy: Could/should all fields/properties from the
base classes be generally inherited when constructing an new derived 
object from an old one?
cheers, Mark

More information about the Bioperl-l mailing list