[Bioperl-l] Re: SeqFeatureI
Hilmar Lapp
hlapp@gmx.net
Tue, 01 Aug 2000 02:05:21 +0200
Ewan Birney wrote:
>
> Hmmm. Quick overview:
>
> # this is what I think should be done:
>
> # SeqFeatureI definition
> $feature->has_tag('tagname');
> @values = $feature->each_tag_value('tagname');
>
> # SeqFeature::Generic allows setting tags
> $feature->add_tag_value('tagname',$value);
>
> I notice that SeqFeatureI does not define each_tag_value (bad!) and that
> has_tag should return 1 or 0 as Hilmar suggests.
>
I've added each_tag_value() to SeqFeatureI (and fixed the doc, there was still
outdated stuff).
Since it's not Java, this probably won't break any code. In
SeqFeature::FeaturePair, even has_tag() was missing as a dummy without anyone
noticing it. I've added both (has_tag and each_tag_value). Anyone calling
each_tag_value in a class inheriting from a SeqFeatureI implementation that
does not implement it will get an exception (_abstractDeath called).
Hilmar
--
-----------------------------------------------------------------------
Hilmar Lapp email: hlapp@gmx.net
NFI Vienna, IFD/Bioinformatics phone: +43 1 86634 631
A-1235 Vienna fax: +43 1 86634 727
-----------------------------------------------------------------------