[Bioperl-l] Problem with Bio::Annotation
Hilmar Lapp
hlapp@gnf.org
Tue, 10 Dec 2002 09:48:41 -0800
You need to pass an implementation of Bio::AnnotationCollectionI. Bio::Annotation::Collection is the reference implementation - it will most likely suffice for what you want.
(BTW since 1.1.1 what you do will throw an exception to better tell people that the API has changed.)
-hilmar
> -----Original Message-----
> From: Harry Wild [mailto:harry.wild@gmx.de]
> Sent: Tuesday, December 10, 2002 7:02 AM
> To: bioperl-l@bioperl.org
> Subject: [Bioperl-l] Problem with Bio::Annotation
>
>
>
> Hi bioperl Community!
>
> I'm trying to write out genome data from a relational
> database to Genbank
> format.
> But I'm not able to get the annotations out of the Seq-Objects that I
> create.
>
> My little test-code
>
> use Bio::SeqIO;
> use Bio::Seq;
> use Bio::Annotation;
>
> $out = Bio::SeqIO->new( -file => ">/home/wild/test1.gb" ,
> -format
> => 'GenBank');
>
> $seq = Bio::Seq->new( '-seq' => 'atgcctgatctggatcgtt',
> '-display_id' =>
> 'something',
> '-accession_number' =>
> 'AC_000001');
>
> $seq->annotation( new Bio::Annotation( '-description' => 'some
> description'));
>
> $out->write_seq($seq);
>
> $out->close;
>
> always produces the following output:
>
> Can't locate object method "get_Annotations" via package
> "Bio::Annotation"
> at
> /usr/local/lib/perl5/site_perl/5.005/Bio/SeqIO/genbank.pm line 466.
>
> What's wrong with my code?
>
> Thanks for help,
> Harry
>
> --
> +++ GMX - Mail, Messaging & more http://www.gmx.net +++
> NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>