Bioperl: Feature tags : newbie question
James Gilbert
jgrg@sanger.ac.uk
Tue, 16 May 2000 13:46:30 +0100 (BST)
Mark,
Thanks very much for pointing this out. This is a
documentation mistake, which I will fix. The
method you need is each_tag_value (which is
entirely missing its documentation!):
my(@values) = $gsf->each_tag_value($tag);
This is because a tag can occur several times (eg:
several "note" qualifiers in a GenBank/EMBL
feature table). Looks like the code was first
written thinking that each tag can only occur
once, and was then changed without the
documentation being changed.
James
On Tue, 16 May 2000, Mark Hoebeke wrote:
> Hi all,
>
> I just installed Release Candidate 0.6.1 and tried to parse some GenBank
> files.
>
> Unfortunately, I can't retrieve any feature tag values using the
> Bio::SeqFeature::has_tag method. By delving into the code of
> Bio::SeqFeature::Generic, I read :
>
> sub has_tag{
> my ($self,$tag) = (shift, shift);
>
> return exists $self->{'_gsf_tag_hash'}->{$tag};
> }
>
>
> I'm not a Perl hacker, but it seems to me that this method doesn't return
> the tag value, but only '1' if the tag exists (which indeed is the
> behavior I observe during testing).
>
> Can anybody explain what I got wrong ?
>
> Thanks.
>
> Mark
> --
> Mark Hoebeke Mark.Hoebeke@jouy.inra.fr
> INRA - BIA-Jouy / MIG http://www-bia.inra.fr
> Domaine de Vilvert
> 78352 Jouy-en-Josas Cedex (FRANCE)
>
> =========== Bioperl Project Mailing List Message Footer =======
> Project URL: http://bio.perl.org/
> For info about how to (un)subscribe, where messages are archived, etc:
> http://www.techfak.uni-bielefeld.de/bcd/Perl/Bio/vsns-bcd-perl.html
> ====================================================================
>
James G.R. Gilbert
The Sanger Centre
Wellcome Trust Genome Campus
Hinxton
Cambridge Tel: 01223 494906
CB10 1SA Fax: 01223 494919
=========== Bioperl Project Mailing List Message Footer =======
Project URL: http://bio.perl.org/
For info about how to (un)subscribe, where messages are archived, etc:
http://www.techfak.uni-bielefeld.de/bcd/Perl/Bio/vsns-bcd-perl.html
====================================================================