my $seqio = $gb->get_Stream_by_id(['13474692']); #print $gb->get_Stream_by_id(['13474692']); while( my $seq = $seqio->next_seq ) { print "seq is ", $seq->display_id, "\n"; my @f=$seq->get_SeqFeatures; #This gives you the annotation of the retrieved sequence object foreach my $feat (@f) { print "Feature ",$feat->primary_tag," starts ",$feat->start," ends ", $feat->end," strand ",$feat->strand,"\n"; # features retain link to underlying sequence object #print "Feature sequence is ",$feat->seq->seq(),"\n"; my $ac=$feat->annotation(); # HOW CAN I TELL IF $ac HAS A VALUE print "GETS TO HERE\n"; foreach $key ( $ac->get_all_annotation_keys() ) { print "DOESN'T GET TO HERE\n"; @values = $ac->get_Annotations($key); foreach $value ( @values ) { # value is an Bio::AnnotationI, and defines a "as_text" method print "Annotation ",$key," stringified value ",$value->as_text,"\n"; # also defined hash_tree method, which allows data orientated # access into this object $hash = $value->hash_tree(); } } next unless ($ac->get_Annotations('coded_by')); my @coded=$ac->get_Annotations('coded_by'); foreach my $location (@coded) { print $location->value, " is the location that codes this protein\n"; } } }