Tools/Run/Phylo/PAML/Evolver.pm

filter: Statementstmt 24.5% 41 / 167 Branchbran 2.7% 2 / 74 Conditioncond 0.0% 0 / 21 MC/DCmcdc 0.0% 0 / 13 Subroutinesub 42.8% 12 / 28 Podpod 100% 15 / 15 totaltotal 22.0% 70 / 318 SCAR 72.0
CC
47
Cov
16%
prepare
72.0
run
72.0
new
42.0
CRAP 1337.1
« Tools/Run/Phylo/PAML/Baseml.pm ↑ Summary Tools/Phylo/PAML.pm »
1 package Bio::Tools::Run::Phylo::PAML::Evolver;
2 1 $Bio::Tools::Run::Phylo::PAML::Evolver::VERSION = '1.7.2';
3 1 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶use vars qw(@ISA %VALIDVALUES $MINNAMELEN $PROGRAMNAME $PROGRAM);
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use Bio::Root::Root;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use Bio::AlignIO;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use Bio::SeqIO;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use Bio::TreeIO;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 1 ▶use Bio::Tools::Run::WrapperBase;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 1 ▶use Bio::Tools::Phylo::PAML;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 1 ▶use Cwd;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 1 @ISA = qw(Bio::Root::Root Bio::Tools::Run::WrapperBase);
17  
18 # ABSTRACT: Wrapper aroud the PAML program evolver
19 # AUTHOR: Albert Vilella <avilella@gmail.com>
20 # OWNER: Albert Vilella <avilella@gmail.com>
21 # LICENSE: Perl_5
22  
23  
24  
25 BEGIN {
26  
27 1 ▶ $MINNAMELEN = 25;
Subroutine BEGIN: called CC=4 SCAR=16.4
28 1 ▶ $PROGRAMNAME = 'evolver' . ($^O =~ /mswin/i ?'.exe':'');
Branch: 1 branch
BranchTrueFalseTotal
$^O =~ /mswin/i ? : 0 1 1
29 1 ▶ if( defined $ENV{'PAMLDIR'} ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $ENV{"PAMLDIR"}) 0 1 1
30 0 ▶ $PROGRAM = Bio::Root::IO->catfile($ENV{'PAMLDIR'},$PROGRAMNAME). ($^O =~ /mswin/i ?'.exe':'');;
Branch: 1 branch
BranchTrueFalseTotal
$^O =~ /mswin/i ? : 0 0 0
31 }
32  
33 # valid values for parameters, the default one is always
34 # the first one in the array
35 # much of the documentation here is lifted directly from the MCcodon.dat
36 # example file provided with the package
37  
38 # Evolver calls time for seed: SetSeed(i==-1?(int)time(NULL):i);
39 1 my $rand = int(time);
40 # my $rand = int(rand(999999));
41 1 %VALIDVALUES =
42 (
43  
44 # FIXME: there should be a 6-7-8 option that fits MCcodon or MCbase or MCaa
45 'outfmt' => [0,1],
46 # 0 * 0:paml format (mc.paml); 1:paup format (mc.paup)
47 # random number seed (odd number)
48 # FIXME: set seed to null here and ask for it later?
49 'seed' => "$rand",
50 # numseq can actually be calculated from the tree external nodes
51 # nucleotide sites
52 'nuclsites' => '1000',
53 # replicates
54 'replicates' => '1',
55 # tree length; use -1 if tree has absolute branch lengths
56 # Note that tree length and branch lengths under the codon model are
57 # measured by the expected number of nucleotide substitutions per codon
58 # (see Goldman & Yang 1994). For amino acid models, they are defined as
59 # the expected number of amino acid changes per amino acid site.
60 'tree_length' => '1.5',
61 # omega
62 # FIXME: if one wants to call for different omegas (NSsites),
63 # right now it has to be done like:
64 # $evolver->set_parameter(omega,"3\n0.2\t0.3\t0.5\n0.5\t0.9\t3.2\n");
65 # 3 * number of site classes, followed by frequencies and omega's.
66 # 0.6 0.3 0.1 # Freqs
67 # 0.1 0.8 3.2 # Omegas
68 'omega' => '0.3',
69 # kappa
70 'kappa' => '5',
71 # FIXME: this only for MCbase.dat ?
72 # model: 0:JC69, 1:K80, 2:F81, 3:F84, 4:HKY85, 5:T92, 6:TN93, 7:REV
73 # FIXME: this applies to only some models?
74 # 10 5 1 2 3 * kappa or rate parameters in model
75 # FIXME: this applies to only MCbase.dat ?
76 # 0.5 4 * <alpha> <#categories for discrete gamma>
77 ); # end of validvalues
78 }
79  
80  
81 sub program_name {
82 0 ▶ return 'evolver';
Subroutine program_name: not called CC=1 SCAR=6.9
Pod documented
83 }
84  
85  
86 sub program_dir {
87 0 ▶ return Bio::Root::IO->catfile($ENV{PAMLDIR}) if $ENV{PAMLDIR};
Subroutine program_dir: not called CC=2 SCAR=17.9
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
if $ENV{"PAMLDIR"} 0 0 0
88 }
89  
90  
91  
92 sub new {
93 0 ▶ my($class,@args) = @_;
Subroutine new: not called CC=6 SCAR=37.4
Pod documented
94  
95 0 my $self = $class->SUPER::new(@args);
96 # $self->{'_branchLengths'} = 0;
97 0 my ($tree, $st, $params, $exe)
98 = $self->_rearrange([qw(TREE SAVE_TEMPFILES PARAMS EXECUTABLE)],
99 @args);
100 0 ▶ defined $tree && $self->tree($tree);
Branch: 1 branch
BranchTrueFalseTotal
defined $tree and $self->tree($tree) 0 0 0
101 0 ▶ defined $st && $self->save_tempfiles($st);
Branch: 1 branch
BranchTrueFalseTotal
defined $st and $self->save_tempfiles($st) 0 0 0
102 0 ▶ defined $exe && $self->executable($exe);
Branch: 1 branch
BranchTrueFalseTotal
defined $exe and $self->executable($exe) 0 0 0
103  
104 0 $self->set_default_parameters();
105 0 ▶ if( defined $params ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $params) 0 0 0
106 0 ▶ if( ref($params) !~ /HASH/i ) {
Branch: 1 branch
BranchTrueFalseTotal
if (not ref($params) =~ /HASH/i) { } 0 0 0
107 0 $self->warn("Must provide a valid hash ref for parameter -FLAGS");
108 } else {
109 0 map { $self->set_parameter($_, $$params{$_}) } keys %$params;
110 }
111 }
112 0 return $self;
113 }
114  
115  
116  
117 sub prepare {
118 0 ▶ my ($self,$aln,$tree) = @_;
Subroutine prepare: not called CC=8 SCAR=42.8
Pod documented
119 # FIXME: To consider: to have save_tempfiles always TRUE by default
120 # or simply never delete
121 0 ▶ unless ( $self->save_tempfiles ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->save_tempfiles) 0 0 0
122 # brush so we don't get plaque buildup ;)
123 0 $self->cleanup();
124 }
125 0 ▶ $tree = $self->tree unless $tree;
Branch: 1 branch
BranchTrueFalseTotal
unless $tree 0 0 0
126 0 my ($tempdir) = $self->tempdir();
127  
128 # FIXME:
129 # If multiple replicates, evolver gives:
130 # A file with a concatenation of sequential phylips separated by a
131 # double return which gets correctly parsed by AlignIO next_aln
132  
133 # Or a concatenation of paup entries with tags separating them which
134 # wont get correctly parsed with current AlignIO (failed with
135 # nexus)
136  
137 # FIXME: To consider: force phylip outfmt and split the files if
138 # replicates > 1
139  
140 # if( ! ref($aln) && -e $aln ) {
141 # $tempseqfile = $aln;
142 # } else {
143 # ($tempseqFH,$tempseqfile) = $self->io->tempfile
144 # ('-dir' => $tempdir,
145 # UNLINK => ($self->save_tempfiles ? 0 : 1));
146 # my $alnout = Bio::AlignIO->new('-format' => 'phylip',
147 # '-fh' => $tempseqFH,
148 # '-interleaved' => 0,
149 # '-idlength' => $MINNAMELEN > $aln->maxdisplayname_length() ? $MINNAMELEN : $aln->maxdisplayname_length() +1);
150 # $alnout->write_aln($aln);
151 # $alnout->close();
152 # undef $alnout;
153 # close($tempseqFH);
154 # }
155 # now let's print the MCcodon.dat file.
156 # many of the these programs are finicky about what the filename is
157 # and won't even run without the properly named file. Ack
158  
159 # FIXME: we should do the appropriate here if we are simulating codons, nts o aa.
160 0 my $evolver_ctl = "$tempdir/MCcodon.dat";
161 0 my $evolverfh;
162 0 ▶ open($evolverfh, ">$evolver_ctl") or $self->throw("cannot open $evolver_ctl for writing");
Branch: 1 branch
BranchTrueFalseTotal
open $evolverfh, ">$evolver_ctl" or $self->throw("cannot open $evolver_ctl for writing") 0 0 0
163 # FIXME: params follow an order in the control file, they are not a hash. Do we have an
164 # clean example of this in bioperl-run?
165 0 my %params = $self->get_parameters;
166 0 print $evolverfh "$params{outfmt}\n";
167 0 print $evolverfh "$params{seed}\n";
168 # FIXME: call get_leaf_nodes to count only leafs - relates to newick onlyleafids bug
169 # my $numseq = scalar($tree->get_nodes);
170 0 my $numseq = scalar($tree->get_leaf_nodes);
171 0 print $evolverfh "$numseq ";
172 0 print $evolverfh "$params{nuclsites} ";
173 0 print $evolverfh "$params{replicates}\n\n";
174 0 print $evolverfh "$params{tree_length}\n";
175 # FIXME: do #1:#n branch tagging magic here
176 # FIXME: this pre flush stuff is for appending mode
177 0 my $treeout = Bio::TreeIO->new
178 ('-format' => 'newick',
179 '-fh' => $evolverfh,
180 -PRE =>'>>',
181 '-flush',
182 );
183 # $treeout->bootstrap_style('nointernalids');
184 0 $treeout->write_tree($tree);
185 # Appending mode to add more control file contents here
186 0 ▶ open($evolverfh, ">>$evolver_ctl") or $self->throw("cannot open $evolver_ctl for writing");
Branch: 1 branch
BranchTrueFalseTotal
open $evolverfh, ">>$evolver_ctl" or $self->throw("cannot open $evolver_ctl for writing") 0 0 0
187 0 print $evolverfh "\n$params{omega}\n";
188 0 print $evolverfh "$params{kappa}\n";
189 # Print codon freqs here or defaults (below)
190 0 my @codon_freqs = $self->get_CodonFreqs();
191 0 foreach my $firstbase (@codon_freqs) {
192 0 foreach my $element (@$firstbase) {
193 0 print $evolverfh " $element";
194 }
195 0 print $evolverfh "\n";
196 }
197  
198 # FIXME: codon freqs or nt freqs should always come from an object?
199 # Silly printing the default codonfreqs in the default
200 # MCcodon.dat provided by PAML
201 0 ▶ unless (@codon_freqs) {
Branch: 1 branch
BranchTrueFalseTotal
unless (@codon_freqs) 0 0 0
202 0 print $evolverfh
203 "0.00983798 0.01745548 0.00222048 0.01443315\n",
204 "0.00844604 0.01498576 0.00190632 0.01239105\n",
205 "0.01064012 0.01887870 0 0\n",
206 "0.00469486 0.00833007 0 0.00688776\n",
207 "0.01592816 0.02826125 0.00359507 0.02336796\n",
208 "0.01367453 0.02426265 0.00308642 0.02006170\n",
209 "0.01722686 0.03056552 0.00388819 0.02527326\n",
210 "0.00760121 0.01348678 0.00171563 0.01115161\n",
211 "0.01574077 0.02792876 0.00355278 0.02309304\n",
212 "0.01351366 0.02397721 0.00305010 0.01982568\n",
213 "0.01702419 0.03020593 0.00384245 0.02497593\n",
214 "0.00751178 0.01332811 0.00169545 0.01102042\n",
215 "0.02525082 0.04480239 0.00569924 0.03704508\n",
216 "0.02167816 0.03846344 0.00489288 0.03180369\n",
217 "0.02730964 0.04845534 0.00616393 0.04006555\n",
218 "0.01205015 0.02138052 0.00271978 0.01767859\n";
219 }
220 0 print $evolverfh "\n// end of file.\n";
221 0 close($evolverfh);
222 # FIXME: what do we return in prepare?
223 # return
224 }
225  
226  
227  
228  
229 sub run {
230  
231 0 ▶ my $self = shift;
Subroutine run: not called CC=8 SCAR=42.8
Pod documented
232 # FIXME: We should look for the stuff we prepared in the prepare method here
233 0 my $rc = (1);
234 {
235 0 my $exit_status;
236 0 my ($tmpdir) = $self->tempdir();
237 0 chdir($tmpdir);
238 0 my $evolverexe = $self->executable();
239 0 ▶ $self->throw("unable to find or run executable for 'evolver'") unless $evolverexe && -e $evolverexe && -x _;
Branch: 1 branch
BranchTrueFalseTotal
unless $evolverexe and -e $evolverexe and -x _ 0 0 0
Condition0%0/6
$evolverexe and -e $evolverexe and -x _
!ll&&!rl&&r
000
$evolverexe and -e $evolverexe
!ll&&!rl&&r
000
MC/DC0%0/3
$evolverexe and -e $evolverexe and -x _
$evolverexe -e $evolverexe -x _
Truth table0%0/4
A and B and C
A= $evolverexeB= -e $evolverexeC= -x _
ABCresult
0XX0
10X0
1100
1111
240 0 ▶ open(RUN, "$evolverexe 6 MCcodon.dat |") or $self->throw("Cannot open exe $evolverexe");
Branch: 1 branch
BranchTrueFalseTotal
open RUN, "$evolverexe 6 MCcodon.dat |" or $self->throw("Cannot open exe $evolverexe") 0 0 0
241 0 my @output = <RUN>;
242 0 $exit_status = close(RUN);
243 0 $self->error_string(join('',@output));
244 0 ▶ if ( (grep { /\berr(or)?: /io } @output) || !$exit_status) {
Branch: 1 branch
BranchTrueFalseTotal
if (grep {/\berr(or)?: /io;} @output or not $exit_status) 0 0 0
Condition0%0/3
grep {/\berr(or)?: /io;} @output or not $exit_status
l!l&&r!l&&!r
000
MC/DC0%0/2
grep {/\berr(or)?: /io;} @output or not $exit_status
grep {/\berr(or)?: /io;} @output not $exit_status
Truth table0%0/3
A or not(B)
A= grep {/\berr(or)?: /io;} @outputB= not $exit_status
ABresult
1X1
011
000
245 0 $self->warn("There was an error - see error_string for the program output");
246 0 $rc = 0;
247 }
248 # FIXME - hardcoded mc.paml
249 0 ▶ unless ($self->indel) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->indel) 0 0 0
250 0 my $in = Bio::AlignIO->new('-file' => "$tmpdir/mc.paml",
251 '-format' => 'phylip');
252 0 my $aln = $in->next_aln();
253 0 $self->alignment($aln);
254 }
255 }
256 0 return $rc;
257 }
258  
259  
260 sub error_string{
261 0 ▶ my ($self,$value) = @_;
Subroutine error_string: not called CC=2 SCAR=17.9
Pod documented
262 0 ▶ if( defined $value) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $value) 0 0 0
263 0 $self->{'error_string'} = $value;
264 }
265 0 return $self->{'error_string'};
266  
267 }
268  
269  
270 sub alignment{
271 0 ▶ my ($self,$aln) = @_;
Subroutine alignment: not called CC=5 SCAR=34.0
Pod documented
272  
273 0 ▶ if( defined $aln ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $aln) 0 0 0
274 0 ▶ if( -e $aln ) {
Branch: 2 branches
BranchTrueFalseTotal
if (-e $aln) { } 0 0 0
elsif (not ref $aln && $aln->isa('Bio::Align::AlignI')) { } 0 0 0
275 0 $self->{'_alignment'} = $aln;
276 ▶ } elsif( !ref($aln) || ! $aln->isa('Bio::Align::AlignI') ) {
Condition0%0/3
ref $aln && $aln->isa('Bio::Align::AlignI')
!ll&&!rl&&r
000
MC/DC0%0/2
ref $aln && $aln->isa('Bio::Align::AlignI')
ref $aln $aln->isa('Bio::Align::AlignI')
Truth table0%0/3
A && B
A= ref $alnB= $aln->isa('Bio::Align::AlignI')
ABresult
0X0
100
111
277 0 $self->warn("Must specify a valid Bio::Align::AlignI object to the alignment function not $aln");
278 0 return undef;
279 } else {
280 0 $self->{'_alignment'} = $aln;
281 }
282 }
283 0 return $self->{'_alignment'};
284 }
285  
286  
287  
288 sub tree {
289 0 ▶ my ($self, $tree, %params) = @_;
Subroutine tree: not called CC=4 SCAR=30.0
Pod documented
290 0 ▶ if( defined $tree ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $tree) 0 0 0
291 0 ▶ if( ! ref($tree) || ! $tree->isa('Bio::Tree::TreeI') ) {
Branch: 1 branch
BranchTrueFalseTotal
unless (ref $tree and $tree->isa("Bio::Tree::TreeI")) 0 0 0
Condition0%0/3
ref $tree and $tree->isa("Bio::Tree::TreeI")
!ll&&!rl&&r
000
MC/DC0%0/2
ref $tree and $tree->isa("Bio::Tree::TreeI")
ref $tree $tree->isa("Bio::Tree::TreeI")
Truth table0%0/3
A and B
A= ref $treeB= $tree->isa("Bio::Tree::TreeI")
ABresult
0X0
100
111
292 0 $self->warn("Must specify a valid Bio::Tree::TreeI object to the alignment function");
293 }
294 0 $self->{'_tree'} = $tree;
295 # FIXME: I think we dont need this in Evolver
296 # if ( defined $params{'_branchLengths'} ) {
297 # my $ubl = $params{'_branchLengths'};
298 # if ($ubl !~ m/^(0|1|2)$/) {
299 # $self->throw("The branchLengths parameter to tree() must be 0 (ignore), 1 (initial values) or 2 (fixed values) only");
300 # }
301 # $self->{'_branchLengths'} = $ubl;
302 # }
303 }
304 0 return $self->{'_tree'};
305 }
306  
307  
308 sub get_parameters{
309 0 ▶ my ($self) = @_;
Subroutine get_parameters: not called CC=1 SCAR=6.9
Pod documented
310 # we're returning a copy of this
311 0 return %{ $self->{'_evolverparams'} };
312 }
313  
314  
315  
316 sub set_parameter{
317 0 ▶ my ($self,$param,$value) = @_;
Subroutine set_parameter: not called CC=6 SCAR=37.4
Pod documented
318 0 ▶ unless ($self->{'no_param_checks'} == 1) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->{"no_param_checks"} == 1) 0 0 0
319 0 ▶ if ( ! defined $VALIDVALUES{$param} ) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $Bio::Tools::Run::Phylo::PAML::Evolver::VALIDVALUES{$param}) 0 0 0
320 0 $self->warn("unknown parameter $param will not be set unless you force by setting no_param_checks to true");
321 0 return 0;
322 }
323 0 ▶ if ( ref( $VALIDVALUES{$param}) =~ /ARRAY/i &&
Branch: 1 branch
BranchTrueFalseTotal
if (ref($Bio::Tools::Run::Phylo::PAML::Evolver::VALIDVALUES{$param}) =~ /ARRAY/i and scalar @{$Bio::Tools::Run::Phylo::PAML::Evolver::VALIDVALUES{$param};} > 0) 0 0 0
Condition0%0/3
ref($Bio::Tools::Run::Phylo::PAML::Evolver::VALIDVALUES{$param}) =~ /ARRAY/i and scalar @{$Bio::Tools::Run::Phylo::PAML::Evolver::VALIDVALUES{$param};} > 0
!ll&&!rl&&r
000
MC/DC0%0/2
ref($Bio::Tools::Run::Phylo::PAML::Evolver::VALIDVALUES{$param}) =~ /ARRAY/i and scalar @{$Bio::Tools::Run::Phylo::PAML::Evolver::VALIDVALUES{$param};} > 0
ref($Bio::Tools::Run::Phylo::PAML::Evolver::VALIDVALUES{$param}) =~ /ARRAY/i scalar @{$Bio::Tools::Run::Phylo::PAML::Evolver::VALIDVALUES{$param};} > 0
Truth table0%0/3
A and B
A= ref($Bio::Tools::Run::Phylo::PAML::Evolver::VALIDVALUES{$param}) =~ /ARRAY/iB= scalar @{$Bio::Tools::Run::Phylo::PAML::Evolver::VALIDVALUES{$param};} > 0
ABresult
0X0
100
111
324 0 scalar @{$VALIDVALUES{$param}} > 0 ) {
325  
326 0 ▶ unless ( grep { $value eq $_ } @{ $VALIDVALUES{$param} } ) {
Branch: 1 branch
BranchTrueFalseTotal
unless (grep {$value eq $_;} @{$Bio::Tools::Run::Phylo::PAML::Evolver::VALIDVALUES{$param};}) 0 0 0
327 0 $self->warn("parameter $param specified value $value is not recognized, please see the documentation and the code for this module or set the no_param_checks to a true value");
328 0 return 0;
329 }
330 }
331 }
332 0 $self->{'_evolverparams'}->{$param} = $value;
333 0 return 1;
334 }
335  
336  
337 sub set_default_parameters{
338 0 ▶ my ($self,$keepold) = @_;
Subroutine set_default_parameters: not called CC=6 SCAR=37.4
Pod documented
339 0 ▶ $keepold = 0 unless defined $keepold;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $keepold 0 0 0
340  
341 0 ▶ while( my ($param,$val) = each %VALIDVALUES ) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = each %Bio::Tools::Run::Phylo::PAML::Evolver::VALIDVALUES) 0 0 0
342 # skip if we want to keep old values and it is already set
343 0 ▶ next if( defined $self->{'_evolverparams'}->{$param} && $keepold);
Branch: 1 branch
BranchTrueFalseTotal
if defined $self->{"_evolverparams"}{$param} and $keepold 0 0 0
Condition0%0/3
defined $self->{"_evolverparams"}{$param} and $keepold
!ll&&!rl&&r
000
MC/DC0%0/2
defined $self->{"_evolverparams"}{$param} and $keepold
defined $self->{"_evolverparams"}{$param} $keepold
Truth table0%0/3
A and B
A= defined $self->{"_evolverparams"}{$param}B= $keepold
ABresult
0X0
100
111
344 0 ▶ if(ref($val)=~/ARRAY/i ) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref($val) =~ /ARRAY/i) { } 0 0 0
345 0 $self->{'_evolverparams'}->{$param} = $val->[0];
346 } else {
347 0 $self->{'_evolverparams'}->{$param} = $val;
348 }
349 }
350 }
351  
352  
353  
354  
355 sub no_param_checks{
356 0 ▶ my ($self,$value) = @_;
Subroutine no_param_checks: not called CC=2 SCAR=17.9
Pod documented
357 0 ▶ if( defined $value) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $value) 0 0 0
358 0 $self->{'no_param_checks'} = $value;
359 }
360 0 return $self->{'no_param_checks'};
361 }
362  
363  
364 sub set_CodonFreqs{
365 0 ▶ my $self = shift;
Subroutine set_CodonFreqs: not called CC=2 SCAR=17.9
Pod documented
366  
367 0 ▶ return $self->{'_codonfreqs'} = shift if @_;
Branch: 1 branch
BranchTrueFalseTotal
if @_ 0 0 0
368 0 return $self->{'_codonfreqs'};
369 }
370  
371  
372 sub get_CodonFreqs{
373 0 ▶ my ($self) = @_;
Subroutine get_CodonFreqs: not called CC=2 SCAR=17.9
Pod documented
374 0 ▶ return @{$self->{'_codonfreqs'} || []};
Branch: 1 branch
BranchTrueFalseTotal
$self->{"_codonfreqs"} or [] 0 0 0
375 }
376  
377  
378  
379  
380  
381  
382  
383  
384 sub DESTROY {
385 0 ▶ my $self= shift;
Subroutine DESTROY: not called CC=2 SCAR=17.9
386 0 ▶ unless ( $self->save_tempfiles ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->save_tempfiles) 0 0 0
387 0 $self->cleanup();
388 }
389 0 $self->SUPER::DESTROY();
390 }
391  
392  
393  
394 sub indel{
395 0 ▶ my $self = shift;
Subroutine indel: not called CC=2 SCAR=17.9
Pod documented
396  
397 0 ▶ return $self->{'indel'} = shift if @_;
Branch: 1 branch
BranchTrueFalseTotal
if @_ 0 0 0
398 0 return $self->{'indel'};
399 }
400  
401  
402 1 1;
403  
404 __END__
« Tools/Run/Phylo/PAML/Baseml.pm ↑ Summary Tools/Phylo/PAML.pm »