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
15 Bio::Matrix::Scoring - Object which can hold scoring matrix information
19 use Bio::Matrix::Scoring;
23 An object which can handle AA or NT scoring matrix information. Some
24 transformation properties are available too.
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
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
43 http://bugzilla.open-bio.org/
45 =head1 AUTHOR - Jason Stajich
47 Email jason-at-bioperl-dot-org
51 The rest of the documentation details each of the object methods.
52 Internal methods are usually preceded with a _
57 # Let the code begin...
60 package Bio
::Matrix
::Scoring
;
64 use base
qw(Bio::Matrix::Generic);
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
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);
104 Usage : $obj->entropy($newval)
107 Returns : value of entropy (a scalar)
108 Args : on set, new value (a scalar or undef, optional)
116 return $self->{'entropy'} = shift if @_;
117 return $self->{'entropy'};
120 =head2 expected_score
122 Title : expected_score
123 Usage : $obj->expected_score($newval)
126 Returns : value of expected (a scalar)
127 Args : on set, new value (a scalar or undef, optional)
135 return $self->{'expected'} = shift if @_;
136 return $self->{'expected'};
142 Usage : $obj->scale($newval)
145 Returns : value of scale (a scalar)
146 Args : on set, new value (a scalar or undef, optional)
154 return $self->{'scale'} = shift if @_;
155 return $self->{'scale'};
161 Usage : $obj->scale_value($newval)
164 Returns : value of scale_value (a scalar)
165 Args : on set, new value (a scalar or undef, optional)
173 return $self->{'scale_value'} = shift if @_;
174 return $self->{'scale_value'};
180 Usage : $obj->description($newval)
183 Returns : value of description (a scalar)
184 Args : on set, new value (a scalar or undef, optional)
192 return $self->{'description'} = shift if @_;
193 return $self->{'description'};
199 Usage : $obj->database($newval)
202 Returns : value of database (a scalar)
203 Args : on set, new value (a scalar or undef, optional)
211 return $self->{'database'} = shift if @_;
212 return $self->{'database'};
218 Usage : $obj->lowest_score($newval)
221 Returns : value of lowest_score (a scalar)
222 Args : on set, new value (a scalar or undef, optional)
230 return $self->{'lowest_score'} = shift if @_;
231 return $self->{'lowest_score'};
236 Title : highest_score
237 Usage : $obj->highest_score($newval)
240 Returns : value of highest_score (a scalar)
241 Args : on set, new value (a scalar or undef, optional)
249 return $self->{'highest_score'} = shift if @_;
250 return $self->{'highest_score'};
256 Usage : $obj->lambda($newval)
259 Returns : value of lambda (a scalar)
260 Args : on set, new value (a scalar or undef, optional)
268 return $self->{'lambda'} = shift if @_;
269 return $self->{'lambda'};
275 Usage : $obj->H($newval)
278 Returns : value of H (a scalar)
279 Args : on set, new value (a scalar or undef, optional)
286 return $self->{'H'} = shift if @_;