Mercurial > repos > mahtabm > ensembl
comparison variant_effect_predictor/Bio/AnnotatableI.pm @ 0:1f6dce3d34e0
Uploaded
| author | mahtabm |
|---|---|
| date | Thu, 11 Apr 2013 02:01:53 -0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:1f6dce3d34e0 |
|---|---|
| 1 # $Id: AnnotatableI.pm,v 1.2 2002/12/31 13:09:06 birney Exp $ | |
| 2 # | |
| 3 # BioPerl module for Bio::AnnotatableI | |
| 4 # | |
| 5 # Cared for by Hilmar Lapp <hlapp at gmx.net> | |
| 6 # | |
| 7 # Copyright Hilmar Lapp | |
| 8 # | |
| 9 # You may distribute this module under the same terms as perl itself | |
| 10 | |
| 11 # POD documentation - main docs before the code | |
| 12 | |
| 13 =head1 NAME | |
| 14 | |
| 15 Bio::AnnotatableI - the base interface an annotatable object must implement | |
| 16 | |
| 17 =head1 SYNOPSIS | |
| 18 | |
| 19 use Bio::SeqIO; | |
| 20 # get an annotatable object somehow: for example, Bio::SeqI objects | |
| 21 # are annotatable | |
| 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 | |
| 29 } | |
| 30 | |
| 31 =head1 DESCRIPTION | |
| 32 | |
| 33 This is the base interface that all annotatable objects must implement. A good | |
| 34 example is Bio::Seq which is an AnnotableI object; if you are a little confused | |
| 35 about what this module does, start a Bio::Seq. | |
| 36 | |
| 37 =head1 FEEDBACK | |
| 38 | |
| 39 =head2 Mailing Lists | |
| 40 | |
| 41 User feedback is an integral part of the evolution of this and other | |
| 42 Bioperl modules. Send your comments and suggestions preferably to | |
| 43 the Bioperl mailing list. Your participation is much appreciated. | |
| 44 | |
| 45 bioperl-l@bioperl.org - General discussion | |
| 46 http://bioperl.org/MailList.shtml - About the mailing lists | |
| 47 | |
| 48 =head2 Reporting Bugs | |
| 49 | |
| 50 Report bugs to the Bioperl bug tracking system to help us keep track | |
| 51 of the bugs and their resolution. Bug reports can be submitted via | |
| 52 email or the web: | |
| 53 | |
| 54 bioperl-bugs@bioperl.org | |
| 55 http://bioperl.org/bioperl-bugs/ | |
| 56 | |
| 57 =head1 AUTHOR - Hilmar Lapp | |
| 58 | |
| 59 Email hlapp at gmx.net | |
| 60 | |
| 61 Describe contact details here | |
| 62 | |
| 63 =head1 CONTRIBUTORS | |
| 64 | |
| 65 Additional contributors names and emails here | |
| 66 | |
| 67 =head1 APPENDIX | |
| 68 | |
| 69 The rest of the documentation details each of the object methods. | |
| 70 Internal methods are usually preceded with a _ | |
| 71 | |
| 72 =cut | |
| 73 | |
| 74 | |
| 75 # Let the code begin... | |
| 76 | |
| 77 | |
| 78 package Bio::AnnotatableI; | |
| 79 use vars qw(@ISA); | |
| 80 use strict; | |
| 81 use Carp; | |
| 82 use Bio::Root::RootI; | |
| 83 | |
| 84 @ISA = qw( Bio::Root::RootI ); | |
| 85 | |
| 86 =head2 annotation | |
| 87 | |
| 88 Title : annotation | |
| 89 Usage : $obj->annotation($newval) | |
| 90 Function: Get the annotation collection (see L<Bio::AnnotationCollectionI>) | |
| 91 for this annotatable object. | |
| 92 Example : | |
| 93 Returns : a Bio::AnnotationCollectionI implementing object, or undef | |
| 94 Args : on set, new value (a Bio::AnnotationCollectionI | |
| 95 implementing object, optional) (an implementation may not | |
| 96 support changing the annotation collection) | |
| 97 | |
| 98 | |
| 99 =cut | |
| 100 | |
| 101 sub annotation{ | |
| 102 shift->throw_not_implemented(); | |
| 103 } | |
| 104 | |
| 105 | |
| 106 | |
| 107 1; |
