Branch Coverage

Bio/SimpleAlign.pm
Criterion Covered Total %
branch 315 456 69.0


line true false branch
203 108 183 if $src
204 7 284 if defined $score
213 8 283 if $id
214 8 283 if $acc
215 8 283 if $desc
216 9 282 if $coll
218 0 291 if ($sa)
219 0 0 unless $coll
224 1 290 if ($feats and ref $feats eq 'ARRAY')
229 0 291 if $con
230 8 283 if $cmeta
232 9 282 if ($seqs and ref $seqs eq 'ARRAY')
276 0 2420 unless ($seq)
279 0 2420 unless (ref $seq and $seq->isa('Bio::LocatableSeq'))
282 2417 3 unless defined $order
285 1 2419 if ($order < 0)
299 0 2419 if ($self->{'_seq'}{$name}) { }
300 0 0 unless $self->verbose < 0
306 0 2419 if ($ordh->{$order})
312 0 0 $_[1] - $_[0] == 1 ? :
320 2400 19 unless (exists $self->{'_start_end_lists'}{$id})
352 0 13 unless ref $seq and $seq->isa('Bio::LocatableSeq')
358 0 13 unless (exists $self->{'_seq'}{$name})
366 13 0 if (exists $self->{'_start_end_lists'}{$id}) { }
371 13 0 if (do { $$self{'_start_end_lists'}{$id} }->[$i] eq $seq)
376 13 0 if ($found) { }
420 11 4 if exists $duplicate{$seq->display_id}
429 1 27 if exists $duplicate{$seq2->display_id}
437 4329 2058 if ($one[$k] ne '.' and $one[$k] ne '-' and defined $two[$k] and $one[$k] eq $two[$k])
441 6320 67 if ($one[$k] ne '.' and $one[$k] ne '-' and defined $two[$k] and $two[$k] ne '.' and $two[$k] ne '-')
448 27 0 unless $res == 0
452 12 15 if ($ratio > $perc)
453 0 12 if $self->verbose > 0
517 0 1 unless open my $listfh, '<', $list
521 0 6 unless &_in_aln($name, \@ids)
557 1 1 if ($seqid =~ /^\d+$/) { }
559 0 1 if $seqid <= 1 or $seqid > $self->num_sequences
561 0 1 unless &_in_aln($seqid, \@ids)
566 2 10 if ($is_num and $pos == $seqid or $seqid eq $seq[$i]->display_id) { }
579 7 17 if $str eq $_
619 0 15 if $str =~ /^[atcgn-]+$/i
639 4 11 if ($seen) { }
655 0 11 if $str2 =~ /^[atcg\-\?]+$/i
670 0 1 wantarray ? :
678 1 14 if @array == 0
684 1867 22382 if $char1[$i] eq '?'
685 642 21740 if $char2[$i] eq '?'
686 14469 7271 if $char1[$i] ne $char2[$i]
688 4 55 if $diff == 0
701 343 26 $array[$i] eq $sym1 ? :
705 526 26 $array[$i] eq $sym1 ? :
736 56083 13 if (exists $self->{'_seq'}{$self->{'_order'}{$order}})
776 0 94 if ($aname eq $bname) { }
806 0 89 unless defined $id
811 89 0 if (exists $self->{'_start_end_lists'}{$id})
834 0 258 unless $pos =~ /^\d+$/ and $pos > 0
836 0 258 unless $pos <= $self->num_sequences
856 0 18 unless (defined $name)
861 18 27 if ($seq->id eq $name)
906 0 0 unless $arg{-'pos'}
911 0 0 if defined $arg{-'mask'}
915 0 0 if $consensus_string =~ /^[^?]/
924 0 0 if $consensus_string =~ /[^?]$/
972 0 1 unless $start =~ /^\d+$/ and $start > 0
974 0 1 unless $end =~ /^\d+$/ and $end > 0
976 0 1 unless $start <= $end
1015 1 7 unless ($pos[0] =~ /^\d+$/)
1017 1 0 if ($sortcmd eq 'nosort') { }
1026 0 32 unless /^\d+$/ and $_ > 0 and $_ <= $end
1030 7 1 unless $nosort
1086 0 31 unless $start =~ /^\d+$/ and $start > 0
1088 0 31 unless $end =~ /^\d+$/ and $end > 0
1090 0 31 unless $start <= $end
1092 1 30 if $start > $self->length
1098 0 107 $seq->isa('Bio::Seq::MetaI') ? :
1112 0 107 if $end > $seq->length
1119 24 83 if (exists $self->{'_mask_char'})
1125 52 55 if ($start > 1) { }
1128 38 14 if (not defined $seq->strand) { }
1 13 elsif ($seq->strand < 0) { }
1136 2 53 if (defined $seq->strand and $seq->strand < 0) { }
1142 0 107 if ($new_seq->isa('Bio::Seq::MetaI'))
1149 106 1 if ($new_seq->start and $new_seq->end >= $new_seq->start) { }
1152 1 0 if ($keep_gap_only) { }
1161 0 30 if ($cons_meta)
1190 0 4 unless @args
1193 1 3 if ($args[0][0] =~ /^[a-z_]+$/i) { }
3 0 elsif ($args[0][0] =~ /^\d+$/) { }
1224 2 4 if ($all_gaps_columns) { }
1248 5 1 $#remove >= 0 ? :
1271 0 658 unless $sequence
1273 627 31 $start > 0 ? :
1274 32 626 $end + 1 >= CORE::length $sequence ? :
1277 42 616 unless (defined $new_seq->start)
1278 31 11 if ($start == 0) { }
1284 5 6 if ($start_adjust)
1291 32 626 if ($end + 1 >= CORE::length $orig) { }
1300 1 41 if ($new_seq->end < $new_seq->start)
1307 42 0 if $sequence
1323 0 1 if grep {$_ eq 'gaps';} @{$type;}
1324 0 1 if grep /all_gaps_columns/, @{$type;}
1341 1 0 if ($del_char)
1356 1 0 $#remove >= 0 ? :
1357 0 1 if $gap
1358 0 1 if $all_gaps_columns
1384 3 0 $#remove >= 0 ? :
1454 0 4 unless defined $from and defined $to
1519 28 104 if ($seq[$x] eq $consensus[$x]) { }
84 20 elsif ($seq[$x] ne $gapchar) { }
1530 4 0 if do { $cigars{$name} }->[0] + 1 < do { $cigars{$name} }->[1]
1533 4 0 if ${$cigars{$name};}[$#{$cigars{$name};} - 1] + 1 < ${$cigars{$name};}[$#{$cigars{$name};}]
1535 4 24 if (${$cigars{$name};}[$x - 1] + 1 < do { $cigars{$name} }->[$x] and ${$cigars{$name};}[$x + 1] > do { $cigars{$name} }->[$x] + 1)
1545 8 28 if (do { $cigars{$name} }->[$x] == ${$cigars{$name};}[$x - 1] + 1 and do { $cigars{$name} }->[$x] == ${$cigars{$name};}[$x + 1] - 1)
1592 6 63 unless defined $alphabet
1601 6 3132 unless (defined $refchar)
1602 6 0 if $pos == $self->length
1610 0 26906 if $pos >= scalar @$seq
1611 99 24512 if $seq->[$pos] eq '-' or $seq->[$pos] eq '.' or $seq->[$pos] eq ' '
1613 26906 0 if defined $seq->[$pos]
1618 758 2374 if ($dash) { }
1721 653 elsif (@colresidues == 1) { }
472 181 elsif ($alphabet eq 'protein') { }
1639 3752 196 if scalar @$cols != scalar @colresidues
1642 0 453 if $cols->[$_] ne $colresidues[$_]
1678 217 1756 exists $gap_hsh{$pos} ? :
1706 1 21 if (exists $gap_hsh{$pos} and $gap_hsh{$pos} == scalar @seqs) { }
1769 1 0 if $match =~ /[\^.$|()\[\]]/
1773 0 1 unless scalar @seqs > 1
1782 524 196 if defined $refseq[$i] and $refseq[$i] =~ /[A-Za-z\*]/ || $refseq[$i] =~ /$gapchar/ and $refseq[$i] eq $varseq[$i]
1814 0 5 unless scalar @seqs > 1
1822 13780 6002 if defined $refseq[$i] and $refseq[$i] =~ /[A-Za-z\*]/ || $refseq[$i] =~ /$gapchar/ and $varseq[$i] eq $match
1856 72 70 if (defined $name)
1876 8 8 if (defined $acc)
1896 13 12 if (defined $name)
1918 22 10 if (defined $char)
1919 0 22 if CORE::length $char > 1
1941 9 9 if (defined $char)
1942 0 9 if CORE::length $char > 1
1963 51 11191 if (defined $char or not defined $self->{'_gap_char'})
1964 26 25 unless defined $char
1965 0 51 if CORE::length $char > 1
1986 3 2 unless ($self->{'_symbols'})
1992 5 0 unless ($includeextra)
1995 7 8 if defined $char
2018 17 9 if @_
2087 2472 2426 if ($hash{$key} > $count and $hash{$key} >= $threshold)
2103 0 22078 if $letter eq ''
2104 4744 17334 if $letter eq $gapchar or $letter =~ /\./
2136 0 2 if $seq->alphabet eq 'protein'
2158 1 9 if ($string =~ /N/)
2159 0 1 $string =~ /\W/ ? :
2162 2 7 if $string =~ /^\W+$/
2165 0 7 if ($string =~ /U/)
2173 0 7 if ($string =~ /[VDHB]/)
2180 1 6 if ($string =~ /[SKYRWM]/)
2191 5 2 if ($string =~ /A/) { }
0 2 elsif ($string =~ /C/) { }
0 2 elsif ($string =~ /G/) { }
2 0 elsif ($string =~ /T/) { }
2193 0 5 if ($string =~ /G/) { }
0 5 elsif ($string =~ /C/) { }
2 3 elsif ($string =~ /T/) { }
2195 0 0 if ($string =~ /C/) { }
0 0 elsif ($string =~ /T/) { }
2197 0 0 if ($string =~ /T/)
2205 0 0 if ($string =~ /T/)
2213 0 0 if ($string =~ /T/) { }
0 0 elsif ($string =~ /G/) { }
2215 0 0 if ($string =~ /G/)
2223 0 0 if ($string =~ /C/) { }
0 0 elsif ($string =~ /T/) { }
2232 0 7 if $rna and $char eq 'T'
2233 1 6 if $string =~ /\W/
2253 0 56 if ($meta and not ref $meta && $meta->isa('Bio::Seq::MetaI'))
2256 17 39 if $meta
2278 54 196 if ($length == -1)
2284 0 196 if ($temp != $length)
2285 0 0 if $report
2324 2227 6299 if ($temp > $length)
2366 52 70 if ($len > $maxname)
2393 6 11 unless $seq->isa('Bio::Seq::MetaI')
2396 0 0 if ($len > $maxname)
2404 1 1 unless $meta
2407 1 0 if ($len > $maxname)
2480 0 9 unless ($self->is_flush)
2498 7077 503 if (exists $countHashes[$column]{$char})
2515 9 0 $divisor > 0 ? :
2558 0 18 if $length_measure and not exists $enum{$length_measure}
2561 0 18 unless ($self->is_flush)
2578 17043 769 if (exists $alphabet{$char})
2581 12763 4280 if (defined $countHashes[$column]{$char}) { }
2587 819 16224 if ($countHashes[$column]{$char} == $nof_seqs)
2596 32 60 if ($length_measure eq 'short' or $length_measure eq 'long')
2598 16 16 if ($length_measure eq 'short') { }
16 0 elsif ($length_measure eq 'long') { }
2599 5 11 if (not defined $len or $seq_len < $len)
2603 2 14 if (not defined $len or $seq_len > $len)
2611 16 2 if ($length_measure eq 'align')
2669 0 27 unless $self->{'_start_end_lists'}{$name}
2670 0 27 unless $resnumber
2675 0 27 if $@
2705 0 550 unless defined $self->{'_seq'}{$name}
2707 112 438 if ($disname and $name) { }
48 390 elsif (defined $self->{'_dis_name'}{$name}) { }
2753 0 16 if (defined $name and $name eq $seq->id) { }
2825 111 12 if (defined $value)
2889 0 14 unless defined $name{$seq->id}
2986 0 14 unless $a1 and $a2 and $ref
2988 7 7 if $delim
2994 0 14 unless ($refseq and $allele1 and $allele2)
3005 182 28 $compres eq $res1 && $compres eq $res2 ? :
3033 0 4 unless not defined $filter_cb or ref $filter_cb eq 'CODE'
3036 2 2 unless (defined $self->{'_as_feat'})
3039 0 4 if ($filter_cb)
3060 2 7 unless $self->{'_as_feat'}
3062 0 9 if (scalar @feat > 1)
3074 0 9 if $feat eq 'EXPAND'
3076 0 9 unless ($feat->isa('Bio::SeqFeatureI'))
3100 0 0 unless $self->{'_as_feat'}
3119 2 0 if (defined $self->{'_as_feat'}) { }
3159 46 41 if (defined $value) { }
21 20 elsif (not defined $obj->{'_annotation'}) { }
3160 0 46 unless $value->isa('Bio::AnnotationCollectionI')
3240 0 6 unless (defined $mask_char)
3242 0 6 unless $start =~ /^\d+$/ and $start > 0 and $start <= $self->length
3245 0 6 unless $end =~ /^\d+$/ and $end > 0 and $end <= $self->length
3248 0 6 unless $start <= $end
3250 0 6 unless CORE::length $mask_char == 1 and not $mask_char =~ /$nonres/