line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# BioPerl module for Bio::Seq::RichSeqI |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# Please direct questions and support issues to |
5
|
|
|
|
|
|
|
# |
6
|
|
|
|
|
|
|
# Cared for by Ewan Birney |
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 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. |
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 |
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
|
37
|
|
|
37
|
|
200
|
use strict; |
|
37
|
|
|
|
|
44
|
|
|
37
|
|
|
|
|
975
|
|
83
|
|
|
|
|
|
|
|
84
|
37
|
|
|
37
|
|
244
|
use base qw(Bio::SeqI); |
|
37
|
|
|
|
|
47
|
|
|
37
|
|
|
|
|
8061
|
|
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head2 get_secondary_accessions |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
Title : get_secondary_accessions |
90
|
|
|
|
|
|
|
Usage : |
91
|
|
|
|
|
|
|
Function: Get the secondary accessions for a sequence. |
92
|
|
|
|
|
|
|
|
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. |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Example : |
98
|
|
|
|
|
|
|
Returns : an array of strings |
99
|
|
|
|
|
|
|
Args : none |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=cut |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
sub get_secondary_accessions{ |
105
|
0
|
|
|
0
|
1
|
|
my ($self,@args) = @_; |
106
|
|
|
|
|
|
|
|
107
|
0
|
|
|
|
|
|
$self->throw("hit get_secondary_accessions in interface definition - error"); |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
} |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=head2 division |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
Title : division |
115
|
|
|
|
|
|
|
Usage : |
116
|
|
|
|
|
|
|
Function: Get (and set, depending on the implementation) the divison for |
117
|
|
|
|
|
|
|
a sequence. |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
Examples from GenBank are PLN (plants), PRI (primates), etc. |
120
|
|
|
|
|
|
|
Example : |
121
|
|
|
|
|
|
|
Returns : a string |
122
|
|
|
|
|
|
|
Args : |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=cut |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
sub division{ |
128
|
0
|
|
|
0
|
1
|
|
my ($self,@args) = @_; |
129
|
|
|
|
|
|
|
|
130
|
0
|
|
|
|
|
|
$self->throw("hit division in interface definition - error"); |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
} |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=head2 molecule |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
Title : molecule |
138
|
|
|
|
|
|
|
Usage : |
139
|
|
|
|
|
|
|
Function: Get (and set, depending on the implementation) the molecule |
140
|
|
|
|
|
|
|
type for the sequence. |
141
|
|
|
|
|
|
|
|
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 : |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
=cut |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
sub molecule{ |
152
|
0
|
|
|
0
|
1
|
|
my ($self,@args) = @_; |
153
|
|
|
|
|
|
|
|
154
|
0
|
|
|
|
|
|
$self->throw("hit molecule in interface definition - error"); |
155
|
|
|
|
|
|
|
} |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
=head2 pid |
158
|
|
|
|
|
|
|
|
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 : |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
=cut |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
sub pid { |
171
|
0
|
|
|
0
|
1
|
|
my ($self,@args) = @_; |
172
|
|
|
|
|
|
|
|
173
|
0
|
|
|
|
|
|
$self->throw("hit pid in interface definition - error"); |
174
|
|
|
|
|
|
|
} |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
=head2 get_dates |
177
|
|
|
|
|
|
|
|
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 |
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
An implementation that allows modification of this array |
184
|
|
|
|
|
|
|
property should provide the methods add_date and |
185
|
|
|
|
|
|
|
remove_dates, with obvious purpose. |
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
Example : |
188
|
|
|
|
|
|
|
Returns : an array of strings |
189
|
|
|
|
|
|
|
Args : |
190
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
=cut |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
sub get_dates{ |
195
|
0
|
|
|
0
|
1
|
|
my ($self,@args) = @_; |
196
|
|
|
|
|
|
|
|
197
|
0
|
|
|
|
|
|
$self->throw("hit get_dates in interface definition - error"); |
198
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
} |
200
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
=head2 seq_version |
203
|
|
|
|
|
|
|
|
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() |
215
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
=cut |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
sub seq_version{ |
219
|
0
|
|
|
0
|
1
|
|
my ($self,@args) = @_; |
220
|
|
|
|
|
|
|
|
221
|
0
|
|
|
|
|
|
$self->throw("hit seq_version in interface definition - error"); |
222
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
} |
224
|
|
|
|
|
|
|
|
225
|
|
|
|
|
|
|
=head2 get_keywords |
226
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
Title : get_keywords |
228
|
|
|
|
|
|
|
Usage : $obj->get_keywords() |
229
|
|
|
|
|
|
|
Function: Get the keywords for this sequence object. |
230
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
An implementation that allows modification of this array |
232
|
|
|
|
|
|
|
property should provide the methods add_keyword and |
233
|
|
|
|
|
|
|
remove_keywords, with obvious purpose. |
234
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
Returns : an array of strings |
236
|
|
|
|
|
|
|
Args : |
237
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
|
239
|
|
|
|
|
|
|
=cut |
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
sub get_keywords { |
242
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
243
|
0
|
|
|
|
|
|
$self->throw("hit keywords in interface definition - error"); |
244
|
|
|
|
|
|
|
} |
245
|
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
1; |