Branch Coverage

Bio/Tree/Node.pm
Criterion Covered Total %
branch 75 122 61.4


line true false branch
126 0 17402 if (defined $d and defined $desc) { }
0 34804 elsif (defined $d and not defined $desc) { }
132 1 17401 if defined $desc
133 78 17324 if defined $bootstrap
134 8027 9375 if defined $id
135 8680 8722 if defined $branchlen
136 2072 15330 if (defined $children)
137 0 2072 unless (ref($children) =~ /ARRAY/i)
172 0 19 unless ($self->ancestor)
175 0 19 unless ($blen)
176 0 0 unless $force
178 0 2 unless (defined $pos and not defined $frac or defined $frac and not defined $pos)
181 2 17 if (defined $frac) { }
17 0 elsif (defined $pos) { }
182 0 2 unless 0 <= $frac and $frac <= 1
186 0 17 unless 0 <= $pos and $pos <= $blen
192 0 19 unless $newpos > 0 or $force
193 0 19 unless $newpos < $blen or $force
223 0 11318 unless defined $node
225 0 11318 if (not ref $node or ref($node) =~ /HASH/ or not $node->isa('Bio::Tree::NodeI'))
234 9163 2155 unless $node->{'_setting_ancestor'}
237 0 11318 if ($self->{'_desc'}{$node->internal_id} and not $ignoreoverwrite)
264 0 35113 if (ref $sortby eq 'CODE') { }
0 35113 elsif ($sortby eq 'height') { }
0 35113 elsif ($sortby eq 'alpha') { }
0 35113 elsif ($sortby eq 'revalpha') { }
269 0 0 unless $Bio::Tree::Node::a->[1] <=> $Bio::Tree::Node::b->[1]
276 0 0 if (not $v->is_Leaf) { }
286 0 0 unless $Bio::Tree::Node::a->[1] cmp $Bio::Tree::Node::b->[1]
290 0 0 if (not defined $v->id || $v->is_Leaf) { }
301 0 0 unless $Bio::Tree::Node::b->[1] cmp $Bio::Tree::Node::a->[1]
326 188 36 if ($self->{'_desc'}{$n->internal_id}) { }
335 0 36 if ($self->verbose)
398 11754 47601 if (@_)
402 11329 425 if ($new_ancestor)
403 0 11329 unless $new_ancestor->isa('Bio::Tree::NodeI')
408 11743 11 if (not $old_ancestor or $old_ancestor and !$new_ancestor || $new_ancestor ne $old_ancestor)
411 144 11599 if ($old_ancestor and not $old_ancestor->{'_removing_descendent'})
414 2155 9588 if ($new_ancestor and not $new_ancestor->{'_adding_descendent'})
439 8795 50775 if (@_)
441 0 8795 if (defined $bl and $bl =~ s/\[(\d+)\]//)
463 228 2493 if (@_)
464 135 93 if ($self->has_tag('B'))
484 1 1 if @_
513 16941 79677 if (defined $value)
569 22925 60000 if @_
608 0 1 if defined $self->{'_height'}
610 1 0 if $self->is_Leaf
614 0 0 unless defined $bl and $bl =~ /^\-?\d+(\.\d+)?$/
616 0 0 if ($s > $max)
635 10704 20113 if (defined $self->ancestor)
654 0 111 unless (defined $tag and scalar @values)
676 0 1841 unless (defined $tag and defined $value)
677 0 0 $tag ? :
697 189 102 if (exists $self->{'_tags'}{$tag})
733 264 2724 unless $self->{'_tags'}
751 2321 4652 unless $self->{'_tags'}{$tag}
752 0 588 unless $self->{'_tags'}{$tag}
6973 588 wantarray ? :
772 0 23513 unless defined $self
802 0 0 if ($self->delete_edge($node))