line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# BioPerl module for Bio::Tools::HMMER::Set |
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::Tools::HMMER::Set - Set of identical domains from HMMER matches |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 SYNOPSIS |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# get a Set object probably from the results object |
21
|
|
|
|
|
|
|
print "Bits score over set ",$set->bits," evalue ",$set->evalue,"\n"; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
foreach $domain ( $set->each_Domain ) { |
24
|
|
|
|
|
|
|
print "Domain start ",$domain->start," end ",$domain->end,"\n"; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 DESCRIPTION |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
Represents a set of HMMER domains hitting one sequence. HMMER reports two |
30
|
|
|
|
|
|
|
different scores, a per sequence total score (and evalue) and a per |
31
|
|
|
|
|
|
|
domain score and evalue. This object represents a collection of the same |
32
|
|
|
|
|
|
|
domain with the sequence bits score and evalue. (these attributes are also |
33
|
|
|
|
|
|
|
on the per domain scores, which you can get there). |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 FEEDBACK |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head2 Mailing Lists |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
User feedback is an integral part of the evolution of this and other |
40
|
|
|
|
|
|
|
Bioperl modules. Send your comments and suggestions preferably to one |
41
|
|
|
|
|
|
|
of the Bioperl mailing lists. Your participation is much appreciated. |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
bioperl-l@bioperl.org - General discussion |
44
|
|
|
|
|
|
|
http://bioperl.org/wiki/Mailing_lists - About the mailing lists |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head2 Support |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Please direct usage questions or support issues to the mailing list: |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
I |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
rather than to the module maintainer directly. Many experienced and |
53
|
|
|
|
|
|
|
reponsive experts will be able look at the problem and quickly |
54
|
|
|
|
|
|
|
address it. Please include a thorough description of the problem |
55
|
|
|
|
|
|
|
with code and data examples if at all possible. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head2 Reporting Bugs |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Report bugs to the Bioperl bug tracking system to help us keep track |
60
|
|
|
|
|
|
|
the bugs and their resolution.Bug reports can be submitted via the |
61
|
|
|
|
|
|
|
web: |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
https://github.com/bioperl/bioperl-live/issues |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 AUTHOR - Ewan Birney |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Email birney-at-ebi.ac.uk |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 APPENDIX |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
The rest of the documentation details each of the object |
72
|
|
|
|
|
|
|
methods. Internal methods are usually preceded with a _ |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=cut |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
# Let the code begin... |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
package Bio::Tools::HMMER::Set; |
81
|
1
|
|
|
1
|
|
1052
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
25
|
|
82
|
|
|
|
|
|
|
|
83
|
1
|
|
|
1
|
|
4
|
use Bio::Tools::HMMER::Domain; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
17
|
|
84
|
|
|
|
|
|
|
|
85
|
1
|
|
|
1
|
|
4
|
use base qw(Bio::Root::Root); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
473
|
|
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
sub new { |
88
|
1505
|
|
|
1505
|
1
|
1754
|
my($class,@args) = @_; |
89
|
1505
|
|
|
|
|
2296
|
my $self = $class->SUPER::new(@args); |
90
|
1505
|
|
|
|
|
3269
|
my ($name,$acc,$desc) = $self->_rearrange([qw(NAME ACCESSION DESC)], |
91
|
|
|
|
|
|
|
@args); |
92
|
1505
|
50
|
|
|
|
2753
|
$name && $self->name($name); |
93
|
1505
|
50
|
|
|
|
1860
|
$acc && $self->accession($acc); |
94
|
1505
|
50
|
|
|
|
1823
|
$desc && $self->desc($desc); |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
|
97
|
1505
|
|
|
|
|
2193
|
$self->{'domains'} = []; |
98
|
1505
|
|
|
|
|
1786
|
$self->{'domainnames'} = {}; |
99
|
1505
|
|
|
|
|
2214
|
return $self; |
100
|
|
|
|
|
|
|
} |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head2 add_Domain |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
Title : add_Domain |
105
|
|
|
|
|
|
|
Usage : $set->add_Domain($domain) |
106
|
|
|
|
|
|
|
Function: adds the domain to the list |
107
|
|
|
|
|
|
|
Returns : nothing |
108
|
|
|
|
|
|
|
Args : A Bio::Tools::HMMER::Domain object |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=cut |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
sub add_Domain{ |
113
|
3038
|
|
|
3038
|
1
|
3671
|
my ($self,$domain) = @_; |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
|
116
|
3038
|
50
|
33
|
|
|
10801
|
if( ! defined $domain || ! $domain->isa("Bio::Tools::HMMER::Domain") ) { |
117
|
0
|
|
|
|
|
0
|
$self->throw("[$domain] is not a Bio::Tools::HMMER::Domain. aborting"); |
118
|
|
|
|
|
|
|
} |
119
|
3038
|
100
|
|
|
|
6124
|
return if $self->{'domainnames'}->{$domain->get_nse}++; |
120
|
2434
|
|
|
|
|
3324
|
push(@{$self->{'domains'}},$domain); |
|
2434
|
|
|
|
|
5014
|
|
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
} |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=head2 each_Domain |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
Title : each_Domain |
127
|
|
|
|
|
|
|
Usage : foreach $domain ( $set->each_Domain() ) |
128
|
|
|
|
|
|
|
Function: returns an array of domain objects in this set |
129
|
|
|
|
|
|
|
Returns : array |
130
|
|
|
|
|
|
|
Args : none |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=cut |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
sub each_Domain{ |
136
|
1059
|
|
|
1059
|
1
|
2870
|
my ($self,@args) = @_; |
137
|
|
|
|
|
|
|
|
138
|
1059
|
|
|
|
|
866
|
return @{$self->{'domains'}}; |
|
1059
|
|
|
|
|
2141
|
|
139
|
|
|
|
|
|
|
} |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=head2 name |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
Title : name |
144
|
|
|
|
|
|
|
Usage : $obj->name($newval) |
145
|
|
|
|
|
|
|
Function: |
146
|
|
|
|
|
|
|
Example : |
147
|
|
|
|
|
|
|
Returns : value of name |
148
|
|
|
|
|
|
|
Args : newvalue (optional) |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
=cut |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
sub name{ |
154
|
3314
|
|
|
3314
|
1
|
3669
|
my ($obj,$value) = @_; |
155
|
3314
|
100
|
|
|
|
4156
|
if( defined $value) { |
156
|
1505
|
|
|
|
|
1705
|
$obj->{'name'} = $value; |
157
|
|
|
|
|
|
|
} |
158
|
3314
|
|
|
|
|
4102
|
return $obj->{'name'}; |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
} |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
=head2 desc |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
Title : desc |
165
|
|
|
|
|
|
|
Usage : $obj->desc($newval) |
166
|
|
|
|
|
|
|
Function: |
167
|
|
|
|
|
|
|
Example : |
168
|
|
|
|
|
|
|
Returns : value of desc |
169
|
|
|
|
|
|
|
Args : newvalue (optional) |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
=cut |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
sub desc{ |
174
|
4
|
|
|
4
|
1
|
11
|
my ($self,$value) = @_; |
175
|
4
|
100
|
|
|
|
11
|
if( defined $value) { |
176
|
2
|
|
|
|
|
5
|
$self->{'desc'} = $value; |
177
|
|
|
|
|
|
|
} |
178
|
4
|
|
|
|
|
15
|
return $self->{'desc'}; |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
} |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
=head2 accession |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
Title : accession |
185
|
|
|
|
|
|
|
Usage : $obj->accession($newval) |
186
|
|
|
|
|
|
|
Function: |
187
|
|
|
|
|
|
|
Example : |
188
|
|
|
|
|
|
|
Returns : value of accession |
189
|
|
|
|
|
|
|
Args : newvalue (optional) |
190
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
=cut |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
sub accession{ |
195
|
1506
|
|
|
1506
|
1
|
1681
|
my ($self,$value) = @_; |
196
|
1506
|
100
|
|
|
|
1838
|
if( defined $value) { |
197
|
2
|
|
|
|
|
4
|
$self->{'accession'} = $value; |
198
|
|
|
|
|
|
|
} |
199
|
1506
|
|
|
|
|
4436
|
return $self->{'accession'}; |
200
|
|
|
|
|
|
|
} |
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
=head2 bits |
204
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
Title : bits |
206
|
|
|
|
|
|
|
Usage : $obj->bits($newval) |
207
|
|
|
|
|
|
|
Function: |
208
|
|
|
|
|
|
|
Example : |
209
|
|
|
|
|
|
|
Returns : value of bits |
210
|
|
|
|
|
|
|
Args : newvalue (optional) |
211
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
=cut |
214
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
sub bits{ |
216
|
2255
|
|
|
2255
|
1
|
2522
|
my ($obj,$value) = @_; |
217
|
|
|
|
|
|
|
|
218
|
2255
|
100
|
|
|
|
2777
|
if( defined $value) { |
219
|
1503
|
|
|
|
|
1814
|
$obj->{'bits'} = $value; |
220
|
|
|
|
|
|
|
} |
221
|
2255
|
|
|
|
|
3825
|
return $obj->{'bits'}; |
222
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
} |
224
|
|
|
|
|
|
|
|
225
|
|
|
|
|
|
|
=head2 evalue |
226
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
Title : evalue |
228
|
|
|
|
|
|
|
Usage : $obj->evalue($newval) |
229
|
|
|
|
|
|
|
Function: |
230
|
|
|
|
|
|
|
Example : |
231
|
|
|
|
|
|
|
Returns : value of evalue |
232
|
|
|
|
|
|
|
Args : newvalue (optional) |
233
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
=cut |
236
|
|
|
|
|
|
|
|
237
|
|
|
|
|
|
|
sub evalue{ |
238
|
1504
|
|
|
1504
|
1
|
1661
|
my ($obj,$value) = @_; |
239
|
1504
|
100
|
|
|
|
1894
|
if( defined $value) { |
240
|
1503
|
|
|
|
|
1873
|
$obj->{'evalue'} = $value; |
241
|
|
|
|
|
|
|
} |
242
|
1504
|
|
|
|
|
1685
|
return $obj->{'evalue'}; |
243
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
} |
245
|
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
sub addHMMUnit { |
248
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
249
|
0
|
|
|
|
|
|
my $unit = shift; |
250
|
|
|
|
|
|
|
|
251
|
0
|
|
|
|
|
|
$self->warn("Using old addHMMUnit call on Bio::Tools::HMMER::Set. Should replace with add_Domain"); |
252
|
0
|
|
|
|
|
|
return $self->add_Domain($unit); |
253
|
|
|
|
|
|
|
} |
254
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
sub eachHMMUnit { |
256
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
257
|
0
|
|
|
|
|
|
$self->warn("Using old eachHMMUnit call on Bio::Tools::HMMER::Set. Should replace with each_Domain"); |
258
|
0
|
|
|
|
|
|
return $self->each_Domain(); |
259
|
|
|
|
|
|
|
} |
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
1; # says use was ok |
262
|
|
|
|
|
|
|
__END__ |