[Bioperl-l] proposed change to Bio::SeqFeature::Gene::*

Chris Mungall cjm at fruitfly.org
Tue Jun 17 15:08:01 EDT 2003


Are these classes in use yet?

One change I would like to make, which should have no effect on code that
sticks to the documented methods, is to change a minor implementation
detail.

Now if we have a feature type X containing a feature type Y (for example,
X=GeneStructure, Y=transcript), the accessor code looks like:

package Bio::Seqfeature::Gene::X;

sub y {
   return @{shift->{_y} || []};
}


If we change this to:

sub y {
  return grep {$_->primary_tag eq 'y'} $self->sub_SeqFeature;
}

And make corresponding changes to add_y() [which would also rebless the
feature into the required type]

Then I think the code will be both easier to maintain, keep in sync with
the Sequence Ontology. It will also allow code that expects generic
feature hierarchies to use these classes. It will also greatly simplify
mapping to GFF3 and chado.

I certainly don't want to go poking around these classes if it might break
someone's code though.



More information about the Bioperl-l mailing list