Mercurial > repos > mahtabm > ensembl
comparison variant_effect_predictor/Bio/DBLinkContainerI.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: DBLinkContainerI.pm,v 1.8 2002/10/22 07:38:24 lapp Exp $ | |
| 2 # | |
| 3 # BioPerl module for Bio::DBLinkContainerI | |
| 4 # | |
| 5 # Cared for by Heikki Lehvaslaiho <heikki@ebi.ac.uk> | |
| 6 # | |
| 7 # Copyright Heikki Lehvaslaiho | |
| 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::DBLinkContainerI - Abstract interface for any object wanting to use | |
| 16 database cross references | |
| 17 | |
| 18 =head1 SYNOPSIS | |
| 19 | |
| 20 # get an objects containing database cross reference | |
| 21 | |
| 22 foreach $obj ( @objs ) { | |
| 23 if( $obj->isa('Bio::DBLinkContainerI') ) { | |
| 24 foreach $dblink ( $obj->each_DBLink() ) { | |
| 25 # do stuff | |
| 26 } | |
| 27 } | |
| 28 } | |
| 29 | |
| 30 =head1 DESCRIPTION | |
| 31 | |
| 32 This interface defines the functions one can expect for any object | |
| 33 wanting to use database cross-references. This class does not actually | |
| 34 provide any implemention, it just provides the definitions of what | |
| 35 methods one can call. | |
| 36 | |
| 37 The database cross-references are implemented as L<Bio::Annotation::DBLink> | |
| 38 objects. | |
| 39 | |
| 40 =head1 FEEDBACK | |
| 41 | |
| 42 =head2 Mailing Lists | |
| 43 | |
| 44 User feedback is an integral part of the evolution of this and other | |
| 45 Bioperl modules. Send your comments and suggestions preferably to one | |
| 46 of the Bioperl mailing lists. Your participation is much appreciated. | |
| 47 | |
| 48 bioperl-l@bioperl.org - General discussion | |
| 49 http://bioperl.org/MailList.shtml - About the mailing lists | |
| 50 | |
| 51 =head2 Reporting Bugs | |
| 52 | |
| 53 Report bugs to the Bioperl bug tracking system to help us keep track | |
| 54 the bugs and their resolution. Bug reports can be submitted via email | |
| 55 or the web: | |
| 56 | |
| 57 bioperl-bugs@bio.perl.org | |
| 58 http://bugzilla.bioperl.org/ | |
| 59 | |
| 60 =head1 AUTHOR - Heikki Lehvaslaiho | |
| 61 | |
| 62 Email: heikki@ebi.ac.uk | |
| 63 Address: | |
| 64 | |
| 65 EMBL Outstation, European Bioinformatics Institute | |
| 66 Wellcome Trust Genome Campus, Hinxton | |
| 67 Cambs. CB10 1SD, United Kingdom | |
| 68 | |
| 69 =head1 APPENDIX | |
| 70 | |
| 71 The rest of the documentation details each of the object | |
| 72 methods. Internal methods are usually preceded with a _ | |
| 73 | |
| 74 =cut | |
| 75 | |
| 76 # Let the code begin... | |
| 77 | |
| 78 package Bio::DBLinkContainerI; | |
| 79 use vars qw(@ISA); | |
| 80 use strict; | |
| 81 | |
| 82 use Carp; | |
| 83 use Bio::Root::RootI; | |
| 84 | |
| 85 @ISA = qw(Bio::Root::RootI); | |
| 86 | |
| 87 =head2 each_DBLink | |
| 88 | |
| 89 Title : each_DBLink | |
| 90 Usage : foreach $ref ( $self->each_DBlink() ) | |
| 91 Function: gets an array of DBlink of objects | |
| 92 Example : | |
| 93 Returns : an array of Bio::Annotation::DBLink objects | |
| 94 Args : none | |
| 95 | |
| 96 | |
| 97 =cut | |
| 98 | |
| 99 sub each_DBLink{ | |
| 100 my ($self) = @_; | |
| 101 my $class = ref($self) || $self; | |
| 102 $self->throw("Class $class did not define method 'each_DBLink' for interface DBLinkContainerI"); | |
| 103 } | |
| 104 | |
| 105 1; | |
| 106 |
