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