| Filename | /Users/ap13/perl5/lib/perl5/Bio/DB/RandomAccessI.pm |
| Statements | Executed 7 statements in 162µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 16µs | 28µs | Bio::DB::RandomAccessI::BEGIN@64 |
| 1 | 1 | 1 | 8µs | 60µs | Bio::DB::RandomAccessI::BEGIN@68 |
| 1 | 1 | 1 | 7µs | 7µs | Bio::DB::RandomAccessI::BEGIN@66 |
| 0 | 0 | 0 | 0s | 0s | Bio::DB::RandomAccessI::get_Seq_by_acc |
| 0 | 0 | 0 | 0s | 0s | Bio::DB::RandomAccessI::get_Seq_by_id |
| 0 | 0 | 0 | 0s | 0s | Bio::DB::RandomAccessI::get_Seq_by_version |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 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 | |||||
| 64 | 2 | 24µs | 2 | 40µs | # spent 28µs (16+12) within Bio::DB::RandomAccessI::BEGIN@64 which was called:
# once (16µs+12µs) by base::import at line 64 # spent 28µs making 1 call to Bio::DB::RandomAccessI::BEGIN@64
# spent 12µs making 1 call to strict::import |
| 65 | |||||
| 66 | 2 | 25µs | 1 | 7µs | # spent 7µs within Bio::DB::RandomAccessI::BEGIN@66 which was called:
# once (7µs+0s) by base::import at line 66 # spent 7µs making 1 call to Bio::DB::RandomAccessI::BEGIN@66 |
| 67 | |||||
| 68 | 2 | 111µs | 2 | 60µs | # spent 60µs (8+53) within Bio::DB::RandomAccessI::BEGIN@68 which was called:
# once (8µs+53µs) by base::import at line 68 # spent 60µs making 1 call to Bio::DB::RandomAccessI::BEGIN@68
# spent 53µs making 1 call to base::import, recursion: max depth 3, sum of overlapping time 53µs |
| 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 | sub get_Seq_by_id{ | ||||
| 81 | my ($self,@args) = @_; | ||||
| 82 | $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 | sub get_Seq_by_acc{ | ||||
| 104 | my ($self,@args) = @_; | ||||
| 105 | $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 | sub get_Seq_by_version{ | ||||
| 122 | my ($self,@args) = @_; | ||||
| 123 | $self->throw_not_implemented(); | ||||
| 124 | } | ||||
| 125 | |||||
| 126 | ## End of Package | ||||
| 127 | |||||
| 128 | 1 | 2µs | 1; | ||
| 129 |