19 Nov 04:03
PrimarySeq properties in LocatableSeqs
From: Mark A. Jensen <maj <at> fortinbras.us>
Subject: PrimarySeq properties in LocatableSeqs
Newsgroups: gmane.comp.lang.perl.bio.general
Date: 2008-11-19 03:05:34 GMT
Subject: PrimarySeq properties in LocatableSeqs
Newsgroups: gmane.comp.lang.perl.bio.general
Date: 2008-11-19 03:05:34 GMT
Gurus- 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
RSS Feed