[Bioperl-l] SeqFeatureI

Ewan Birney birney@ebi.ac.uk
Mon, 31 Jul 2000 14:26:58 +0100 (GMT)


On Mon, 31 Jul 2000 hilmar.lapp@pharma.novartis.com wrote:

> Apart from bug fixes in some test scripts, I've also corrected the
> documentation in SeqFeatureI for has_tag($tag_name), saying that it only
> returns TRUE or FALSE, as SeqFeature::Generic implements it. I currently do
> not have a real overview of all classes implementing SeqFeatureI, so the
> question is: do indeed all classes implementing this interface implement it
> the way SeqFeature::Generic does, or is SeqFeature::Generic a misbehaving
> exception. In the first case SeqFeatureI will need a method for setting and
> getting tags, too (which has_tag() did before), like add_tag_value() in
> SeqFeature::Generic. In the second case, SeqFeature::Generic needs to be
> fixed (and the doc for SeqFeatureI reverted to the previous version).

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.


it is great hilmar that you are getting to grips with this. ...


> 
> I personally very much prefer returning has_tag() TRUE or FALSE only, as
> the name clearly suggests.
> 
> Feedback appreciated.
> 
>      Hilmar
> 
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
> 

-----------------------------------------------------------------
Ewan Birney. Mobile: +44 (0)7970 151230, Work: +44 1223 494420
<birney@ebi.ac.uk>. 
-----------------------------------------------------------------