lib/Bio/Search/Hit/HMMERHit.pm

filter: Statementstmt 83.3% 10 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod 100% 4 / 4 totaltotal 81.8% 18 / 22 CC 1 SCAR 2.9
CC
1
Cov
83%
domains
2.0
iteration
2.0
BEGIN
1.0
CRAP 1.3
« lib/Bio/Search/Hit/hmmer3Hit.pm ↑ Summary lib/Bio/Search/HSP/HMMERHSP.pm »
1 #
2 # BioPerl module for Bio::Search::Hit::HMMERHit
3 #
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
5 #
6 # Cared for by Jason Stajich <jason@bioperl.org>
7 #
8 # Copyright Jason Stajich
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::Search::Hit::HMMERHit - A Hit module for HMMER hits
17  
18 =head1 SYNOPSIS
19  
20 use Bio::Search::Hit::HMMERHit;
21 my $hit = Bio::Search::Hit::HMMERHit->new();
22 # use it in the same way as Bio::Search::Hit::GenericHit
23  
24 =head1 DESCRIPTION
25  
26 This is a specialization of L<Bio::Search::Hit::GenericHit>. There
27 are a few news methods L<next_domain> and L<domains>. Note that
28 L<bits> and L<iteration> make no sense for this object and will
29 return 0.
30  
31 =head1 FEEDBACK
32  
33 =head2 Mailing Lists
34  
35 User feedback is an integral part of the evolution of this and other
36 Bioperl modules. Send your comments and suggestions preferably to
37 the Bioperl mailing list. Your participation is much appreciated.
38  
39 bioperl-l@bioperl.org - General discussion
40 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
41  
42 =head2 Support
43  
44 Please direct usage questions or support issues to the mailing list:
45  
46 I<bioperl-l@bioperl.org>
47  
48 rather than to the module maintainer directly. Many experienced and
49 reponsive experts will be able look at the problem and quickly
50 address it. Please include a thorough description of the problem
51 with code and data examples if at all possible.
52  
53 =head2 Reporting Bugs
54  
55 Report bugs to the Bioperl bug tracking system to help us keep track
56 of the bugs and their resolution. Bug reports can be submitted via the
57 web:
58  
59 https://github.com/bioperl/bioperl-live/issues
60  
61 =head1 AUTHOR - Jason Stajich
62  
63 Email jason@bioperl.org
64  
65 =head1 APPENDIX
66  
67 The rest of the documentation details each of the object methods.
68 Internal methods are usually preceded with a _
69  
70 =cut
71  
72 # Let the code begin...
73  
74 package Bio::Search::Hit::HMMERHit;
75 3 $Bio::Search::Hit::HMMERHit::VERSION = '1.7.3';
76 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
77  
78 3 ▶use base qw(Bio::Search::Hit::GenericHit);
Subroutine BEGIN: called CC=1 SCAR=0.0
79  
80 =head2 new
81  
82 Title : new
83 Usage : my $obj = Bio::Search::Hit::HMMERHit->new();
84 Function: Builds a new Bio::Search::Hit::HMMERHit object
85 Returns : Bio::Search::Hit::HMMERHit
86 Args :
87  
88 Plus the Bio::Search::Hit::GenericHit inherited params
89 -name => Name of Hit (required)
90 -description => Description (optional)
91 -accession => Accession number (optional)
92 -length => Length of the Hit (optional)
93 -score => Raw Score for the Hit (optional)
94 -significance => Significance value for the Hit (optional)
95 -algorithm => Algorithm used (BLASTP, FASTX, etc...)
96 -hsps => Array ref of HSPs for this Hit.
97  
98  
99 =cut
100  
101  
102 =head2 next_domain
103  
104 Title : next_domain
105 Usage : my $domain = $hit->next_domain();
106 Function: An alias for L<next_hsp()>, this will return the next HSP
107 Returns : L<Bio::Search::HSP::HSPI> object
108 Args : none
109  
110  
111 =cut
112  
113 32 ▶sub next_domain{ shift->next_hsp }
Subroutine next_domain: called CC=1 SCAR=0.0
Pod documented
114  
115 =head2 domains
116  
117 Title : domains
118 Usage : my @domains = $hit->domains();
119 Function: An alias for L<hsps()>, this will return the full list of hsps
120 Returns : array of L<Bio::Search::HSP::HSPI> objects
121 Args : none
122  
123  
124 =cut
125  
126 0 ▶sub domains{ shift->hsps() }
Subroutine domains: not called CC=1 SCAR=6.9
Pod documented
127  
128  
129 =head2 inherited Bio::Search::Hit::GenericHit methods
130  
131 =cut
132  
133 =head2 add_hsp
134  
135 Title : add_hsp
136 Usage : $hit->add_hsp($hsp)
137 Function: Add a HSP to the collection of HSPs for a Hit
138 Returns : number of HSPs in the Hit
139 Args : Bio::Search::HSP::HSPI object
140  
141  
142 =cut
143  
144 =head2 Bio::Search::Hit::HitI methods
145  
146 =cut
147  
148 =head2 name
149  
150 Title : name
151 Usage : $hit_name = $hit->name();
152 Function: returns the name of the Hit sequence
153 Returns : a scalar string
154 Args : [optional] scalar string to set the name
155  
156 =cut
157  
158 =head2 accession
159  
160 Title : accession
161 Usage : $acc = $hit->accession();
162 Function: Retrieve the accession (if available) for the hit
163 Returns : a scalar string (empty string if not set)
164 Args : none
165  
166 =cut
167  
168 =head2 description
169  
170 Title : description
171 Usage : $desc = $hit->description();
172 Function: Retrieve the description for the hit
173 Returns : a scalar string
174 Args : [optional] scalar string to set the description
175  
176 =cut
177  
178 =head2 length
179  
180 Title : length
181 Usage : my $len = $hit->length
182 Function: Returns the length of the hit
183 Returns : integer
184 Args : [optional] integer to set the length
185  
186 =cut
187  
188 =head2 algorithm
189  
190 Title : algorithm
191 Usage : $alg = $hit->algorithm();
192 Function: Gets the algorithm specification that was used to obtain the hit
193 For BLAST, the algorithm denotes what type of sequence was aligned
194 against what (BLASTN: dna-dna, BLASTP prt-prt, BLASTX translated
195 dna-prt, TBLASTN prt-translated dna, TBLASTX translated
196 dna-translated dna).
197 Returns : a scalar string
198 Args : [optional] scalar string to set the algorithm
199  
200 =cut
201  
202 =head2 raw_score
203  
204 Title : raw_score
205 Usage : $score = $hit->raw_score();
206 Function: Gets the "raw score" generated by the algorithm. What
207 this score is exactly will vary from algorithm to algorithm,
208 returning undef if unavailable.
209 Returns : a scalar value
210 Args : [optional] scalar value to set the raw score
211  
212 =cut
213  
214 =head2 significance
215  
216 Title : significance
217 Usage : $significance = $hit->significance();
218 Function: Used to obtain the E or P value of a hit, i.e. the probability that
219 this particular hit was obtained purely by random chance. If
220 information is not available (nor calculatable from other
221 information sources), return undef.
222 Returns : a scalar value or undef if unavailable
223 Args : [optional] scalar value to set the significance
224  
225 =cut
226  
227 =head2 bits
228  
229 Usage : $hit_object->bits();
230 Purpose : Gets the bit score of the best HSP for the current hit.
231 Example : $bits = $hit_object->bits();
232 Returns : Integer or undef if bit score is not set
233 Argument : n/a
234  
235 See Also : L<score()|score>
236  
237 =cut
238  
239 11 ▶sub bits { return 0 }
Subroutine bits: called CC=1 SCAR=0.0
Pod documented
240  
241 =head2 next_hsp
242  
243 Title : next_hsp
244 Usage : while( $hsp = $obj->next_hsp()) { ... }
245 Function : Returns the next available High Scoring Pair
246 Example :
247 Returns : Bio::Search::HSP::HSPI object or null if finished
248 Args : none
249  
250 =cut
251  
252 =head2 hsps
253  
254 Usage : $hit_object->hsps();
255 Purpose : Get a list containing all HSP objects.
256 : Get the numbers of HSPs for the current hit.
257 Example : @hsps = $hit_object->hsps();
258 : $num = $hit_object->hsps(); # alternatively, use num_hsps()
259 Returns : Array context : list of Bio::Search::HSP::BlastHSP.pm objects.
260 : Scalar context: integer (number of HSPs).
261 : (Equivalent to num_hsps()).
262 Argument : n/a. Relies on wantarray
263 Throws : Exception if the HSPs have not been collected.
264  
265 See Also : L<hsp()|hsp>, L<num_hsps()|num_hsps>
266  
267 =cut
268  
269 =head2 num_hsps
270  
271 Usage : $hit_object->num_hsps();
272 Purpose : Get the number of HSPs for the present Blast hit.
273 Example : $nhsps = $hit_object->num_hsps();
274 Returns : Integer
275 Argument : n/a
276 Throws : Exception if the HSPs have not been collected.
277  
278 See Also : L<hsps()|hsps>
279  
280 =cut
281  
282 =head2 rewind
283  
284 Title : rewind
285 Usage : $hit->rewind;
286 Function: Allow one to reset the HSP iteration to the beginning
287 Since this is an in-memory implementation
288 Returns : none
289 Args : none
290  
291 =cut
292  
293 =head2 iteration
294  
295 Title : iteration
296 Usage : $obj->iteration($newval)
297 Function: PSI-BLAST iteration
298 Returns : value of iteration
299 Args : newvalue (optional)
300  
301  
302 =cut
303  
304  
305 0 ▶sub iteration { return 0 }
Subroutine iteration: not called CC=1 SCAR=6.9
Pod documented
306  
307 3 1;
« lib/Bio/Search/Hit/hmmer3Hit.pm ↑ Summary lib/Bio/Search/HSP/HMMERHSP.pm »