Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 131 lines (85 sloc) 3.097 kb
f9e5ba5d »
2009-09-09 merge from branches/bioperl-mode-multipath-branch
1 # POD documentation - main docs before the code
2 #
3 # $Id: RandomAccessI.pm 15549 2009-02-21 00:48:48Z maj $
4 #
5
6 =head1 NAME
7
8 Bio::DB::RandomAccessI - Abstract interface for a sequence database
9
10 =head1 SYNOPSIS
11
12 #
13 # get a database object somehow using a concrete class
14 #
15
16 $seq = $db->get_Seq_by_id('ROA1_HUMAN');
17
18 #
19 # $seq is a Bio::Seq object
20 #
21
22 =head1 DESCRIPTION
23
24 This is a pure interface class - in other words, all this does is define
25 methods which other (concrete) classes will actually implement.
26
27 The Bio::DB::RandomAccessI class defines what methods a generic database class
28 should have. At the moment it is just the ability to make Bio::Seq objects
29 from a name (id) or a accession number.
30
31 =head1 CONTACT
32
33 Ewan Birney E<lt>birney@ebi.ac.ukE<gt> originally wrote this class.
34
35 =head2 Support
36
37 Please direct usage questions or support issues to the mailing list:
38
39 L<bioperl-l@bioperl.org>
40
41 rather than to the module maintainer directly. Many experienced and
42 reponsive experts will be able look at the problem and quickly
43 address it. Please include a thorough description of the problem
44 with code and data examples if at all possible.
45
46 =head2 Reporting Bugs
47
48 Report bugs to the Bioperl bug tracking system to help us keep track
49 the bugs and their resolution. Bug reports can be submitted via the web:
50
51 http://bugzilla.open-bio.org/
52
53 =head1 APPENDIX
54
55 The rest of the documentation details each of the object
56 methods. Internal methods are usually preceded with a _
57
58 =cut
59
60
61 # Let the code begin...
62
63 package Bio::DB::RandomAccessI;
64
65 use strict;
66
67 use Bio::Root::RootI;
68
69 use base qw(Bio::Root::Root);
70
71 =head2 get_Seq_by_id
72
73 Title : get_Seq_by_id
74 Usage : $seq = $db->get_Seq_by_id('ROA1_HUMAN')
75 Function: Gets a Bio::Seq object by its name
76 Returns : a Bio::Seq object or undef if not found
77 Args : the id (as a string) of a sequence,
78
79 =cut
80
81 sub get_Seq_by_id{
82 my ($self,@args) = @_;
83 $self->throw_not_implemented();
84 }
85
86 =head2 get_Seq_by_acc
87
88 Title : get_Seq_by_acc
89 Usage : $seq = $db->get_Seq_by_acc('X77802');
90 $seq = $db->get_Seq_by_acc(Locus => 'X77802');
91 Function: Gets a Bio::Seq object by accession number
92 Returns : A Bio::Seq object or undef if not found
93 Args : accession number (as a string), or a two
94 element list consisting of namespace=>accession
95 Throws : "more than one sequences correspond to this accession"
96 if the accession maps to multiple primary ids and
97 method is called in a scalar context
98
99 NOTE: The two-element form allows you to choose the namespace for the
100 accession number.
101
102 =cut
103
104 sub get_Seq_by_acc{
105 my ($self,@args) = @_;
106 $self->throw_not_implemented();
107 }
108
109
110 =head2 get_Seq_by_version
111
112 Title : get_Seq_by_version
113 Usage : $seq = $db->get_Seq_by_version('X77802.1');
114 Function: Gets a Bio::Seq object by sequence version
115 Returns : A Bio::Seq object
116 Args : accession.version (as a string)
117 Throws : "acc.version does not exist" exception
118
119 =cut
120
121
122 sub get_Seq_by_version{
123 my ($self,@args) = @_;
124 $self->throw_not_implemented();
125 }
126
127 ## End of Package
128
129 1;
130
Something went wrong with that request. Please try again.