Branch Coverage

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


line true false branch
89 29 167 unless ($LOADED_WRAPPERS)
90 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
119 0 0 if (&blessed($bptree) and $bptree->isa('Bio::Tree::TreeI')) { }
126 0 0 if defined $name
130 0 0 if defined $score
156 0 0 if ($parent)
203 115 1749 if ($firstp and $nextp and $firstp == $nextp)
204 6 109 unless ($first->get_next_sister)
207 6 109 unless ($next->get_previous_sister)
218 220 9 if ($p)
219 105 115 unless ($_->get_next_sister)
223 105 10 unless ($_->get_previous_sister)
257 0 1 unless $nB
265 1 1 if ($cdist > $middist) { }
269 1 0 if (my $parent = $current->get_parent) { }
305 121 30 if (my $root = $self->get_root) { }
309 2421 2062 if ($node->is_terminal)
319 0 0 if ($n->is_terminal)
375 3 7 if (scalar @children == 2)
378 2 0 unless (@{$children[0]->get_children;} or @{$children[1]->get_children;})
416 0 0 if ($anc->[0])
420 0 0 if $anc->[0]
452 1745 59 if ($root) { }
460 0 0 if (my $parent = $node->get_parent) { }
462 0 0 unless $children_of{$parent_id}
470 0 0 unless (exists $node_by_id{$parent})
472 0 0 if (scalar @children > 1)
520 3 0 if ($self->calc_tree_length) { }
529 16 0 if (my $path = $tip->$criterion)
530 4 12 if ($path > $height)
557 1 4 if ($is_taxa and not $@) { }
566 15 10 if (my $taxon = $node->get_taxon)
567 11 4 if $ids{$taxon->get_id}
591 0 0 if (not $nodes && @{$nodes;}) { }
0 0 elsif (scalar @{$nodes;} == 1) { }
606 0 0 if ($anc1->[$i]->get_id == $anc2->[$j]->get_id)
643 1 32 if $count != 0 and $count != 2
683 796 44 if (my $parent = $node->get_parent) { }
691 446 394 if $node->is_terminal
698 15 2001 unless $path{$id2}
699 4 1997 if abs 1 - $path{$id1} / $path{$id2} > $margin
728 2 0 if (@_ == 2) { }
0 0 elsif (@_ == 4) { }
739 1 3 if $mrca->is_ancestor_of($outgroup)
763 0 0 if (@_ == 2) { }
0 0 elsif (@_ == 4) { }
771 0 0 unless $tree->is_monophyletic($nodes, $outgroup)
775 0 0 scalar @{$tips;} == scalar @all ? :
803 0 3 if ($is_taxa and not $@)
809 3 0 if ($is_node_array and not $@) { }
817 0 3 $mrca ? :
820 2 1 scalar @{$mrca->get_terminals;} == scalar @{$tips;} ? :
843 0 0 if defined $node->get_branch_length
923 0 2 $normalize ? :
977 265 406 if (@children and $node->get_parent) { }
1022 128 5 if (exists $lengths_other{$split}) { }
1034 4 128 unless (exists $lengths_self{$split})
1176 4 0 if (my $parent = $tip->get_parent)
1177 4 0 if ($parent->is_preterminal)
1179 4 0 if (scalar @{$children;} == 2)
1267 55 64 if (@children == 2) { }
63 1 elsif (@children == 0) { }
1288 0 5 if ($n < 3) { }
1314 0 0 unless ($self->is_binary)
1326 0 0 if ($fd->is_internal) { }
1328 0 0 if ($_->is_terminal) { }
1339 0 0 if ($ld->is_internal) { }
1341 0 0 if ($_->is_terminal) { }
1352 0 0 unless $ftips + $ltips - 2
1355 0 0 if ($maxic == 0) { }
1422 0 0 if ($@)
1480 7 1 if ($node->get_parent)
1489 1 0 if ($nnodes) { }
1523 1 2 if $self->calc_resolution < 1
1525 1 1 unless $self->calc_tree_length
1544 7 1 if (my $parent = $node->get_parent)
1556 2 5 unless ($hj)
1619 1 5 if (not $self->is_ultrametric(0.01)) { }
1629 65 60 if (not $seen_tip or $node->is_internal)
1631 60 5 if (my $parent = $node->get_parent)
1636 5 60 if ($node->is_terminal)
1704 2 3 if (my $child = $node->get_child(0))
1738 1 1 unless ($self->is_ultrametric(0.01))
1780 9 123 unless $tuple->[2]
1782 3 18 $normalize ? :
1946 0 0 unless my $terminals = $self->get_terminals
1990 0 0 unless my $terminals = $self->get_terminals
2011 0 0 if ($el->{'terminals'}{$name}) { }
2038 0 0 unless $index
2047 0 0 if ($previous and $index->is_terminal)
2054 0 0 unless $child ne $previous
2059 0 0 if ($parent ne $previous)
2065 0 0 unless ($is_root)
2069 0 0 $direction eq 'root' ? :
2160 141 0 if (my $root = $self->get_root)
2229 3 0 if (my $root = $tree->get_root) { }
2274 4 3 unless (scalar @{$children;})
2309 0 0 if ($node->is_terminal) { }
2321 0 0 if $node->is_root
2328 0 0 if ($total)
2330 0 0 if ($rho)
2359 44 2 if (my $parent = $node->get_parent) { }
2441 5 4 if ($path_to_root > $tallest)
2480 16 1 if ($bl)
2508 1 13 if (scalar @children > 2)
2512 2 0 unless $anonymous
2560 0 0 if (&looks_like_class('Statistics::R') and &looks_like_class('Bio::Phylo::Generator'))
2566 0 0 if (my $seed = $args{'-seed'})
2592 0 0 if ($genus =~ /(..)$/)
2602 0 0 unless $args{'-rootedge'}
2607 0 0 if ($args{'-genera'})
2619 0 0 if ($rank)
2620 0 0 if ($rank eq 'genus')
2661 0 0 if --$size <= 1
2664 0 0 if ($node{$size}) { }
2677 0 0 if $n->is_terminal
2679 0 0 if (my $array = $node{$i})
2682 0 0 @filtered ? :
2704 0 0 int rand 2 ? :
2749 0 0 unless $genera{$genus}
2756 0 0 if $skip{$genus}
2760 0 0 if (scalar @$tips == 1) { }
2762 0 0 if $args{'-monotypic'}
2778 0 0 if ($clade_size == $tip_count) { }
2787 0 0 if ($args{'-polypara'})
2824 114 6 unless ($prune{$tip->get_id})
2850 0 24 if (&blessed($arg)) { }
2854 0 0 if $self->contains($node)
2866 121 16 if (&blessed($thing)) { }
2867 0 121 if ($thing->_type == $TAXON) { }
121 0 elsif ($thing->_type == $NODE) { }
2870 0 0 if $self->contains($node)
2874 111 10 if $self->contains($thing)
2880 16 0 if (my $tip = $self->get_by_name($thing))
2901 237 108 if (not exists $seen{$id}) { }
2918 25 237 unless (exists $seen{$nid})
2919 24 1 if $p
2922 24 1 if (defined $p)
2924 14 10 if (exists $seen{$pid})
2932 12 225 if (scalar @children == 1 and $seen{$nid} > 0)
2936 6 6 if defined $cbl and defined $bl
2939 8 4 if $p
2965 0 17 if ($bl and $bl < 0)
3004 10 6 if ($child->is_terminal) { }
3019 0 18 if ($right) { }
3069 0 4 UNIVERSAL::can($taxa, 'get_entities') ? :
3071 0 24 UNIVERSAL::can($_, 'get_name') ? :
3078 10 24 if (@children) { }
3113 0 0 if (not &looks_like_number($power)) { }
3140 0 0 unless (&looks_like_number($num))
3146 0 0 if ($length)
3168 0 0 if (not &looks_like_number($base)) { }
3176 0 0 if ($@) { }
3213 558 583 if (@children)
3216 0 558 if ($node->is_root and 1 == @children) { }
3223 0 0 if defined $clength
3224 0 0 if defined $glength
3225 0 0 if defined $length
3245 1 1185 if (1 == scalar @grandchildren)
3251 0 1 if defined $clength
3252 0 1 if defined $glength
3253 0 1 if defined $length
3300 0 0 if not $seen{$node->get_id}
3305 0 0 if (scalar @delete)
3330 0 0 if (scalar @children < 3) { }
3331 0 0 unless ($collapsible)
3409 0 0 if (my $parent = $node->get_parent)
3484 0 0 if (defined $length and not $length =~ /^[+-]?\d+$/)
3490 0 0 if (my $root = $self->get_root)
3534 0 0 unless (&looks_like_object($dom, 18))
3540 0 0 if (defined $length and not $length =~ /^[+-]?\d+$/)
3546 0 0 if (my $root = $self->get_root)