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

« back to all changes in this revision

Viewing changes to Bio/Search/BlastStatistics.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
 
2
#
 
3
# BioPerl module for wrapping Blast statistics
 
4
#
 
5
# Cared for by Chad Matsalla (bioinformatics1 at dieselwurks dot com)
 
6
#
 
7
# Copyright Chad Matsalla
 
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::BlastStatistics - An object for Blast statistics
 
16
 
 
17
=head1 SYNOPSIS
 
18
 
 
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();
 
25
 
 
26
 
 
27
=head1 DESCRIPTION
 
28
 
 
29
This is a basic container to hold the statistics returned from a Blast.
 
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 Reporting Bugs
 
43
 
 
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
 
46
web:
 
47
 
 
48
  http://bugzilla.open-bio.org/
 
49
 
 
50
=head1 AUTHOR - Chad Matsalla
 
51
 
 
52
Email bioinformatics1 at dieselwurks dot com
 
53
 
 
54
=head1 APPENDIX
 
55
 
 
56
The rest of the documentation details each of the object methods.
 
57
Internal methods are usually preceded with a _
 
58
 
 
59
=cut
 
60
 
 
61
 
 
62
# Let the code begin...
 
63
 
 
64
 
 
65
package Bio::Search::BlastStatistics;
 
66
use strict;
 
67
 
 
68
# Object preamble - inherits from Bio::Root::Root
 
69
 
 
70
 
 
71
use base qw(Bio::Root::RootI Bio::Search::StatisticsI);
 
72
 
 
73
 
 
74
 
 
75
 
 
76
 
 
77
sub new {
 
78
    my ($class, @args) = @_; 
 
79
          # really, don't bother with any initial initialization
 
80
    my $self = $class->SUPER::new(@args);
 
81
    return $self;
 
82
}
 
83
 
 
84
 
 
85
=head2 get_statistic
 
86
 
 
87
 Title   : get_statistic
 
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
 
92
 
 
93
=cut
 
94
 
 
95
sub get_statistic {
 
96
   my ($self,$arg) = @_;
 
97
     return $self->{$arg};
 
98
}
 
99
 
 
100
 
 
101
=head2 set_statistic
 
102
 
 
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
 
106
 Returns : Void
 
107
 Args    : A hash containing name=>value pairs
 
108
 
 
109
=cut
 
110
 
 
111
sub set_statistic {
 
112
   my ($self,%args) = @_;
 
113
     foreach (keys %args) {
 
114
          $self->{$_} = $args{$_};
 
115
     }
 
116
}
 
117
 
 
118
 
 
119
 
 
120
1;