Bio/Matrix/Scoring.pm

filter: Statementstmt 82.3% 42 / 51 Branchbran 60.0% 12 / 20 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 92.3% 12 / 13 Podpod 100% 11 / 11 totaltotal 81.0% 77 / 95 CC 11 SCAR 8.5
CC
11
Cov
76%
description
6.0
scale_value
2.3
database
2.3
CRAP 2.4
« Bio/Matrix/PSM/Psm.pm ↑ Summary Bio/Matrix/Mlagan.pm »
1 #
2 # BioPerl module for Bio::Matrix::Scoring
3 #
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
5 #
6 # Cared for by Jason Stajich <jason-at-bioperl-dot-org>
7 #
8 # Copyright Jason Stajich
9 #
10 # You may distribute this module under the same terms as perl itself
11  
12 # POD documentation - main docs before the code
13  
14 =head1 NAME
15  
16 Bio::Matrix::Scoring - Object which can hold scoring matrix information
17  
18 =head1 SYNOPSIS
19  
20 use Bio::Matrix::Scoring;
21  
22 =head1 DESCRIPTION
23  
24 An object which can handle AA or NT scoring matrix information. Some
25 transformation properties are available too.
26  
27 =head1 FEEDBACK
28  
29 =head2 Mailing Lists
30  
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.
34  
35 bioperl-l@bioperl.org - General discussion
36 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
37  
38 =head2 Support
39  
40 Please direct usage questions or support issues to the mailing list:
41  
42 I<bioperl-l@bioperl.org>
43  
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.
48  
49 =head2 Reporting Bugs
50  
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
53 the web:
54  
55 https://github.com/bioperl/bioperl-live/issues
56  
57 =head1 AUTHOR - Jason Stajich
58  
59 Email jason-at-bioperl-dot-org
60  
61 =head1 APPENDIX
62  
63 The rest of the documentation details each of the object methods.
64 Internal methods are usually preceded with a _
65  
66 =cut
67  
68  
69 # Let the code begin...
70  
71  
72 package Bio::Matrix::Scoring;
73 3 $Bio::Matrix::Scoring::VERSION = '1.7.8';
74 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
75  
76  
77 3 ▶use base qw(Bio::Matrix::Generic);
Subroutine BEGIN: called CC=1 SCAR=0.0
78  
79 =head2 new
80  
81 Title : new
82 Usage : my $obj = Bio::Matrix::Scoring->new();
83 Function: Builds a new Bio::Matrix::Scoring object
84 Returns : an instance of Bio::Matrix::Scoring
85 Args :
86  
87  
88 =cut
89  
90  
91 2 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod documented
92 2 my ($class, @args) = @_;
93 2 my $self = $class->SUPER::new(@args);
94
95 2 my ($entropy,$expected,$scale,$scaleval,$database,
96 $lowestscore,$highestscore,$lambda,$H) =
97 $self->_rearrange([qw(
98 ENTROPY EXPECTED SCALE SCALE_VALUE DATABASE
99 LOWEST_SCORE HIGHEST_SCORE LAMBDA H)], @args);
100  
101 2 $self->entropy ($entropy);
102 2 $self->expected_score($expected);
103 2 $self->scale ($scale);
104 2 $self->scale_value($scaleval);
105 2 $self->database ($database);
106 2 $self->lowest_score($lowestscore);
107 2 $self->highest_score($highestscore);
108 2 $self->lambda($lambda);
109 2 $self->H($H);
110
111 2 return $self;
112 }
113  
114 =head2 entropy
115  
116 Title : entropy
117 Usage : $obj->entropy($newval)
118 Function:
119 Example :
120 Returns : value of entropy (a scalar)
121 Args : on set, new value (a scalar or undef, optional)
122  
123  
124 =cut
125  
126 4 ▶sub entropy{
Subroutine entropy: called CC=2 SCAR=6.9
Pod documented
127 4 my $self = shift;
128  
129 4 ▶ return $self->{'entropy'} = shift if @_;
Branch: 1 branch
BranchTrueFalseTotal
if @_ 2 2 4
130 2 return $self->{'entropy'};
131 }
132  
133 =head2 expected_score
134  
135 Title : expected_score
136 Usage : $obj->expected_score($newval)
137 Function:
138 Example :
139 Returns : value of expected (a scalar)
140 Args : on set, new value (a scalar or undef, optional)
141  
142  
143 =cut
144  
145 4 ▶sub expected_score{
Subroutine expected_score: called CC=2 SCAR=6.9
Pod documented
146 4 my $self = shift;
147  
148 4 ▶ return $self->{'expected'} = shift if @_;
Branch: 1 branch
BranchTrueFalseTotal
if @_ 2 2 4
149 2 return $self->{'expected'};
150 }
151  
152 =head2 scale
153  
154 Title : scale
155 Usage : $obj->scale($newval)
156 Function:
157 Example :
158 Returns : value of scale (a scalar)
159 Args : on set, new value (a scalar or undef, optional)
160  
161  
162 =cut
163  
164 4 ▶sub scale{
Subroutine scale: called CC=2 SCAR=6.9
Pod documented
165 4 my $self = shift;
166  
167 4 ▶ return $self->{'scale'} = shift if @_;
Branch: 1 branch
BranchTrueFalseTotal
if @_ 2 2 4
168 2 return $self->{'scale'};
169 }
170  
171 =head2 scale_value
172  
173 Title : scale_value
174 Usage : $obj->scale_value($newval)
175 Function:
176 Example :
177 Returns : value of scale_value (a scalar)
178 Args : on set, new value (a scalar or undef, optional)
179  
180  
181 =cut
182  
183 2 ▶sub scale_value{
Subroutine scale_value: called CC=2 SCAR=8.1
Pod documented
184 2 my $self = shift;
185  
186 2 ▶ return $self->{'scale_value'} = shift if @_;
Branch: 1 branch
BranchTrueFalseTotal
if @_ 2 0 2
187 0 return $self->{'scale_value'};
188 }
189  
190 =head2 description
191  
192 Title : description
193 Usage : $obj->description($newval)
194 Function:
195 Example :
196 Returns : value of description (a scalar)
197 Args : on set, new value (a scalar or undef, optional)
198  
199  
200 =cut
201  
202 0 ▶sub description{
Subroutine description: not called CC=2 SCAR=17.9
Pod documented
203 0 my $self = shift;
204  
205 0 ▶ return $self->{'description'} = shift if @_;
Branch: 1 branch
BranchTrueFalseTotal
if @_ 0 0 0
206 0 return $self->{'description'};
207 }
208  
209 =head2 database
210  
211 Title : database
212 Usage : $obj->database($newval)
213 Function:
214 Example :
215 Returns : value of database (a scalar)
216 Args : on set, new value (a scalar or undef, optional)
217  
218  
219 =cut
220  
221 2 ▶sub database{
Subroutine database: called CC=2 SCAR=8.1
Pod documented
222 2 my $self = shift;
223  
224 2 ▶ return $self->{'database'} = shift if @_;
Branch: 1 branch
BranchTrueFalseTotal
if @_ 2 0 2
225 0 return $self->{'database'};
226 }
227  
228 =head2 lowest_score
229  
230 Title : lowest_score
231 Usage : $obj->lowest_score($newval)
232 Function:
233 Example :
234 Returns : value of lowest_score (a scalar)
235 Args : on set, new value (a scalar or undef, optional)
236  
237  
238 =cut
239  
240 2 ▶sub lowest_score{
Subroutine lowest_score: called CC=2 SCAR=8.1
Pod documented
241 2 my $self = shift;
242  
243 2 ▶ return $self->{'lowest_score'} = shift if @_;
Branch: 1 branch
BranchTrueFalseTotal
if @_ 2 0 2
244 0 return $self->{'lowest_score'};
245 }
246  
247 =head2 highest_score
248  
249 Title : highest_score
250 Usage : $obj->highest_score($newval)
251 Function:
252 Example :
253 Returns : value of highest_score (a scalar)
254 Args : on set, new value (a scalar or undef, optional)
255  
256  
257 =cut
258  
259 2 ▶sub highest_score{
Subroutine highest_score: called CC=2 SCAR=8.1
Pod documented
260 2 my $self = shift;
261  
262 2 ▶ return $self->{'highest_score'} = shift if @_;
Branch: 1 branch
BranchTrueFalseTotal
if @_ 2 0 2
263 0 return $self->{'highest_score'};
264 }
265  
266 =head2 lambda
267  
268 Title : lambda
269 Usage : $obj->lambda($newval)
270 Function:
271 Example :
272 Returns : value of lambda (a scalar)
273 Args : on set, new value (a scalar or undef, optional)
274  
275  
276 =cut
277  
278 2 ▶sub lambda{
Subroutine lambda: called CC=2 SCAR=8.1
Pod documented
279 2 my $self = shift;
280  
281 2 ▶ return $self->{'lambda'} = shift if @_;
Branch: 1 branch
BranchTrueFalseTotal
if @_ 2 0 2
282 0 return $self->{'lambda'};
283 }
284  
285 =head2 H
286  
287 Title : H
288 Usage : $obj->H($newval)
289 Function:
290 Example :
291 Returns : value of H (a scalar)
292 Args : on set, new value (a scalar or undef, optional)
293  
294  
295 =cut
296  
297 2 ▶sub H{
Subroutine H: called CC=2 SCAR=8.1
Pod documented
298 2 my $self = shift;
299 2 ▶ return $self->{'H'} = shift if @_;
Branch: 1 branch
BranchTrueFalseTotal
if @_ 2 0 2
300 0 return $self->{'H'};
301 }
302  
303 3 1;
« Bio/Matrix/PSM/Psm.pm ↑ Summary Bio/Matrix/Mlagan.pm »