3 # BioPerl module for Bio::DB::ReferenceI
5 # Cared for by Chris Fields <cjfields at uiuc dot edu>
7 # Copyright Chris Fields
9 # You may distribute this module under the same terms as perl itself
11 # POD documentation - main docs before the code
15 Bio::DB::ReferenceI - A RandomAccessI-like abstract interface for
16 retrieving Reference data from a sequence database and returning
17 Bio::Annotation::Reference objects
22 # get a database object somehow using a concrete class
25 $ref = $db->get_Reference_by_id('123456');
28 # $ref is a Bio::Annotation::Reference object
33 This is a pure interface class - in other words, all this does is define
34 methods which other (concrete) classes will actually implement.
36 The Bio::DB::ReferenceI class defines methods used to retrieve reference data
37 from a sequence. This is returned in the form of Bio::Annotation::Reference
40 At the moment it is just the ability to make Bio::Annotation::Reference
41 objects from a name or unique id (id), an accession number (acc), and so on.
45 Ewan Birney originally wrote Bio::DB::RandomAccessI, from which this class
50 User feedback is an integral part of the
51 evolution of this and other Bioperl modules. Send
52 your comments and suggestions preferably to one
53 of the Bioperl mailing lists. Your participation
56 bioperl-l@lists.open-bio.org - General discussion
57 http://www.bioperl.org/wiki/Mailing_lists - About the mailing lists
61 Report bugs to the Bioperl bug tracking system to
62 help us keep track the bugs and their resolution.
63 Bug reports can be submitted via the web.
65 http://bugzilla.open-bio.org/
69 Email cjfields at uiuc dot edu
73 The rest of the documentation details each of the
74 object methods. Internal methods are usually
79 # Let the code begin...
81 package Bio
::DB
::ReferenceI
;
85 =head2 get_Reference_by_id
87 Title : get_Reference_by_id
88 Usage : $ref = $db->get_Reference_by_id('123456')
89 Function: Gets a Bio::Annotation::Reference-implementing object by its name (id)
90 Returns : a Bio::Annotation::Reference object or undef if not found
91 Args : the id (as a string) of a sequence
95 sub get_Reference_by_id
{
96 my ($self,@args) = @_;
97 $self->throw_not_implemented();
100 =head2 get_Reference_by_acc
102 Title : get_Reference_by_acc
103 Usage : $ref = $db->get_Reference_by_acc('X77802');
104 Function: Gets a Bio::Annotation::Reference object by accession number
105 Returns : A Bio::Annotation::Reference object or undef if not found
106 Args : accession number (as a string)
107 Throws : "more than one sequences correspond to this accession"
108 if the accession maps to multiple primary ids and
109 method is called in a scalar context
113 sub get_Reference_by_acc
{
114 my ($self,@args) = @_;
115 $self->throw_not_implemented();
118 =head2 get_Reference_by_version
120 Title : get_Reference_by_version
121 Usage : $ref = $db->get_Reference_by_version('X77802.1');
122 Function: Gets a Bio::Annotation::Reference object by sequence version
123 Returns : A Bio::Annotation::Reference object
124 Args : accession.version (as a string)
125 Throws : "acc.version does not exist" exception
129 sub get_Reference_by_version
{
130 my ($self,@args) = @_;
131 $self->throw_not_implemented();