comparison variant_effect_predictor/Bio/Search/Hit/HMMERHit.pm @ 0:1f6dce3d34e0

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