2 # BioPerl module for Bio::DB::ReferenceI
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
6 # Cared for by Chris Fields <cjfields at bioperl dot org>
8 # Copyright Chris Fields
10 # You may distribute this module under the same terms as perl itself
12 # POD documentation - main docs before the code
16 Bio::DB::ReferenceI - A RandomAccessI-like abstract interface for
17 retrieving Reference data from a sequence database and returning
18 Bio::Annotation::Reference objects
23 # get a database object somehow using a concrete class
26 $ref = $db->get_Reference_by_id('123456');
29 # $ref is a Bio::Annotation::Reference object
34 This is a pure interface class - in other words, all this does is define
35 methods which other (concrete) classes will actually implement.
37 The Bio::DB::ReferenceI class defines methods used to retrieve reference data
38 from a sequence. This is returned in the form of Bio::Annotation::Reference
41 At the moment it is just the ability to make Bio::Annotation::Reference
42 objects from a name or unique id (id), an accession number (acc), and so on.
46 Ewan Birney originally wrote Bio::DB::RandomAccessI, from which this class
51 User feedback is an integral part of the
52 evolution of this and other Bioperl modules. Send
53 your comments and suggestions preferably to one
54 of the Bioperl mailing lists. Your participation
57 bioperl-l@lists.open-bio.org - General discussion
58 http://bioperl.org/Support.html - About the mailing lists
62 Please direct usage questions or support issues to the mailing list:
64 I<bioperl-l@bioperl.org>
66 rather than to the module maintainer directly. Many experienced and
67 reponsive experts will be able look at the problem and quickly
68 address it. Please include a thorough description of the problem
69 with code and data examples if at all possible.
73 Report bugs to the Bioperl bug tracking system to
74 help us keep track the bugs and their resolution.
75 Bug reports can be submitted via the web.
77 https://github.com/bioperl/bioperl-live/issues
81 Email cjfields at bioperl dot org
85 The rest of the documentation details each of the
86 object methods. Internal methods are usually
91 # Let the code begin...
93 package Bio
::DB
::ReferenceI
;
97 =head2 get_Reference_by_id
99 Title : get_Reference_by_id
100 Usage : $ref = $db->get_Reference_by_id('123456')
101 Function: Gets a Bio::Annotation::Reference-implementing object by its name (id)
102 Returns : a Bio::Annotation::Reference object or undef if not found
103 Args : the id (as a string) of a sequence
107 sub get_Reference_by_id
{
108 my ($self,@args) = @_;
109 $self->throw_not_implemented();
112 =head2 get_Reference_by_acc
114 Title : get_Reference_by_acc
115 Usage : $ref = $db->get_Reference_by_acc('X77802');
116 Function: Gets a Bio::Annotation::Reference object by accession number
117 Returns : A Bio::Annotation::Reference object or undef if not found
118 Args : accession number (as a string)
119 Throws : "more than one sequences correspond to this accession"
120 if the accession maps to multiple primary ids and
121 method is called in a scalar context
125 sub get_Reference_by_acc
{
126 my ($self,@args) = @_;
127 $self->throw_not_implemented();
130 =head2 get_Reference_by_version
132 Title : get_Reference_by_version
133 Usage : $ref = $db->get_Reference_by_version('X77802.1');
134 Function: Gets a Bio::Annotation::Reference object by sequence version
135 Returns : A Bio::Annotation::Reference object
136 Args : accession.version (as a string)
137 Throws : "acc.version does not exist" exception
141 sub get_Reference_by_version
{
142 my ($self,@args) = @_;
143 $self->throw_not_implemented();