Remove (merge didn't remove this for some reason)
[bioperl-live.git] / Bio / Matrix / Scoring.pm
blob76691d32e5607420c84aac3a884b4191e0833554
1 # $Id$
3 # BioPerl module for Bio::Matrix::Scoring
5 # Cared for by Jason Stajich <jason-at-bioperl-dot-org>
7 # Copyright Jason Stajich
9 # You may distribute this module under the same terms as perl itself
11 # POD documentation - main docs before the code
13 =head1 NAME
15 Bio::Matrix::Scoring - Object which can hold scoring matrix information
17 =head1 SYNOPSIS
19 use Bio::Matrix::Scoring;
21 =head1 DESCRIPTION
23 An object which can handle AA or NT scoring matrix information. Some
24 transformation properties are available too.
26 =head1 FEEDBACK
28 =head2 Mailing Lists
30 User feedback is an integral part of the evolution of this and other
31 Bioperl modules. Send your comments and suggestions preferably to
32 the Bioperl mailing list. Your participation is much appreciated.
34 bioperl-l@bioperl.org - General discussion
35 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
37 =head2 Reporting Bugs
39 Report bugs to the Bioperl bug tracking system to help us keep track
40 of the bugs and their resolution. Bug reports can be submitted via
41 the web:
43 http://bugzilla.open-bio.org/
45 =head1 AUTHOR - Jason Stajich
47 Email jason-at-bioperl-dot-org
49 =head1 APPENDIX
51 The rest of the documentation details each of the object methods.
52 Internal methods are usually preceded with a _
54 =cut
57 # Let the code begin...
60 package Bio::Matrix::Scoring;
61 use strict;
64 use base qw(Bio::Matrix::Generic);
66 =head2 new
68 Title : new
69 Usage : my $obj = Bio::Matrix::Scoring->new();
70 Function: Builds a new Bio::Matrix::Scoring object
71 Returns : an instance of Bio::Matrix::Scoring
72 Args :
75 =cut
78 sub new {
79 my ($class, @args) = @_;
80 my $self = $class->SUPER::new(@args);
82 my ($entropy,$expected,$scale,$scaleval,$database,
83 $lowestscore,$highestscore,$lambda,$H) =
84 $self->_rearrange([qw(
85 ENTROPY EXPECTED SCALE SCALE_VALUE DATABASE
86 LOWEST_SCORE HIGHEST_SCORE LAMBDA H)], @args);
88 $self->entropy ($entropy);
89 $self->expected_score($expected);
90 $self->scale ($scale);
91 $self->scale_value($scaleval);
92 $self->database ($database);
93 $self->lowest_score($lowestscore);
94 $self->highest_score($highestscore);
95 $self->lambda($lambda);
96 $self->H($H);
98 return $self;
101 =head2 entropy
103 Title : entropy
104 Usage : $obj->entropy($newval)
105 Function:
106 Example :
107 Returns : value of entropy (a scalar)
108 Args : on set, new value (a scalar or undef, optional)
111 =cut
113 sub entropy{
114 my $self = shift;
116 return $self->{'entropy'} = shift if @_;
117 return $self->{'entropy'};
120 =head2 expected_score
122 Title : expected_score
123 Usage : $obj->expected_score($newval)
124 Function:
125 Example :
126 Returns : value of expected (a scalar)
127 Args : on set, new value (a scalar or undef, optional)
130 =cut
132 sub expected_score{
133 my $self = shift;
135 return $self->{'expected'} = shift if @_;
136 return $self->{'expected'};
139 =head2 scale
141 Title : scale
142 Usage : $obj->scale($newval)
143 Function:
144 Example :
145 Returns : value of scale (a scalar)
146 Args : on set, new value (a scalar or undef, optional)
149 =cut
151 sub scale{
152 my $self = shift;
154 return $self->{'scale'} = shift if @_;
155 return $self->{'scale'};
158 =head2 scale_value
160 Title : scale_value
161 Usage : $obj->scale_value($newval)
162 Function:
163 Example :
164 Returns : value of scale_value (a scalar)
165 Args : on set, new value (a scalar or undef, optional)
168 =cut
170 sub scale_value{
171 my $self = shift;
173 return $self->{'scale_value'} = shift if @_;
174 return $self->{'scale_value'};
177 =head2 description
179 Title : description
180 Usage : $obj->description($newval)
181 Function:
182 Example :
183 Returns : value of description (a scalar)
184 Args : on set, new value (a scalar or undef, optional)
187 =cut
189 sub description{
190 my $self = shift;
192 return $self->{'description'} = shift if @_;
193 return $self->{'description'};
196 =head2 database
198 Title : database
199 Usage : $obj->database($newval)
200 Function:
201 Example :
202 Returns : value of database (a scalar)
203 Args : on set, new value (a scalar or undef, optional)
206 =cut
208 sub database{
209 my $self = shift;
211 return $self->{'database'} = shift if @_;
212 return $self->{'database'};
215 =head2 lowest_score
217 Title : lowest_score
218 Usage : $obj->lowest_score($newval)
219 Function:
220 Example :
221 Returns : value of lowest_score (a scalar)
222 Args : on set, new value (a scalar or undef, optional)
225 =cut
227 sub lowest_score{
228 my $self = shift;
230 return $self->{'lowest_score'} = shift if @_;
231 return $self->{'lowest_score'};
234 =head2 highest_score
236 Title : highest_score
237 Usage : $obj->highest_score($newval)
238 Function:
239 Example :
240 Returns : value of highest_score (a scalar)
241 Args : on set, new value (a scalar or undef, optional)
244 =cut
246 sub highest_score{
247 my $self = shift;
249 return $self->{'highest_score'} = shift if @_;
250 return $self->{'highest_score'};
253 =head2 lambda
255 Title : lambda
256 Usage : $obj->lambda($newval)
257 Function:
258 Example :
259 Returns : value of lambda (a scalar)
260 Args : on set, new value (a scalar or undef, optional)
263 =cut
265 sub lambda{
266 my $self = shift;
268 return $self->{'lambda'} = shift if @_;
269 return $self->{'lambda'};
272 =head2 H
274 Title : H
275 Usage : $obj->H($newval)
276 Function:
277 Example :
278 Returns : value of H (a scalar)
279 Args : on set, new value (a scalar or undef, optional)
282 =cut
284 sub H{
285 my $self = shift;
286 return $self->{'H'} = shift if @_;
287 return $self->{'H'};