tag fourth (and hopefully last) alpha
[bioperl-live.git] / branch-1-6 / Bio / Seq / RichSeqI.pm
blob756d0901a58ac6d04afecd2b10ab08e38c65bb91
1 # $Id$
3 # BioPerl module for Bio::Seq::RichSeqI
5 # Please direct questions and support issues to <bioperl-l@bioperl.org>
7 # Cared for by Ewan Birney <birney@ebi.ac.uk>
9 # Copyright Ewan Birney
11 # You may distribute this module under the same terms as perl itself
13 # POD documentation - main docs before the code
15 =head1 NAME
17 Bio::Seq::RichSeqI - interface for sequences from rich data sources, mostly databases
19 =head1 SYNOPSIS
21 @secondary = $richseq->get_secondary_accessions;
22 $division = $richseq->division;
23 $mol = $richseq->molecule;
24 @dates = $richseq->get_dates;
25 $seq_version = $richseq->seq_version;
26 $pid = $richseq->pid;
27 @keywords = $richseq->get_keywords;
29 =head1 DESCRIPTION
31 This interface extends the Bio::SeqI interface to give additional functionality
32 to sequences with richer data sources, in particular from database sequences
33 (EMBL, GenBank and Swissprot).
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 http://bugzilla.open-bio.org/
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 methods are usually preceded with a _
74 =cut
77 # Let the code begin...
80 package Bio::Seq::RichSeqI;
81 use strict;
83 use base qw(Bio::SeqI);
86 =head2 get_secondary_accessions
88 Title : get_secondary_accessions
89 Usage :
90 Function: Get the secondary accessions for a sequence.
92 An implementation that allows modification of this array
93 property should provide the methods add_secondary_accession
94 and remove_secondary_accessions, with obvious purpose.
96 Example :
97 Returns : an array of strings
98 Args : none
101 =cut
103 sub get_secondary_accessions{
104 my ($self,@args) = @_;
106 $self->throw("hit get_secondary_accessions in interface definition - error");
111 =head2 division
113 Title : division
114 Usage :
115 Function: Get (and set, depending on the implementation) the divison for
116 a sequence.
118 Examples from GenBank are PLN (plants), PRI (primates), etc.
119 Example :
120 Returns : a string
121 Args :
124 =cut
126 sub division{
127 my ($self,@args) = @_;
129 $self->throw("hit division in interface definition - error");
134 =head2 molecule
136 Title : molecule
137 Usage :
138 Function: Get (and set, depending on the implementation) the molecule
139 type for the sequence.
141 This is not necessarily the same as Bio::PrimarySeqI::alphabet(),
142 because it is databank-specific.
143 Example :
144 Returns : a string
145 Args :
148 =cut
150 sub molecule{
151 my ($self,@args) = @_;
153 $self->throw("hit molecule in interface definition - error");
156 =head2 pid
158 Title : pid
159 Usage :
160 Function: Get (and set, depending on the implementation) the PID property
161 for the sequence.
162 Example :
163 Returns : a string
164 Args :
167 =cut
169 sub pid {
170 my ($self,@args) = @_;
172 $self->throw("hit pid in interface definition - error");
175 =head2 get_dates
177 Title : get_dates
178 Usage :
179 Function: Get (and set, depending on the implementation) the dates the
180 databank entry specified for the sequence
182 An implementation that allows modification of this array
183 property should provide the methods add_date and
184 remove_dates, with obvious purpose.
186 Example :
187 Returns : an array of strings
188 Args :
191 =cut
193 sub get_dates{
194 my ($self,@args) = @_;
196 $self->throw("hit get_dates in interface definition - error");
201 =head2 seq_version
203 Title : seq_version
204 Usage :
205 Function: Get (and set, depending on the implementation) the version string
206 of the sequence.
207 Example :
208 Returns : a string
209 Args :
212 =cut
214 sub seq_version{
215 my ($self,@args) = @_;
217 $self->throw("hit seq_version in interface definition - error");
221 =head2 get_keywords
223 Title : get_keywords
224 Usage : $obj->get_keywords()
225 Function: Get the keywords for this sequence object.
227 An implementation that allows modification of this array
228 property should provide the methods add_keyword and
229 remove_keywords, with obvious purpose.
231 Returns : an array of strings
232 Args :
235 =cut
237 sub get_keywords {
238 my ($self) = @_;
239 $self->throw("hit keywords in interface definition - error");