[Bioperl-l] accessing optional qualifiers within features?

Kris Boulez krbou@pgsgent.be
Sun, 12 Nov 2000 11:46:31 +0100


Quoting Hilmar Lapp (hlapp@gmx.net):
> Samuel Aparicio wrote:
> > 
> 
> Bio::Seq has a method all_SeqFeatures(). For every element of the returned
> array (a Bio::SeqFeatureI compliant object) you can call
> has_tag("tag_name") and each_tag_value("tag_name") in order to query for
> existence and retrieve the values associated with a tag. So,
> 
> foreach $feat ($seq->all_SeqFeatures()) {
> 	if(($feat->primary_tag() eq "repeat_region") &&
> 	   ($feat->has_tag("note")) {
> 		foreach $val ($feat->each_tag_value("note")) {
> 			print "note: $val\n";
> 		}
> 	}
> }
> 
> Hope this helps. BTW the mentioned methods are documented in the perldoc
> pages of their modules (Bio::Seq and Bio::SeqFeature::Generic).
> 

This is something I think we need in the documentation that is discussed
in another thread. The first time I had a go at these features it was
hard to find in which module to start looking.

Kris,