2 # BioPerl module for Bio::Matrix::Scoring
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
6 # Cared for by Jason Stajich <jason-at-bioperl-dot-org>
8 # Copyright Jason Stajich
10 # You may distribute this module under the same terms as perl itself
12 # POD documentation - main docs before the code
16 Bio::Matrix::Scoring - Object which can hold scoring matrix information
20 use Bio::Matrix::Scoring;
24 An object which can handle AA or NT scoring matrix information. Some
25 transformation properties are available too.
31 User feedback is an integral part of the evolution of this and other
32 Bioperl modules. Send your comments and suggestions preferably to
33 the Bioperl mailing list. Your participation is much appreciated.
35 bioperl-l@bioperl.org - General discussion
36 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
40 Please direct usage questions or support issues to the mailing list:
42 I<bioperl-l@bioperl.org>
44 rather than to the module maintainer directly. Many experienced and
45 reponsive experts will be able look at the problem and quickly
46 address it. Please include a thorough description of the problem
47 with code and data examples if at all possible.
51 Report bugs to the Bioperl bug tracking system to help us keep track
52 of the bugs and their resolution. Bug reports can be submitted via
55 https://github.com/bioperl/bioperl-live/issues
57 =head1 AUTHOR - Jason Stajich
59 Email jason-at-bioperl-dot-org
63 The rest of the documentation details each of the object methods.
64 Internal methods are usually preceded with a _
69 # Let the code begin...
72 package Bio
::Matrix
::Scoring
;
76 use base
qw(Bio::Matrix::Generic);
81 Usage : my $obj = Bio::Matrix::Scoring->new();
82 Function: Builds a new Bio::Matrix::Scoring object
83 Returns : an instance of Bio::Matrix::Scoring
91 my ($class, @args) = @_;
92 my $self = $class->SUPER::new
(@args);
94 my ($entropy,$expected,$scale,$scaleval,$database,
95 $lowestscore,$highestscore,$lambda,$H) =
96 $self->_rearrange([qw(
97 ENTROPY EXPECTED SCALE SCALE_VALUE DATABASE
98 LOWEST_SCORE HIGHEST_SCORE LAMBDA H)], @args);
100 $self->entropy ($entropy);
101 $self->expected_score($expected);
102 $self->scale ($scale);
103 $self->scale_value($scaleval);
104 $self->database ($database);
105 $self->lowest_score($lowestscore);
106 $self->highest_score($highestscore);
107 $self->lambda($lambda);
116 Usage : $obj->entropy($newval)
119 Returns : value of entropy (a scalar)
120 Args : on set, new value (a scalar or undef, optional)
128 return $self->{'entropy'} = shift if @_;
129 return $self->{'entropy'};
132 =head2 expected_score
134 Title : expected_score
135 Usage : $obj->expected_score($newval)
138 Returns : value of expected (a scalar)
139 Args : on set, new value (a scalar or undef, optional)
147 return $self->{'expected'} = shift if @_;
148 return $self->{'expected'};
154 Usage : $obj->scale($newval)
157 Returns : value of scale (a scalar)
158 Args : on set, new value (a scalar or undef, optional)
166 return $self->{'scale'} = shift if @_;
167 return $self->{'scale'};
173 Usage : $obj->scale_value($newval)
176 Returns : value of scale_value (a scalar)
177 Args : on set, new value (a scalar or undef, optional)
185 return $self->{'scale_value'} = shift if @_;
186 return $self->{'scale_value'};
192 Usage : $obj->description($newval)
195 Returns : value of description (a scalar)
196 Args : on set, new value (a scalar or undef, optional)
204 return $self->{'description'} = shift if @_;
205 return $self->{'description'};
211 Usage : $obj->database($newval)
214 Returns : value of database (a scalar)
215 Args : on set, new value (a scalar or undef, optional)
223 return $self->{'database'} = shift if @_;
224 return $self->{'database'};
230 Usage : $obj->lowest_score($newval)
233 Returns : value of lowest_score (a scalar)
234 Args : on set, new value (a scalar or undef, optional)
242 return $self->{'lowest_score'} = shift if @_;
243 return $self->{'lowest_score'};
248 Title : highest_score
249 Usage : $obj->highest_score($newval)
252 Returns : value of highest_score (a scalar)
253 Args : on set, new value (a scalar or undef, optional)
261 return $self->{'highest_score'} = shift if @_;
262 return $self->{'highest_score'};
268 Usage : $obj->lambda($newval)
271 Returns : value of lambda (a scalar)
272 Args : on set, new value (a scalar or undef, optional)
280 return $self->{'lambda'} = shift if @_;
281 return $self->{'lambda'};
287 Usage : $obj->H($newval)
290 Returns : value of H (a scalar)
291 Args : on set, new value (a scalar or undef, optional)
298 return $self->{'H'} = shift if @_;