3 # BioPerl module for Bio::AnnotatableI
5 # Cared for by Hilmar Lapp <hlapp at gmx.net>
7 # Copyright Hilmar Lapp
9 # You may distribute this module under the same terms as perl itself
11 # POD documentation - main docs before the code
15 Bio::AnnotatableI - the base interface an annotatable object must implement
20 # get an annotatable object somehow: for example, Bio::SeqI objects
22 my $seqio = Bio::SeqIO->new(-fh => \*STDIN, -format => 'genbank');
23 while (my $seq = $seqio->next_seq()) {
24 # $seq is-a Bio::AnnotatableI, hence:
25 my $ann_coll = $seq->annotation();
26 # $ann_coll is-a Bio::AnnotationCollectionI, hence:
27 my @all_anns = $ann_coll->get_Annotations();
28 # do something with the annotation objects
33 This is the base interface that all annotatable objects must implement. A
34 good example is Bio::Seq which is an AnnotableI object.
40 User feedback is an integral part of the evolution of this and other
41 Bioperl modules. Send your comments and suggestions preferably to
42 the Bioperl mailing list. Your participation is much appreciated.
44 bioperl-l@bioperl.org - General discussion
45 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
49 Report bugs to the Bioperl bug tracking system to help us keep track
50 of the bugs and their resolution. Bug reports can be submitted via the
53 http://bugzilla.open-bio.org/
57 Hilmar Lapp E<lt>hlapp@gmx.netE<gt>
58 Allen Day E<lt>allenday@ucla.eduE<gt>
62 The rest of the documentation details each of the object methods.
63 Internal methods are usually preceded with a _
68 # Let the code begin...
71 package Bio
::AnnotatableI
;
74 use Bio
::Annotation
::Comment
;
75 use Bio
::Annotation
::DBLink
;
76 #use Bio::Annotation::OntologyTerm;
77 use Bio
::Annotation
::Reference
;
78 use Bio
::Annotation
::SimpleValue
;
80 use base
qw(Bio::Root::RootI);
85 Usage : $obj->annotation($newval)
86 Function: Get the annotation collection for this annotatable object.
88 Returns : a Bio::AnnotationCollectionI implementing object, or undef
89 Args : on set, new value (a Bio::AnnotationCollectionI
90 implementing object, optional) (an implementation may not
91 support changing the annotation collection)
93 See L<Bio::AnnotationCollectionI>
98 shift->throw_not_implemented();