tag fourth (and hopefully last) alpha
[bioperl-live.git] / branch-1-6 / Bio / Search / BlastStatistics.pm
blob25a20ec7588622287314d1a793cd2bef1fa9402a
1 #
3 # BioPerl module for wrapping Blast statistics
5 # Please direct questions and support issues to <bioperl-l@bioperl.org>
7 # Cared for by Chad Matsalla (bioinformatics1 at dieselwurks dot com)
9 # Copyright Chad Matsalla
11 # You may distribute this module under the same terms as perl itself
13 # POD documentation - main docs before the code
15 =head1 NAME
17 Bio::Search::BlastStatistics - An object for Blast statistics
19 =head1 SYNOPSIS
21 # this is a wrapper to hold the statistics from a Blast report
22 my $bs = $result->get_statistics();
23 # you can get a statistic generically, like this:
24 my $kappa = $bs->get_statistic("kappa");
25 # or specifically, like this:
26 my $kappa2 = $bs->get_kappa();
29 =head1 DESCRIPTION
31 This is a basic container to hold the statistics returned from a Blast.
33 =head1 FEEDBACK
35 =head2 Mailing Lists
37 User feedback is an integral part of the evolution of this and other
38 Bioperl modules. Send your comments and suggestions preferably to
39 the Bioperl mailing list. Your participation is much appreciated.
41 bioperl-l@bioperl.org - General discussion
42 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
44 =head2 Support
46 Please direct usage questions or support issues to the mailing list:
48 I<bioperl-l@bioperl.org>
50 rather than to the module maintainer directly. Many experienced and
51 reponsive experts will be able look at the problem and quickly
52 address it. Please include a thorough description of the problem
53 with code and data examples if at all possible.
55 =head2 Reporting Bugs
57 Report bugs to the Bioperl bug tracking system to help us keep track
58 of the bugs and their resolution. Bug reports can be submitted via the
59 web:
61 http://bugzilla.open-bio.org/
63 =head1 AUTHOR - Chad Matsalla
65 Email bioinformatics1 at dieselwurks dot com
67 =head1 APPENDIX
69 The rest of the documentation details each of the object methods.
70 Internal methods are usually preceded with a _
72 =cut
75 # Let the code begin...
78 package Bio::Search::BlastStatistics;
79 use strict;
81 # Object preamble - inherits from Bio::Root::Root
84 use base qw(Bio::Root::RootI Bio::Search::StatisticsI);
90 sub new {
91 my ($class, @args) = @_;
92 # really, don't bother with any initial initialization
93 my $self = $class->SUPER::new(@args);
94 return $self;
98 =head2 get_statistic
100 Title : get_statistic
101 Usage : $statistic_object->get_statistic($statistic_name);
102 Function: Get the value of a statistic named $statistic_name
103 Returns : A scalar that should be a string
104 Args : A scalar that should be a string
106 =cut
108 sub get_statistic {
109 my ($self,$arg) = @_;
110 return $self->{$arg};
114 =head2 set_statistic
116 Title : set_statistic
117 Usage : $statistic_object->set_statistic($statistic_name => $statistic_value);
118 Function: Set the value of a statistic named $statistic_name to $statistic_value
119 Returns : Void
120 Args : A hash containing name=>value pairs
122 =cut
124 sub set_statistic {
125 my ($self,%args) = @_;
126 foreach (keys %args) {
127 $self->{$_} = $args{$_};