3
# BioPerl module for wrapping Blast statistics
5
# Cared for by Chad Matsalla (bioinformatics1 at dieselwurks dot com)
7
# Copyright Chad Matsalla
9
# You may distribute this module under the same terms as perl itself
11
# POD documentation - main docs before the code
15
Bio::Search::BlastStatistics - An object for Blast statistics
19
# this is a wrapper to hold the statistics from a Blast report
20
my $bs = $result->get_statistics();
21
# you can get a statistic generically, like this:
22
my $kappa = $bs->get_statistic("kappa");
23
# or specifically, like this:
24
my $kappa2 = $bs->get_kappa();
29
This is a basic container to hold the statistics returned from a Blast.
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.
39
bioperl-l@bioperl.org - General discussion
40
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
44
Report bugs to the Bioperl bug tracking system to help us keep track
45
of the bugs and their resolution. Bug reports can be submitted via the
48
http://bugzilla.open-bio.org/
50
=head1 AUTHOR - Chad Matsalla
52
Email bioinformatics1 at dieselwurks dot com
56
The rest of the documentation details each of the object methods.
57
Internal methods are usually preceded with a _
62
# Let the code begin...
65
package Bio::Search::BlastStatistics;
68
# Object preamble - inherits from Bio::Root::Root
71
use base qw(Bio::Root::RootI Bio::Search::StatisticsI);
78
my ($class, @args) = @_;
79
# really, don't bother with any initial initialization
80
my $self = $class->SUPER::new(@args);
88
Usage : $statistic_object->get_statistic($statistic_name);
89
Function: Get the value of a statistic named $statistic_name
90
Returns : A scalar that should be a string
91
Args : A scalar that should be a string
103
Title : set_statistic
104
Usage : $statistic_object->set_statistic($statistic_name => $statistic_value);
105
Function: Set the value of a statistic named $statistic_name to $statistic_value
107
Args : A hash containing name=>value pairs
112
my ($self,%args) = @_;
113
foreach (keys %args) {
114
$self->{$_} = $args{$_};