comparison variant_effect_predictor/Bio/DB/RandomAccessI.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 # POD documentation - main docs before the code
2 #
3 # $Id: RandomAccessI.pm,v 1.12 2002/10/22 07:38:29 lapp Exp $
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 originally wrote this class.
34
35 =head2 Reporting Bugs
36
37 Report bugs to the Bioperl bug tracking system to help us keep track
38 the bugs and their resolution. Bug reports can be submitted via email
39 or the web:
40
41 bioperl-bugs@bio.perl.org
42 http://bugzilla.bioperl.org/
43
44 =head1 APPENDIX
45
46 The rest of the documentation details each of the object
47 methods. Internal methods are usually preceded with a _
48
49 =cut
50
51
52 # Let the code begin...
53
54 package Bio::DB::RandomAccessI;
55
56 use vars qw(@ISA);
57 use strict;
58
59 use Bio::Root::RootI;
60 use Bio::Root::Root;
61
62 @ISA = qw(Bio::Root::Root);
63
64 =head2 get_Seq_by_id
65
66 Title : get_Seq_by_id
67 Usage : $seq = $db->get_Seq_by_id('ROA1_HUMAN')
68 Function: Gets a Bio::Seq object by its name
69 Returns : a Bio::Seq object or undef if not found
70 Args : the id (as a string) of a sequence,
71
72 =cut
73
74 sub get_Seq_by_id{
75 my ($self,@args) = @_;
76 $self->throw_not_implemented();
77 }
78
79 =head2 get_Seq_by_acc
80
81 Title : get_Seq_by_acc
82 Usage : $seq = $db->get_Seq_by_acc('X77802');
83 $seq = $db->get_Seq_by_acc(Locus => 'X77802');
84 Function: Gets a Bio::Seq object by accession number
85 Returns : A Bio::Seq object or undef if not found
86 Args : accession number (as a string), or a two
87 element list consisting of namespace=>accession
88 Throws : "more than one sequences correspond to this accession"
89 if the accession maps to multiple primary ids and
90 method is called in a scalar context
91
92 NOTE: The two-element form allows you to choose the namespace for the
93 accession number.
94
95 =cut
96
97 sub get_Seq_by_acc{
98 my ($self,@args) = @_;
99 $self->throw_not_implemented();
100 }
101
102
103 =head2 get_Seq_by_version
104
105 Title : get_Seq_by_version
106 Usage : $seq = $db->get_Seq_by_version('X77802.1');
107 Function: Gets a Bio::Seq object by sequence version
108 Returns : A Bio::Seq object
109 Args : accession.version (as a string)
110 Throws : "acc.version does not exist" exception
111
112 =cut
113
114
115 sub get_Seq_by_version{
116 my ($self,@args) = @_;
117 $self->throw_not_implemented();
118 }
119
120
121
122 ## End of Package
123
124 1;
125