~ubuntu-branches/ubuntu/raring/bioperl/raring

« back to all changes in this revision

Viewing changes to Bio/Search/Result/BlastResult.pm

  • Committer: Bazaar Package Importer
  • Author(s): Charles Plessy
  • Date: 2008-03-18 14:44:57 UTC
  • mfrom: (4 hardy)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20080318144457-1jjoztrvqwf0gruk
* debian/control:
  - Removed MIA Matt Hope (dopey) from the Uploaders field.
    Thank you for your work, Matt. I hope you are doing well.
  - Downgraded some recommended package to the 'Suggests' priority,
    according to the following discussion on Upstream's mail list.
    http://bioperl.org/pipermail/bioperl-l/2008-March/027379.html
    (Closes: #448890)
* debian/copyright converted to machine-readable format.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# $Id: BlastResult.pm,v 1.15 2003/05/12 09:10:21 heikki Exp $
 
1
# $Id: BlastResult.pm,v 1.22.4.3 2006/10/02 23:10:24 sendu Exp $
2
2
#
3
3
# BioPerl module for Bio::Search::Result::BlastResult
4
4
#
50
50
Bioperl modules. Send your comments and suggestions preferably to
51
51
the Bioperl mailing list.  Your participation is much appreciated.
52
52
 
53
 
  bioperl-l@bioperl.org              - General discussion
54
 
  http://bioperl.org/MailList.shtml  - About the mailing lists
 
53
  bioperl-l@bioperl.org                  - General discussion
 
54
  http://bioperl.org/wiki/Mailing_lists  - About the mailing lists
55
55
 
56
56
=head2 Reporting Bugs
57
57
 
58
58
Report bugs to the Bioperl bug tracking system to help us keep track
59
 
of the bugs and their resolution. Bug reports can be submitted via
60
 
email or the web:
 
59
of the bugs and their resolution. Bug reports can be submitted via the
 
60
web:
61
61
 
62
 
  bioperl-bugs@bioperl.org
63
 
  http://bugzilla.bioperl.org/
 
62
  http://bugzilla.open-bio.org/
64
63
 
65
64
=head1 AUTHOR - Steve Chervitz
66
65
 
67
66
Email sac@bioperl.org
68
67
 
69
 
=head1 CONTRIBUTORS
70
 
 
71
 
Additional contributors names and emails here
72
 
 
73
68
=head1 APPENDIX
74
69
 
75
70
The rest of the documentation details each of the object methods.
82
77
 
83
78
 
84
79
package Bio::Search::Result::BlastResult;
85
 
use vars qw(@ISA);
86
80
use strict;
87
81
 
88
 
use Bio::Search::Result::GenericResult;
 
82
use Bio::Search::BlastStatistics;
89
83
 
90
 
@ISA = qw( Bio::Search::Result::GenericResult );
 
84
use base qw(Bio::Search::Result::GenericResult);
91
85
 
92
86
=head2 new
93
87
 
183
177
        $iter_index = $self->{'_iter_index'};
184
178
    }
185
179
 
186
 
    return undef if $iter_index >= scalar @{$self->{'_iterations'}};
 
180
    return if $iter_index >= scalar @{$self->{'_iterations'}};
187
181
 
188
182
    my $it = $self->{'_iterations'}->[$iter_index];
189
183
    my $hit = $self->{'_last_hit'} = $it->next_hit;
216
210
    return scalar( $self->hits );
217
211
}
218
212
 
 
213
=head2 add_hit
 
214
 
 
215
 Title   : add_hit
 
216
 Usage   : $report->add_hit($hit)
 
217
 Function: Adds a HitI to the stored list of hits
 
218
 Returns : Number of HitI currently stored
 
219
 Args    : Bio::Search::Hit::HitI
 
220
 
 
221
=cut
 
222
 
 
223
sub add_hit {
 
224
    my ($self,$hit) = @_;
 
225
    my $iter = $self->iteration;
 
226
    if( $hit->isa('Bio::Search::Hit::HitI') ) { 
 
227
        return $iter->add_hit(-hit => $hit);
 
228
    } else { 
 
229
        $self->throw("Passed in a " .ref($hit). 
 
230
                     " as a Iteration which is not a Bio::Search::Hit::HitI.");
 
231
    }
 
232
    return $iter->num_hits;
 
233
}
 
234
 
219
235
=head2 add_iteration
220
236
 
221
237
 Title   : add_iteration
233
249
        $self->{'_iteration_count'}++;
234
250
    } else { 
235
251
        $self->throw("Passed in a " .ref($i). 
236
 
                     " as a Iteration which is not a Bio::Search::IterationI.");
 
252
                     " as a Iteration which is not a Bio::Search::Iteration::IterationI.");
237
253
    }
238
254
    return scalar @{$self->{'_iterations'}};
239
255
}
475
491
    return $self->{'_inclusion_threshold'};
476
492
}
477
493
 
478
 
 
479
494
1;