| 1 | # | ||
| 2 | # BioPerl module for Bio::Seq::RichSeqI | ||
| 3 | # | ||
| 4 | # Please direct questions and support issues to <bioperl-l@bioperl.org> | ||
| 5 | # | ||
| 6 | # Cared for by Ewan Birney <birney@ebi.ac.uk> | ||
| 7 | # | ||
| 8 | # Copyright Ewan Birney | ||
| 9 | # | ||
| 10 | # You may distribute this module under the same terms as perl itself | ||
| 11 | |||
| 12 | # POD documentation - main docs before the code | ||
| 13 | |||
| 14 | =head1 NAME | ||
| 15 | |||
| 16 | Bio::Seq::RichSeqI - interface for sequences from rich data sources, mostly databases | ||
| 17 | |||
| 18 | =head1 SYNOPSIS | ||
| 19 | |||
| 20 | @secondary = $richseq->get_secondary_accessions; | ||
| 21 | $division = $richseq->division; | ||
| 22 | $mol = $richseq->molecule; | ||
| 23 | @dates = $richseq->get_dates; | ||
| 24 | $seq_version = $richseq->seq_version; | ||
| 25 | $pid = $richseq->pid; | ||
| 26 | @keywords = $richseq->get_keywords; | ||
| 27 | |||
| 28 | =head1 DESCRIPTION | ||
| 29 | |||
| 30 | This interface extends the L<Bio::SeqI> interface to give additional | ||
| 31 | functionality to sequences with richer data sources, in particular from database | ||
| 32 | sequences (EMBL, GenBank and Swissprot). For a general implementation, please | ||
| 33 | see the documentation for L<Bio::Seq::RichSeq>. | ||
| 34 | |||
| 35 | =head1 FEEDBACK | ||
| 36 | |||
| 37 | =head2 Mailing Lists | ||
| 38 | |||
| 39 | User feedback is an integral part of the evolution of this | ||
| 40 | and other Bioperl modules. Send your comments and suggestions preferably | ||
| 41 | to one of the Bioperl mailing lists. | ||
| 42 | Your participation is much appreciated. | ||
| 43 | |||
| 44 | bioperl-l@bioperl.org - General discussion | ||
| 45 | http://bioperl.org/wiki/Mailing_lists - About the mailing lists | ||
| 46 | |||
| 47 | =head2 Support | ||
| 48 | |||
| 49 | Please direct usage questions or support issues to the mailing list: | ||
| 50 | |||
| 51 | I<bioperl-l@bioperl.org> | ||
| 52 | |||
| 53 | rather than to the module maintainer directly. Many experienced and | ||
| 54 | reponsive experts will be able look at the problem and quickly | ||
| 55 | address it. Please include a thorough description of the problem | ||
| 56 | with code and data examples if at all possible. | ||
| 57 | |||
| 58 | =head2 Reporting Bugs | ||
| 59 | |||
| 60 | Report bugs to the Bioperl bug tracking system to help us keep track | ||
| 61 | the bugs and their resolution. Bug reports can be submitted via the | ||
| 62 | web: | ||
| 63 | |||
| 64 | https://github.com/bioperl/bioperl-live/issues | ||
| 65 | |||
| 66 | =head1 AUTHOR - Ewan Birney | ||
| 67 | |||
| 68 | Email birney@ebi.ac.uk | ||
| 69 | |||
| 70 | =head1 APPENDIX | ||
| 71 | |||
| 72 | The rest of the documentation details each of the object methods. Internal | ||
| 73 | methods are usually preceded with a _ | ||
| 74 | |||
| 75 | =cut | ||
| 76 | |||
| 77 | |||
| 78 | # Let the code begin... | ||
| 79 | |||
| 80 | |||
| 81 | package Bio::Seq::RichSeqI; | ||
| 82 | 27 | $Bio::Seq::RichSeqI::VERSION = '1.7.8'; | |
| 83 | 27 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 84 | |||
| 85 | 27 | ▶ | use base qw(Bio::SeqI); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 86 | |||
| 87 | |||
| 88 | =head2 get_secondary_accessions | ||
| 89 | |||
| 90 | Title : get_secondary_accessions | ||
| 91 | Usage : | ||
| 92 | Function: Get the secondary accessions for a sequence. | ||
| 93 | |||
| 94 | An implementation that allows modification of this array | ||
| 95 | property should provide the methods add_secondary_accession | ||
| 96 | and remove_secondary_accessions, with obvious purpose. | ||
| 97 | |||
| 98 | Example : | ||
| 99 | Returns : an array of strings | ||
| 100 | Args : none | ||
| 101 | |||
| 102 | |||
| 103 | =cut | ||
| 104 | |||
| 105 | 0 | ▶ | sub get_secondary_accessions{ |
|
Subroutine
get_secondary_accessions: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 106 | 0 | my ($self,@args) = @_; | |
| 107 | |||
| 108 | 0 | $self->throw("hit get_secondary_accessions in interface definition - error"); | |
| 109 | |||
| 110 | } | ||
| 111 | |||
| 112 | |||
| 113 | =head2 division | ||
| 114 | |||
| 115 | Title : division | ||
| 116 | Usage : | ||
| 117 | Function: Get (and set, depending on the implementation) the division for | ||
| 118 | a sequence. | ||
| 119 | |||
| 120 | Examples from GenBank are PLN (plants), PRI (primates), etc. | ||
| 121 | Example : | ||
| 122 | Returns : a string | ||
| 123 | Args : | ||
| 124 | |||
| 125 | |||
| 126 | =cut | ||
| 127 | |||
| 128 | 0 | ▶ | sub division{ |
|
Subroutine
division: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 129 | 0 | my ($self,@args) = @_; | |
| 130 | |||
| 131 | 0 | $self->throw("hit division in interface definition - error"); | |
| 132 | |||
| 133 | } | ||
| 134 | |||
| 135 | |||
| 136 | =head2 molecule | ||
| 137 | |||
| 138 | Title : molecule | ||
| 139 | Usage : | ||
| 140 | Function: Get (and set, depending on the implementation) the molecule | ||
| 141 | type for the sequence. | ||
| 142 | |||
| 143 | This is not necessarily the same as Bio::PrimarySeqI::alphabet(), | ||
| 144 | because it is databank-specific. | ||
| 145 | Example : | ||
| 146 | Returns : a string | ||
| 147 | Args : | ||
| 148 | |||
| 149 | |||
| 150 | =cut | ||
| 151 | |||
| 152 | 0 | ▶ | sub molecule{ |
|
Subroutine
molecule: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 153 | 0 | my ($self,@args) = @_; | |
| 154 | |||
| 155 | 0 | $self->throw("hit molecule in interface definition - error"); | |
| 156 | } | ||
| 157 | |||
| 158 | =head2 pid | ||
| 159 | |||
| 160 | Title : pid | ||
| 161 | Usage : | ||
| 162 | Function: Get (and set, depending on the implementation) the PID property | ||
| 163 | for the sequence. | ||
| 164 | Example : | ||
| 165 | Returns : a string | ||
| 166 | Args : | ||
| 167 | |||
| 168 | |||
| 169 | =cut | ||
| 170 | |||
| 171 | 0 | ▶ | sub pid { |
|
Subroutine
pid: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 172 | 0 | my ($self,@args) = @_; | |
| 173 | |||
| 174 | 0 | $self->throw("hit pid in interface definition - error"); | |
| 175 | } | ||
| 176 | |||
| 177 | =head2 get_dates | ||
| 178 | |||
| 179 | Title : get_dates | ||
| 180 | Usage : | ||
| 181 | Function: Get (and set, depending on the implementation) the dates the | ||
| 182 | databank entry specified for the sequence | ||
| 183 | |||
| 184 | An implementation that allows modification of this array | ||
| 185 | property should provide the methods add_date and | ||
| 186 | remove_dates, with obvious purpose. | ||
| 187 | |||
| 188 | Example : | ||
| 189 | Returns : an array of strings | ||
| 190 | Args : | ||
| 191 | |||
| 192 | |||
| 193 | =cut | ||
| 194 | |||
| 195 | 0 | ▶ | sub get_dates{ |
|
Subroutine
get_dates: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 196 | 0 | my ($self,@args) = @_; | |
| 197 | |||
| 198 | 0 | $self->throw("hit get_dates in interface definition - error"); | |
| 199 | |||
| 200 | } | ||
| 201 | |||
| 202 | |||
| 203 | =head2 seq_version | ||
| 204 | |||
| 205 | Title : seq_version | ||
| 206 | Usage : | ||
| 207 | Function: Get (and set, depending on the implementation) the version string | ||
| 208 | of the sequence. | ||
| 209 | Example : | ||
| 210 | Returns : a string | ||
| 211 | Args : | ||
| 212 | Note : this differs from Bio::PrimarySeq version() in that this explicitly | ||
| 213 | refers to the sequence record version one would find in a typical | ||
| 214 | sequence file. It is up to the implementation whether this is set | ||
| 215 | separately or falls back to the more generic Bio::Seq::version() | ||
| 216 | |||
| 217 | =cut | ||
| 218 | |||
| 219 | 0 | ▶ | sub seq_version{ |
|
Subroutine
seq_version: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 220 | 0 | my ($self,@args) = @_; | |
| 221 | |||
| 222 | 0 | $self->throw("hit seq_version in interface definition - error"); | |
| 223 | |||
| 224 | } | ||
| 225 | |||
| 226 | =head2 get_keywords | ||
| 227 | |||
| 228 | Title : get_keywords | ||
| 229 | Usage : $obj->get_keywords() | ||
| 230 | Function: Get the keywords for this sequence object. | ||
| 231 | |||
| 232 | An implementation that allows modification of this array | ||
| 233 | property should provide the methods add_keyword and | ||
| 234 | remove_keywords, with obvious purpose. | ||
| 235 | |||
| 236 | Returns : an array of strings | ||
| 237 | Args : | ||
| 238 | |||
| 239 | |||
| 240 | =cut | ||
| 241 | |||
| 242 | 0 | ▶ | sub get_keywords { |
|
Subroutine
get_keywords: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 243 | 0 | my ($self) = @_; | |
| 244 | 0 | $self->throw("hit keywords in interface definition - error"); | |
| 245 | } | ||
| 246 | |||
| 247 | 27 | 1; | |