Merge pull request #181 from bioperl/limit-dockerhub-trigger
[bioperl-live.git] / Bio / Seq / RichSeqI.pm
blob59873f468c9f9e93cdabaa4fa8ff30143062bf9b
2 # BioPerl module for Bio::Seq::RichSeqI
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
6 # Cared for by Ewan Birney <birney@ebi.ac.uk>
8 # Copyright Ewan Birney
10 # You may distribute this module under the same terms as perl itself
12 # POD documentation - main docs before the code
14 =head1 NAME
16 Bio::Seq::RichSeqI - interface for sequences from rich data sources, mostly databases
18 =head1 SYNOPSIS
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;
28 =head1 DESCRIPTION
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>.
35 =head1 FEEDBACK
37 =head2 Mailing Lists
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.
44 bioperl-l@bioperl.org - General discussion
45 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
47 =head2 Support
49 Please direct usage questions or support issues to the mailing list:
51 I<bioperl-l@bioperl.org>
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.
58 =head2 Reporting Bugs
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:
64 https://github.com/bioperl/bioperl-live/issues
66 =head1 AUTHOR - Ewan Birney
68 Email birney@ebi.ac.uk
70 =head1 APPENDIX
72 The rest of the documentation details each of the object methods. Internal
73 methods are usually preceded with a _
75 =cut
78 # Let the code begin...
81 package Bio::Seq::RichSeqI;
82 use strict;
84 use base qw(Bio::SeqI);
87 =head2 get_secondary_accessions
89 Title : get_secondary_accessions
90 Usage :
91 Function: Get the secondary accessions for a sequence.
93 An implementation that allows modification of this array
94 property should provide the methods add_secondary_accession
95 and remove_secondary_accessions, with obvious purpose.
97 Example :
98 Returns : an array of strings
99 Args : none
102 =cut
104 sub get_secondary_accessions{
105 my ($self,@args) = @_;
107 $self->throw("hit get_secondary_accessions in interface definition - error");
112 =head2 division
114 Title : division
115 Usage :
116 Function: Get (and set, depending on the implementation) the divison for
117 a sequence.
119 Examples from GenBank are PLN (plants), PRI (primates), etc.
120 Example :
121 Returns : a string
122 Args :
125 =cut
127 sub division{
128 my ($self,@args) = @_;
130 $self->throw("hit division in interface definition - error");
135 =head2 molecule
137 Title : molecule
138 Usage :
139 Function: Get (and set, depending on the implementation) the molecule
140 type for the sequence.
142 This is not necessarily the same as Bio::PrimarySeqI::alphabet(),
143 because it is databank-specific.
144 Example :
145 Returns : a string
146 Args :
149 =cut
151 sub molecule{
152 my ($self,@args) = @_;
154 $self->throw("hit molecule in interface definition - error");
157 =head2 pid
159 Title : pid
160 Usage :
161 Function: Get (and set, depending on the implementation) the PID property
162 for the sequence.
163 Example :
164 Returns : a string
165 Args :
168 =cut
170 sub pid {
171 my ($self,@args) = @_;
173 $self->throw("hit pid in interface definition - error");
176 =head2 get_dates
178 Title : get_dates
179 Usage :
180 Function: Get (and set, depending on the implementation) the dates the
181 databank entry specified for the sequence
183 An implementation that allows modification of this array
184 property should provide the methods add_date and
185 remove_dates, with obvious purpose.
187 Example :
188 Returns : an array of strings
189 Args :
192 =cut
194 sub get_dates{
195 my ($self,@args) = @_;
197 $self->throw("hit get_dates in interface definition - error");
202 =head2 seq_version
204 Title : seq_version
205 Usage :
206 Function: Get (and set, depending on the implementation) the version string
207 of the sequence.
208 Example :
209 Returns : a string
210 Args :
211 Note : this differs from Bio::PrimarySeq version() in that this explicitly
212 refers to the sequence record version one would find in a typical
213 sequence file. It is up to the implementation whether this is set
214 separately or falls back to the more generic Bio::Seq::version()
216 =cut
218 sub seq_version{
219 my ($self,@args) = @_;
221 $self->throw("hit seq_version in interface definition - error");
225 =head2 get_keywords
227 Title : get_keywords
228 Usage : $obj->get_keywords()
229 Function: Get the keywords for this sequence object.
231 An implementation that allows modification of this array
232 property should provide the methods add_keyword and
233 remove_keywords, with obvious purpose.
235 Returns : an array of strings
236 Args :
239 =cut
241 sub get_keywords {
242 my ($self) = @_;
243 $self->throw("hit keywords in interface definition - error");