| 1 | package Bio::Tools::Phylo::PAML::ModelResult; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | 8 | $Bio::Tools::Phylo::PAML::ModelResult::VERSION = '1.7.2'; | |||||||||||||||||||||||||||||||||||||||||
| 3 | 8 | ▶ | use utf8; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 4 | 8 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 5 | 8 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||||||||||||
| 7 | 8 | ▶ | use base qw(Bio::Root::Root); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||||||||||
| 9 | # ABSTRACT: A container for NSSite Model Result from PAML | ||||||||||||||||||||||||||||||||||||||||||
| 10 | # AUTHOR: Jason Stajich <jason@bioperl.org> | ||||||||||||||||||||||||||||||||||||||||||
| 11 | # OWNER: Jason Stajich <jason@bioperl.org> | ||||||||||||||||||||||||||||||||||||||||||
| 12 | # LICENSE: Perl_5 | ||||||||||||||||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||||||||||||||||
| 16 | sub new { | ||||||||||||||||||||||||||||||||||||||||||
| 17 | 9 | ▶ | my($class,@args) = @_; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
new: called CC=28 SCAR=38.6
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||||||||||||||||
| 19 | 9 | my $self = $class->SUPER::new(@args); | |||||||||||||||||||||||||||||||||||||||||
| 20 | 9 | my ($modelnum,$modeldesc,$kappa, | |||||||||||||||||||||||||||||||||||||||||
| 21 | $timeused,$trees, | ||||||||||||||||||||||||||||||||||||||||||
| 22 | $pos_sites,$neb_sites,$beb_sites, | ||||||||||||||||||||||||||||||||||||||||||
| 23 | $num_site_classes, $shape_params, | ||||||||||||||||||||||||||||||||||||||||||
| 24 | $dnds_classes, | ||||||||||||||||||||||||||||||||||||||||||
| 25 | $likelihood) = $self->_rearrange([qw(MODEL_NUM | ||||||||||||||||||||||||||||||||||||||||||
| 26 | MODEL_DESCRIPTION | ||||||||||||||||||||||||||||||||||||||||||
| 27 | KAPPA | ||||||||||||||||||||||||||||||||||||||||||
| 28 | TIME_USED | ||||||||||||||||||||||||||||||||||||||||||
| 29 | TREES | ||||||||||||||||||||||||||||||||||||||||||
| 30 | POS_SITES | ||||||||||||||||||||||||||||||||||||||||||
| 31 | NEB_SITES BEB_SITES | ||||||||||||||||||||||||||||||||||||||||||
| 32 | NUM_SITE_CLASSES | ||||||||||||||||||||||||||||||||||||||||||
| 33 | SHAPE_PARAMS | ||||||||||||||||||||||||||||||||||||||||||
| 34 | DNDS_SITE_CLASSES | ||||||||||||||||||||||||||||||||||||||||||
| 35 | LIKELIHOOD)], | ||||||||||||||||||||||||||||||||||||||||||
| 36 | @args); | ||||||||||||||||||||||||||||||||||||||||||
| 37 | 9 | ▶ | if( $trees ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 38 | 9 | ▶ | if(ref($trees) !~ /ARRAY/i ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 39 | 0 | $self->warn("Must provide a valid array reference to initialize trees"); | |||||||||||||||||||||||||||||||||||||||||
| 40 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 41 | 9 | foreach my $t ( @$trees ) { | |||||||||||||||||||||||||||||||||||||||||
| 42 | 9 | $self->add_tree($t); | |||||||||||||||||||||||||||||||||||||||||
| 43 | } | ||||||||||||||||||||||||||||||||||||||||||
| 44 | } | ||||||||||||||||||||||||||||||||||||||||||
| 45 | } | ||||||||||||||||||||||||||||||||||||||||||
| 46 | 9 | $self->{'_treeiterator'} = 0; | |||||||||||||||||||||||||||||||||||||||||
| 47 | 9 | ▶ | if( $pos_sites ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 48 | 6 | ▶ | if(ref($pos_sites) !~ /ARRAY/i ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 49 | 0 | $self->warn("Must provide a valid array reference to initialize pos_sites"); | |||||||||||||||||||||||||||||||||||||||||
| 50 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 51 | 6 | foreach my $s ( @$pos_sites ) { | |||||||||||||||||||||||||||||||||||||||||
| 52 | 8 | ▶ | if( ref($s) !~ /ARRAY/i ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 53 | 0 | $self->warn("Need an array reference for each entry in the pos_sites object"); | |||||||||||||||||||||||||||||||||||||||||
| 54 | 0 | next; | |||||||||||||||||||||||||||||||||||||||||
| 55 | } | ||||||||||||||||||||||||||||||||||||||||||
| 56 | 8 | $self->add_pos_selected_site(@$s); | |||||||||||||||||||||||||||||||||||||||||
| 57 | } | ||||||||||||||||||||||||||||||||||||||||||
| 58 | } | ||||||||||||||||||||||||||||||||||||||||||
| 59 | } | ||||||||||||||||||||||||||||||||||||||||||
| 60 | 9 | ▶ | if( $beb_sites ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 61 | 6 | ▶ | if(ref($beb_sites) !~ /ARRAY/i ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 62 | 0 | $self->warn("Must provide a valid array reference to initialize beb_sites"); | |||||||||||||||||||||||||||||||||||||||||
| 63 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 64 | 6 | foreach my $s ( @$beb_sites ) { | |||||||||||||||||||||||||||||||||||||||||
| 65 | 9 | ▶ | if( ref($s) !~ /ARRAY/i ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 66 | 0 | $self->warn("need an array ref for each entry in the beb_sites object"); | |||||||||||||||||||||||||||||||||||||||||
| 67 | 0 | next; | |||||||||||||||||||||||||||||||||||||||||
| 68 | } | ||||||||||||||||||||||||||||||||||||||||||
| 69 | 9 | $self->add_BEB_pos_selected_site(@$s); | |||||||||||||||||||||||||||||||||||||||||
| 70 | } | ||||||||||||||||||||||||||||||||||||||||||
| 71 | } | ||||||||||||||||||||||||||||||||||||||||||
| 72 | } | ||||||||||||||||||||||||||||||||||||||||||
| 73 | 9 | ▶ | if( $neb_sites ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 74 | 6 | ▶ | if(ref($neb_sites) !~ /ARRAY/i ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 75 | 0 | $self->warn("Must provide a valid array reference to initialize neb_sites"); | |||||||||||||||||||||||||||||||||||||||||
| 76 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 77 | 6 | foreach my $s ( @$neb_sites ) { | |||||||||||||||||||||||||||||||||||||||||
| 78 | 8 | ▶ | if( ref($s) !~ /ARRAY/i ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 79 | 0 | $self->warn("need an array ref for each entry in the neb_sites object"); | |||||||||||||||||||||||||||||||||||||||||
| 80 | 0 | next; | |||||||||||||||||||||||||||||||||||||||||
| 81 | } | ||||||||||||||||||||||||||||||||||||||||||
| 82 | 8 | $self->add_NEB_pos_selected_site(@$s); | |||||||||||||||||||||||||||||||||||||||||
| 83 | } | ||||||||||||||||||||||||||||||||||||||||||
| 84 | } | ||||||||||||||||||||||||||||||||||||||||||
| 85 | } | ||||||||||||||||||||||||||||||||||||||||||
| 86 | |||||||||||||||||||||||||||||||||||||||||||
| 87 | 9 | ▶ | defined $modelnum && $self->model_num($modelnum); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 88 | 9 | ▶ | defined $modeldesc && $self->model_description($modeldesc); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 89 | 9 | ▶ | defined $kappa && $self->kappa($kappa); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 90 | 9 | ▶ | defined $timeused && $self->time_used($timeused); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 91 | 9 | ▶ | defined $likelihood && $self->likelihood($likelihood); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 92 | |||||||||||||||||||||||||||||||||||||||||||
| 93 | 9 | ▶ | $self->num_site_classes($num_site_classes || 0); | ||||||||||||||||||||||||||||||||||||||||
|
Condition100%2/2
$num_site_classes || 0
MC/DC100%1/1
$num_site_classes || 0
$num_site_classes
Truth table100%2/2
A
A= $num_site_classes
| |||||||||||||||||||||||||||||||||||||||||||
| 94 | 9 | ▶ | if( defined $dnds_classes ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 95 | 8 | ▶ | if( ref($dnds_classes) !~ /HASH/i || | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%2/6
ref($dnds_classes) =~ /HASH/i && defined $dnds_classes->{'p'} && defined $dnds_classes->{'w'}
ref($dnds_classes) =~ /HASH/i and defined $dnds_classes->{"p"}
MC/DC0%0/3
ref($dnds_classes) =~ /HASH/i && defined $dnds_classes->{'p'} && defined $dnds_classes->{'w'}
ref($dnds_classes) =~ /HASH/i
defined $dnds_classes->{"p"}
defined $dnds_classes->{'w'}
Truth table25%1/4
A and B && C
A= ref($dnds_classes) =~ /HASH/iB= defined $dnds_classes->{"p"}C= defined $dnds_classes->{'w'}
| |||||||||||||||||||||||||||||||||||||||||||
| 96 | ! defined $dnds_classes->{'p'} || | ||||||||||||||||||||||||||||||||||||||||||
| 97 | ! defined $dnds_classes->{'w'} ) { | ||||||||||||||||||||||||||||||||||||||||||
| 98 | 0 | $self->warn("-dnds_site_classes expects a hashref with keys p and w"); | |||||||||||||||||||||||||||||||||||||||||
| 99 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 100 | 8 | $self->dnds_site_classes($dnds_classes); | |||||||||||||||||||||||||||||||||||||||||
| 101 | } | ||||||||||||||||||||||||||||||||||||||||||
| 102 | } | ||||||||||||||||||||||||||||||||||||||||||
| 103 | 9 | ▶ | if( defined $shape_params ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 104 | 3 | ▶ | if( ref($shape_params) !~ /HASH/i ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 105 | 0 | $self->warn("-shape_params expects a hashref not $shape_params\n"); | |||||||||||||||||||||||||||||||||||||||||
| 106 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 107 | 3 | $self->shape_params($shape_params); | |||||||||||||||||||||||||||||||||||||||||
| 108 | } | ||||||||||||||||||||||||||||||||||||||||||
| 109 | } | ||||||||||||||||||||||||||||||||||||||||||
| 110 | 9 | return $self; | |||||||||||||||||||||||||||||||||||||||||
| 111 | } | ||||||||||||||||||||||||||||||||||||||||||
| 112 | |||||||||||||||||||||||||||||||||||||||||||
| 113 | |||||||||||||||||||||||||||||||||||||||||||
| 114 | |||||||||||||||||||||||||||||||||||||||||||
| 115 | sub model_num { | ||||||||||||||||||||||||||||||||||||||||||
| 116 | 14 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
model_num: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 117 | 14 | ▶ | return $self->{'_num'} = shift if @_; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 118 | 7 | return $self->{'_num'}; | |||||||||||||||||||||||||||||||||||||||||
| 119 | } | ||||||||||||||||||||||||||||||||||||||||||
| 120 | |||||||||||||||||||||||||||||||||||||||||||
| 121 | |||||||||||||||||||||||||||||||||||||||||||
| 122 | sub model_description{ | ||||||||||||||||||||||||||||||||||||||||||
| 123 | 12 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
model_description: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 124 | 12 | ▶ | return $self->{'_model_description'} = shift if @_; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 125 | 5 | return $self->{'_model_description'}; | |||||||||||||||||||||||||||||||||||||||||
| 126 | } | ||||||||||||||||||||||||||||||||||||||||||
| 127 | |||||||||||||||||||||||||||||||||||||||||||
| 128 | |||||||||||||||||||||||||||||||||||||||||||
| 129 | sub time_used{ | ||||||||||||||||||||||||||||||||||||||||||
| 130 | 7 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
time_used: called CC=2 SCAR=8.1
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 131 | 7 | ▶ | return $self->{'_time_used'} = shift if @_; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 132 | 0 | return $self->{'_time_used'}; | |||||||||||||||||||||||||||||||||||||||||
| 133 | } | ||||||||||||||||||||||||||||||||||||||||||
| 134 | |||||||||||||||||||||||||||||||||||||||||||
| 135 | |||||||||||||||||||||||||||||||||||||||||||
| 136 | sub kappa{ | ||||||||||||||||||||||||||||||||||||||||||
| 137 | 15 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
kappa: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 138 | 15 | ▶ | return $self->{'_kappa'} = shift if @_; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 139 | 6 | return $self->{'_kappa'}; | |||||||||||||||||||||||||||||||||||||||||
| 140 | } | ||||||||||||||||||||||||||||||||||||||||||
| 141 | |||||||||||||||||||||||||||||||||||||||||||
| 142 | |||||||||||||||||||||||||||||||||||||||||||
| 143 | sub num_site_classes{ | ||||||||||||||||||||||||||||||||||||||||||
| 144 | 17 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
num_site_classes: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 145 | 17 | ▶ | return $self->{'_num_site_classes'} = shift if @_; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 146 | 8 | return $self->{'_num_site_classes'}; | |||||||||||||||||||||||||||||||||||||||||
| 147 | } | ||||||||||||||||||||||||||||||||||||||||||
| 148 | |||||||||||||||||||||||||||||||||||||||||||
| 149 | |||||||||||||||||||||||||||||||||||||||||||
| 150 | sub dnds_site_classes{ | ||||||||||||||||||||||||||||||||||||||||||
| 151 | 12 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
dnds_site_classes: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 152 | 12 | ▶ | return $self->{'_dnds_site_classes'} = shift if @_; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 153 | 4 | return $self->{'_dnds_site_classes'}; | |||||||||||||||||||||||||||||||||||||||||
| 154 | } | ||||||||||||||||||||||||||||||||||||||||||
| 155 | |||||||||||||||||||||||||||||||||||||||||||
| 156 | |||||||||||||||||||||||||||||||||||||||||||
| 157 | sub get_pos_selected_sites{ | ||||||||||||||||||||||||||||||||||||||||||
| 158 | 1 | ▶ | return @{$_[0]->{'_posselsites'} || []}; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_pos_selected_sites: called CC=2 SCAR=7.2
Pod
documented
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 159 | } | ||||||||||||||||||||||||||||||||||||||||||
| 160 | |||||||||||||||||||||||||||||||||||||||||||
| 161 | |||||||||||||||||||||||||||||||||||||||||||
| 162 | sub add_pos_selected_site{ | ||||||||||||||||||||||||||||||||||||||||||
| 163 | 8 | ▶ | my ($self,$site,$aa,$pvalue,$signif) = @_; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
add_pos_selected_site: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 164 | 8 | push @{$self->{'_posselsites'}}, [ $site,$aa,$pvalue,$signif ]; | |||||||||||||||||||||||||||||||||||||||||
| 165 | 8 | return scalar @{$self->{'_posselsites'}}; | |||||||||||||||||||||||||||||||||||||||||
| 166 | } | ||||||||||||||||||||||||||||||||||||||||||
| 167 | |||||||||||||||||||||||||||||||||||||||||||
| 168 | |||||||||||||||||||||||||||||||||||||||||||
| 169 | sub get_NEB_pos_selected_sites{ | ||||||||||||||||||||||||||||||||||||||||||
| 170 | 1 | ▶ | return @{$_[0]->{'_NEBposselsites'} || []}; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_NEB_pos_selected_sites: called CC=2 SCAR=7.2
Pod
documented
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 171 | } | ||||||||||||||||||||||||||||||||||||||||||
| 172 | |||||||||||||||||||||||||||||||||||||||||||
| 173 | |||||||||||||||||||||||||||||||||||||||||||
| 174 | sub add_NEB_pos_selected_site{ | ||||||||||||||||||||||||||||||||||||||||||
| 175 | 8 | ▶ | my ($self,@args) = @_; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
add_NEB_pos_selected_site: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 176 | 8 | push @{$self->{'_NEBposselsites'}}, [ @args ]; | |||||||||||||||||||||||||||||||||||||||||
| 177 | 8 | return scalar @{$self->{'_NEBposselsites'}}; | |||||||||||||||||||||||||||||||||||||||||
| 178 | } | ||||||||||||||||||||||||||||||||||||||||||
| 179 | |||||||||||||||||||||||||||||||||||||||||||
| 180 | |||||||||||||||||||||||||||||||||||||||||||
| 181 | |||||||||||||||||||||||||||||||||||||||||||
| 182 | |||||||||||||||||||||||||||||||||||||||||||
| 183 | sub get_BEB_pos_selected_sites{ | ||||||||||||||||||||||||||||||||||||||||||
| 184 | 0 | ▶ | return @{$_[0]->{'_BEBposselsites'} || []}; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_BEB_pos_selected_sites: not called CC=2 SCAR=17.9
Pod
documented
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 185 | } | ||||||||||||||||||||||||||||||||||||||||||
| 186 | |||||||||||||||||||||||||||||||||||||||||||
| 187 | |||||||||||||||||||||||||||||||||||||||||||
| 188 | sub add_BEB_pos_selected_site{ | ||||||||||||||||||||||||||||||||||||||||||
| 189 | 9 | ▶ | my ($self,@args) = @_; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
add_BEB_pos_selected_site: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 190 | 9 | push @{$self->{'_BEBposselsites'}}, [ @args ]; | |||||||||||||||||||||||||||||||||||||||||
| 191 | 9 | return scalar @{$self->{'_BEBposselsites'}}; | |||||||||||||||||||||||||||||||||||||||||
| 192 | } | ||||||||||||||||||||||||||||||||||||||||||
| 193 | |||||||||||||||||||||||||||||||||||||||||||
| 194 | |||||||||||||||||||||||||||||||||||||||||||
| 195 | sub next_tree{ | ||||||||||||||||||||||||||||||||||||||||||
| 196 | 5 | ▶ | my ($self,@args) = @_; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
next_tree: called CC=2 SCAR=7.2
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 197 | 5 | ▶ | return $self->{'_trees'}->[$self->{'_treeiterator'}++] || undef; | ||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$self->{'_trees'}[$self->{'_treeiterator'}++] || undef
MC/DC0%0/1
$self->{'_trees'}[$self->{'_treeiterator'}++] || undef
$self->{'_trees'}[$self->{'_treeiterator'}++]
Truth table50%1/2
A
A= $self->{'_trees'}[$self->{'_treeiterator'}++]
| |||||||||||||||||||||||||||||||||||||||||||
| 198 | } | ||||||||||||||||||||||||||||||||||||||||||
| 199 | |||||||||||||||||||||||||||||||||||||||||||
| 200 | |||||||||||||||||||||||||||||||||||||||||||
| 201 | sub get_trees{ | ||||||||||||||||||||||||||||||||||||||||||
| 202 | 2 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_trees: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 203 | 2 | ▶ | return @{$self->{'_trees'} || []}; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 204 | } | ||||||||||||||||||||||||||||||||||||||||||
| 205 | |||||||||||||||||||||||||||||||||||||||||||
| 206 | |||||||||||||||||||||||||||||||||||||||||||
| 207 | sub rewind_tree_iterator { | ||||||||||||||||||||||||||||||||||||||||||
| 208 | 0 | ▶ | shift->{'_treeiterator'} = 0; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
rewind_tree_iterator: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 209 | } | ||||||||||||||||||||||||||||||||||||||||||
| 210 | |||||||||||||||||||||||||||||||||||||||||||
| 211 | |||||||||||||||||||||||||||||||||||||||||||
| 212 | sub add_tree{ | ||||||||||||||||||||||||||||||||||||||||||
| 213 | 9 | ▶ | my ($self,$tree) = @_; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
add_tree: called CC=4 SCAR=15.5
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 214 | 9 | ▶ | if( $tree && ref($tree) && $tree->isa('Bio::Tree::TreeI') ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%2/6
$tree and ref $tree and $tree->isa("Bio::Tree::TreeI")
$tree and ref $tree
MC/DC0%0/3
$tree and ref $tree and $tree->isa("Bio::Tree::TreeI")
$tree
ref $tree
$tree->isa("Bio::Tree::TreeI")
Truth table25%1/4
A and B and C
A= $treeB= ref $treeC= $tree->isa("Bio::Tree::TreeI")
| |||||||||||||||||||||||||||||||||||||||||||
| 215 | 9 | push @{$self->{'_trees'}},$tree; | |||||||||||||||||||||||||||||||||||||||||
| 216 | } | ||||||||||||||||||||||||||||||||||||||||||
| 217 | 9 | return scalar @{$self->{'_trees'}}; | |||||||||||||||||||||||||||||||||||||||||
| 218 | } | ||||||||||||||||||||||||||||||||||||||||||
| 219 | |||||||||||||||||||||||||||||||||||||||||||
| 220 | |||||||||||||||||||||||||||||||||||||||||||
| 221 | sub shape_params{ | ||||||||||||||||||||||||||||||||||||||||||
| 222 | 4 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
shape_params: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 223 | 4 | ▶ | return $self->{'_shape_params'} = shift if @_; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 224 | 1 | return $self->{'_shape_params'}; | |||||||||||||||||||||||||||||||||||||||||
| 225 | } | ||||||||||||||||||||||||||||||||||||||||||
| 226 | |||||||||||||||||||||||||||||||||||||||||||
| 227 | |||||||||||||||||||||||||||||||||||||||||||
| 228 | sub likelihood{ | ||||||||||||||||||||||||||||||||||||||||||
| 229 | 15 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
likelihood: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 230 | 15 | ▶ | return $self->{'likelihood'} = shift if @_; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 231 | 6 | return $self->{'likelihood'}; | |||||||||||||||||||||||||||||||||||||||||
| 232 | } | ||||||||||||||||||||||||||||||||||||||||||
| 233 | |||||||||||||||||||||||||||||||||||||||||||
| 234 | 8 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 235 | |||||||||||||||||||||||||||||||||||||||||||
| 236 | __END__ | ||||||||||||||||||||||||||||||||||||||||||