Branch Coverage

blib/lib/Bio/Phylo/Forest/TreeRole.pm
Criterion Covered Total %
branch 152 398 38.1


line true false branch
88 29 196 unless ($LOADED_WRAPPERS)
89 0 0 if $node->$field and $node->$field eq $value
0 0 if defined $node->id
0 0 unless (@_)
0 0 if (@_ == 1) { }
0 0 elsif (@_ == 2) { }
0 0 if (@nodes > 1)
0 0 if (wantarray) { }
0 0 if ($tips)
0 0 if ($args{'-order'} and $args{'-order'} =~ /^b/)
0 0 if (@_)
0 0 if ($order eq 'depth') { }
0 0 if (my $root = $self->get_root)
0 0 unless $nodect
0 0 if (@_)
0 0 unless (ref $node)
0 0 if ($node->is_terminal) { }
0 0 if ($new_root) { }
0 0 if (@_)
0 0 if (my $desc = $node->get_descendants)
0 0 if (ref $args{$key}) { }
0 0 if (ref $args{$key}) { }
0 0 if ($key =~ /^-keep_(.+)$/) { }
0 0 elsif ($key =~ /^-remove_(.+)$/) { }
0 0 if $remove->get_id == $keep->get_id
0 0 if (@names) { }
0 0 elsif (@keep_names) { }
0 0 if (ref $args[0]) { }
0 0 if $level < 0
118 0 0 if (&blessed($bptree) and $bptree->isa('Bio::Tree::TreeI')) { }
125 0 0 if defined $name
129 0 0 if defined $score
155 0 0 if ($parent)
202 115 1748 if ($firstp and $nextp and $firstp == $nextp)
203 6 109 unless ($first->get_next_sister)
206 6 109 unless ($next->get_previous_sister)
217 220 9 if ($p)
218 105 115 unless ($_->get_next_sister)
222 105 10 unless ($_->get_previous_sister)
256 0 1 unless $nB
264 1 1 if ($cdist > $middist) { }
268 1 0 if (my $parent = $current->get_parent) { }
304 121 30 if (my $root = $self->get_root) { }
308 2291 1950 if ($node->is_terminal)
318 0 0 if ($n->is_terminal)
374 3 7 if (scalar @children == 2)
377 2 0 unless (@{$children[0]->get_children;} or @{$children[1]->get_children;})
415 0 0 if ($anc->[0])
419 0 0 if $anc->[0]
451 1657 59 if ($root) { }
459 0 0 if (my $parent = $node->get_parent) { }
461 0 0 unless $children_of{$parent_id}
469 0 0 unless (exists $node_by_id{$parent})
471 0 0 if (scalar @children > 1)
519 3 0 if ($self->calc_tree_length) { }
528 16 0 if (my $path = $tip->$criterion)
529 4 12 if ($path > $height)
556 1 4 if ($is_taxa and not $@) { }
565 15 10 if (my $taxon = $node->get_taxon)
566 11 4 if $ids{$taxon->get_id}
590 0 0 if (not $nodes && @{$nodes;}) { }
0 0 elsif (scalar @{$nodes;} == 1) { }
605 0 0 if ($anc1->[$i]->get_id == $anc2->[$j]->get_id)
642 1 32 if $count != 0 and $count != 2
682 832 46 if (my $parent = $node->get_parent) { }
690 466 412 if $node->is_terminal
697 15 2091 unless $path{$id2}
698 4 2087 if abs 1 - $path{$id1} / $path{$id2} > $margin
727 2 0 if (@_ == 2) { }
0 0 elsif (@_ == 4) { }
738 1 3 if $mrca->is_ancestor_of($outgroup)
762 0 0 if (@_ == 2) { }
0 0 elsif (@_ == 4) { }
770 0 0 unless $tree->is_monophyletic($nodes, $outgroup)
774 0 0 scalar @{$tips;} == scalar @all ? :
802 0 3 if ($is_taxa and not $@)
808 3 0 if ($is_node_array and not $@) { }
816 0 3 $mrca ? :
819 2 1 scalar @{$mrca->get_terminals;} == scalar @{$tips;} ? :
842 0 0 if defined $node->get_branch_length
922 0 2 $normalize ? :
976 265 406 if (@children and $node->get_parent) { }
1021 128 5 if (exists $lengths_other{$split}) { }
1033 4 128 unless (exists $lengths_self{$split})
1175 4 0 if (my $parent = $tip->get_parent)
1176 4 0 if ($parent->is_preterminal)
1178 4 0 if (scalar @{$children;} == 2)
1266 55 64 if (@children == 2) { }
63 1 elsif (@children == 0) { }
1287 0 5 if ($n < 3) { }
1313 0 0 unless ($self->is_binary)
1325 0 0 if ($fd->is_internal) { }
1327 0 0 if ($_->is_terminal) { }
1338 0 0 if ($ld->is_internal) { }
1340 0 0 if ($_->is_terminal) { }
1351 0 0 unless $ftips + $ltips - 2
1354 0 0 if ($maxic == 0) { }
1421 0 0 if ($@)
1479 7 1 if ($node->get_parent)
1488 1 0 if ($nnodes) { }
1522 1 2 if $self->calc_resolution < 1
1524 1 1 unless $self->calc_tree_length
1543 7 1 if (my $parent = $node->get_parent)
1555 2 5 unless ($hj)
1618 1 5 if (not $self->is_ultrametric(0.01)) { }
1628 65 60 if (not $seen_tip or $node->is_internal)
1630 60 5 if (my $parent = $node->get_parent)
1635 5 60 if ($node->is_terminal)
1703 2 3 if (my $child = $node->get_child(0))
1737 1 1 unless ($self->is_ultrametric(0.01))
1779 9 123 unless $tuple->[2]
1781 3 18 $normalize ? :
1945 0 0 unless my $terminals = $self->get_terminals
1989 0 0 unless my $terminals = $self->get_terminals
2010 0 0 if ($el->{'terminals'}{$name}) { }
2037 0 0 unless $index
2046 0 0 if ($previous and $index->is_terminal)
2053 0 0 unless $child ne $previous
2058 0 0 if ($parent ne $previous)
2064 0 0 unless ($is_root)
2068 0 0 $direction eq 'root' ? :
2159 143 0 if (my $root = $self->get_root)
2228 3 0 if (my $root = $tree->get_root) { }
2273 4 3 unless (scalar @{$children;})
2308 0 0 if ($node->is_terminal) { }
2320 0 0 if $node->is_root
2327 0 0 if ($total)
2329 0 0 if ($rho)
2358 44 2 if (my $parent = $node->get_parent) { }
2440 5 4 if ($path_to_root > $tallest)
2479 16 1 if ($bl)
2507 1 13 if (scalar @children > 2)
2511 2 0 unless $anonymous
2559 0 0 if (&looks_like_class('Statistics::R') and &looks_like_class('Bio::Phylo::Generator'))
2565 0 0 if (my $seed = $args{'-seed'})
2591 0 0 if ($genus =~ /(..)$/)
2601 0 0 unless $args{'-rootedge'}
2606 0 0 if ($args{'-genera'})
2618 0 0 if ($rank)
2619 0 0 if ($rank eq 'genus')
2660 0 0 if --$size <= 1
2663 0 0 if ($node{$size}) { }
2676 0 0 if $n->is_terminal
2678 0 0 if (my $array = $node{$i})
2681 0 0 @filtered ? :
2703 0 0 int rand 2 ? :
2748 0 0 unless $genera{$genus}
2755 0 0 if $skip{$genus}
2759 0 0 if (scalar @$tips == 1) { }
2761 0 0 if $args{'-monotypic'}
2777 0 0 if ($clade_size == $tip_count) { }
2786 0 0 if ($args{'-polypara'})
2823 112 6 unless ($prune{$tip->get_id})
2849 0 24 if (&blessed($arg)) { }
2853 0 0 if $self->contains($node)
2865 117 16 if (&blessed($thing)) { }
2866 0 117 if ($thing->_type == $TAXON) { }
117 0 elsif ($thing->_type == $NODE) { }
2869 0 0 if $self->contains($node)
2873 111 6 if $self->contains($thing)
2879 16 0 if (my $tip = $self->get_by_name($thing))
2900 235 108 if (not exists $seen{$id}) { }
2917 23 235 unless (exists $seen{$nid})
2918 22 1 if $p
2921 22 1 if (defined $p)
2923 12 10 if (exists $seen{$pid})
2931 10 225 if (scalar @children == 1 and $seen{$nid} > 0)
2935 4 6 if defined $cbl and defined $bl
2938 6 4 if $p
2964 0 17 if ($bl and $bl < 0)
3003 10 6 if ($child->is_terminal) { }
3018 0 18 if ($right) { }
3068 0 4 UNIVERSAL::can($taxa, 'get_entities') ? :
3070 0 24 UNIVERSAL::can($_, 'get_name') ? :
3077 10 24 if (@children) { }
3112 0 0 if (not &looks_like_number($power)) { }
3139 0 0 unless (&looks_like_number($num))
3145 0 0 if ($length)
3167 0 0 if (not &looks_like_number($base)) { }
3175 0 0 if ($@) { }
3212 486 503 if (@children)
3215 0 486 if ($node->is_root and 1 == @children) { }
3222 0 0 if defined $clength
3223 0 0 if defined $glength
3224 0 0 if defined $length
3244 1 1032 if (1 == scalar @grandchildren)
3250 0 1 if defined $clength
3251 0 1 if defined $glength
3252 0 1 if defined $length
3299 0 0 if not $seen{$node->get_id}
3304 0 0 if (scalar @delete)
3329 0 0 if (scalar @children < 3) { }
3330 0 0 unless ($collapsible)
3408 0 0 if (my $parent = $node->get_parent)
3483 0 0 if (defined $length and not $length =~ /^[+-]?\d+$/)
3489 0 0 if (my $root = $self->get_root)
3533 0 0 unless (&looks_like_object($dom, 18))
3539 0 0 if (defined $length and not $length =~ /^[+-]?\d+$/)
3545 0 0 if (my $root = $self->get_root)