Branch Coverage

blib/lib/Bio/Phylo/EvolutionaryModels.pm
Criterion Covered Total %
branch 94 258 36.4


line true false branch
219 0 5 unless defined $options{'sample_size'}
222 4 1 unless defined $options{'threads'}
225 0 5 if ($options{'threads'} > 1 and not $Bio::Phylo::EvolutionaryModels::Config{'useithreads'})
231 0 5 unless (defined $options{'algorithm'})
237 0 5 unless (defined $methods_require{$options{'algorithm'}})
244 0 8 unless (defined $options{'algorithm_options'}{$_})
252 0 0 if (defined $options{'incomplete_sampling'} and $options{'incomplete_sampling'} and not defined $options{'algorithm_options'}{'sampling_probability'})
262 0 5 unless (defined $options{'model'} or $options{'algorithm'} eq 'constant_rate_bd')
275 0 5 if ($options{'threads'} > 1) { }
300 0 0 if scalar @output < $index
307 0 0 unless (defined $options{'output_format'} and $options{'output_format'} eq 'newick')
326 0 5 if (defined $options{'output_format'} and $options{'output_format'} eq 'newick') { }
4 2 elsif (defined $options{'output_format'} and $options{'output_format'} eq 'forest') { }
425 0 12 unless ($candidate->is_ultrametric(1e-06))
443 5 7 if ($expected_samples > 1 or rand 1 < $expected_samples)
455 0 5 if (defined $options{'counter'})
513 79 1936 if ($count->[$index] == $options{'tree_size'})
521 21 10 if $total_duration == 0
537 5 7 if ($expected_samples > 1 or rand 1 < $expected_samples)
560 0 5 if (defined $options{'counter'})
616 0 1 if (ref $sampling_probability and scalar @{$sampling_probability;} != $mstar - $options{'tree_size'} + 1)
627 0 1 unless (ref $sampling_probability)
668 1115 616 if ($count->[$index] >= $options{'tree_size'})
684 1115 616 if ($count->[$index] >= $options{'tree_size'})
695 8 9 if $total_prob == 0
704 1 8 if $expected_samples > $options{'sample_size'} - scalar(@sample)
712 5 4 if ($expected_samples > 1 or rand 1 < $expected_samples)
738 0 5 if (defined $options{'counter'})
790 0 5 unless ($tree->is_ultrametric(1e-06))
810 0 5 if (defined $options{'counter'})
857 0 5 if ($br == $dr) { }
871 0 45 if ($br == $dr) { }
940 180 225 if $speciation_hash{$_} > $spec_index
951 0 5 if (defined $options{'counter'})
1056 0 66 unless (defined $options{'tree_size'} or defined $options{'tree_age'})
1063 0 66 unless defined $options{'tree_size'}
1064 66 0 unless defined $options{'tree_age'}
1067 0 66 unless defined $options{'birth_rate'}
1069 18 48 if defined $options{'death_rate'} and $options{'death_rate'} == 0
1086 0 66 if (defined $options{'root_edge'} and $options{'root_edge'}) { }
1099 48 18 if (defined $options{'death_rate'}) { }
1127 0 3938 if $time > $options{'tree_age'}
1134 2296 1642 if ($next_speciation < $next_extinction or not defined $next_extinction)
1165 30 3908 unless $tree_size
1167 3746 162 if (defined $options{'death_rate'}) { }
1209 0 0 unless (defined $options{'tree_size'} or defined $options{'tree_age'})
1215 0 0 unless (defined $options{'K_dash'})
1221 0 0 unless defined $options{'tree_size'}
1222 0 0 unless defined $options{'tree_age'}
1225 0 0 unless defined $options{'maximal_birth_rate'}
1227 0 0 if defined $options{'death_rate'} and $options{'death_rate'} == 0
1248 0 0 if (defined $options{'root_edge'} and $options{'root_edge'}) { }
1261 0 0 if (defined $options{'death_rate'}) { }
1289 0 0 if $time > $options{'tree_age'}
1296 0 0 if ($next_speciation < $next_extinction or not defined $next_extinction)
1327 0 0 unless $tree_size
1330 0 0 if ($options{'birth_rate'} == 0) { }
1337 0 0 if (defined $options{'death_rate'}) { }
1372 0 0 unless (defined $options{'tree_size'} or defined $options{'tree_age'})
1379 0 0 unless defined $options{'tree_size'}
1380 0 0 unless defined $options{'tree_age'}
1406 0 0 if (defined $options{'root_edge'} and $options{'root_edge'}) { }
1446 0 0 if $time > $options{'tree_age'}
1449 0 0 if ($next_rate_change - $time_last < &min($next_extinction, $next_speciation)) { }
1464 0 0 if ($next_speciation < $next_extinction or not defined $next_extinction)
1496 0 0 unless $tree_size
1500 0 0 if (scalar(@terminals) % 100 == 0)
1535 0 0 unless (defined $options{'tree_size'} or defined $options{'tree_age'})
1542 0 0 unless defined $options{'tree_size'}
1543 0 0 unless defined $options{'tree_age'}
1546 0 0 unless defined $options{'birth_rate'}
1547 0 0 unless defined $options{'evolving_std'}
1566 0 0 if (defined $options{'root_edge'} and $options{'root_edge'}) { }
1590 0 0 if $time > $options{'tree_age'}
1634 0 0 if ($new_speciation_rate < 0)
1647 0 0 if ($net_rate == 0)
1651 0 0 unless $tree_size
1685 0 0 unless (defined $options{'tree_size'} or defined $options{'tree_age'})
1692 0 0 unless defined $options{'tree_size'}
1693 0 0 unless defined $options{'tree_age'}
1710 0 0 if ($rate_times_in[0] != 0)
1715 0 0 if (scalar @birth_rates_in != scalar @death_rates_in)
1720 0 0 if (scalar @birth_rates_in != scalar @rate_times_in)
1741 0 0 if (defined $options{'root_edge'} and $options{'root_edge'}) { }
1744 0 0 if ($birth_rates[0] > 0) { }
1759 0 0 if ($death_rates[0] > 0) { }
1799 0 0 if $time > $options{'tree_age'}
1802 0 0 if ($next_rate_change - $time_last < &min($next_extinction, $next_speciation)) { }
1816 0 0 if (scalar @rate_times_in) { }
1828 0 0 if ($next_speciation < $next_extinction) { }
1853 0 0 if ($net_birth_rate == 0)
1867 0 0 if ($next_speciation < $next_extinction or not defined $next_extinction)
1909 0 0 unless $tree_size
1911 0 0 if ($net_birth_rate > 0) { }
1919 0 0 if ($net_death_rate > 0) { }
1954 0 0 unless (defined $options{'tree_size'} or defined $options{'tree_age'})
1961 0 0 unless defined $options{'tree_size'}
1962 0 0 unless defined $options{'tree_age'}
1965 0 0 unless defined $options{'birth_rate'}
1966 0 0 unless defined $options{'model_param'}
1985 0 0 if (defined $options{'root_edge'} and $options{'root_edge'}) { }
2009 0 0 if $time > $options{'tree_age'}
2052 0 0 if ($new_speciation_rate < 0)
2062 0 0 if ($net_rate == 0)
2066 0 0 unless $tree_size
2128 15 1112 unless defined $node
2129 15 1112 unless defined $time
2132 257 870 if ($time + $node->get_branch_length >= $age)
2135 110 147 unless $node->is_terminal
2143 366 504 if $node->is_terminal
2180 147 484 if (abs(($_->get_generic('root_distance') - $tree_height) / $tree_height) < 1e-06)
2190 0 5 if (@names < $size)
2206 0 0 if (abs(($_->get_generic('root_distance') - $tree_height) / $tree_height) < 1e-06)
2243 0 0 unless $height > 0
2245 0 0 unless $leaves
2249 0 0 unless (abs(($_->get_generic('root_distance') - $height) / $height) < 1e-06)
2286 631 565 if ($node->is_terminal) { }
2287 97 534 if (not $keep{$node->get_name})
2295 9665 2276 if $keep{$tip->get_name}
2297 29 536 if (not $seen_tip_to_keep)
2331 0 60 if $end_time == 0
2340 2242 1612 if (scalar @extinction == 0 or scalar @speciation and $speciation[0] < $extinction[0]) { }
2372 60 4484 unless defined $node
2373 60 4484 unless defined $time
2377 2302 2242 if $node->is_terminal
2408 1191 5 if (scalar @_) { }
2420 126 1070 if ($root_distance > $root->get_generic('tree_height'))
2425 1196 0 if (defined $children)
2449 0 0 if $k > $n or $k < 0