[Bioperl-l] Errors on Annotaion

Jason Stajich jason@cgt.mc.duke.edu
Wed, 12 Jun 2002 08:30:16 -0400 (EDT)


You're using the old API (Bio::Annotation).  Use the new API which is
for Bio::AnnotationCollectionI -> implemented by
Bio::Annotation::Collection.

if you call
my $ann = $seq->annotation();
print ref($ann), "\n";

You'll see that you are getting back a Bio::Annotation::Collection object.
Specifically you'll replace
    my $comm = $ann->get_Comment()
  with
    my $comm = $ann->get_Annotations('comment');

I'll add this to the FAQ.

-jason
On Tue, 11 Jun 2002, Aun Ja wrote:

> Hello,
>
> I try to use the Bio::Annotation object (version 1.0
> and 1.01, but I always get the following errors.
> ----------------------------------------------------
> each_Comment (old style Annotation) on new style
> Annotation::Collection
> STACK Bio::Annotation::Collection::each_Comment
> D:/Perl/site/lib/Bio/Annotation/
> Collection.pm:402
> STACK toplevel dbparse.pl:87
> each_DBLink (old style Annotation) on new style
> Annotation::Collection
> STACK Bio::Annotation::Collection::each_DBLink
> D:/Perl/site/lib/Bio/Annotation/C
> ollection.pm:445
> STACK toplevel dbparse.pl:90
> ------------------------------------------------
>
> Any thoughts?
> Aun Ja
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>

-- 
Jason Stajich
Duke University
jason at cgt.mc.duke.edu