Branch Coverage

blib/lib/Algorithm/NeedlemanWunsch.pm
Criterion Covered Total %
branch 113 138 81.8


line true false branch
22 2 4 if ($spec_name eq 'align') { }
26 0 9 unless $rv eq 'align'
33 0 4 unless $rv eq $spec_name
43 26 7 if (@_) { }
49 4 29 if (exists $$cb{'select_align'})
52 6 6 unless (exists $$cb{$_})
66 6 6 if (@_)
76 12 0 if (@_)
86 3 0 if (@_)
96 3 0 if (@_)
111 27 6 if (not exists $$self{'gap_open_penalty'}) { }
112 0 27 if (exists $$self{'gap_extend_penalty'})
116 3 24 unless (exists $$self{'gap_penalty'})
122 0 6 unless (exists $$self{'gap_extend_penalty'})
126 0 6 if ($$self{'gap_open_penalty'} >= $$self{'gap_extend_penalty'})
158 20 7 if (not $$self{'local'}) { }
168 1042 83 $i < $m ? :
183 20 7 if (not $$self{'local'}) { }
220 2671 3524 if ($scores[$k] == $d)
244 151 79 if ($a & $from_diag)
245 0 151 unless $i > 0 and $j > 0
249 60 170 if ($a & $from_up)
250 0 60 unless $i > 0
254 59 171 if ($a & $from_left)
255 0 59 unless $j > 0
259 0 230 unless (@alt)
265 197 33 if (@alt == 1) { }
272 149 81 if ($move eq 'align') { }
44 37 elsif ($move eq 'shift_a') { }
37 0 elsif ($move eq 'shift_b') { }
315 4 2 if (not $$self{'local'}) { }
331 792 45 if ($i < $m)
342 4 2 if (not $$self{'local'}) { }
412 8 10 if ($score[$idx] == $res)
424 64 68 if ($arrow & $from_diag)
425 0 64 unless $i > 0 and $j > 0
429 49 83 if ($arrow & $from_up)
430 0 49 unless $i > 0
434 45 87 if ($arrow & $from_left)
435 0 45 unless $j > 0
439 0 132 unless (@alt)
448 107 25 if (@alt == 1) { }
455 64 68 if ($move eq 'align') { }
40 28 elsif ($move eq 'shift_a') { }
28 0 elsif ($move eq 'shift_b') { }
460 2 62 if ($i == 0) { }
2 60 elsif ($j == 0) { }
470 77 103 if ($score[$idx] == $d)
483 5 35 if ($$self{'local'} and $i == $m) { }
510 22 46 if ($i == 0) { }
0 46 elsif ($j == 0) { }
520 53 85 if ($$base[$idx] + $$delta[$idx] == $to_score)
537 48 76 if ($m eq 'align') { }
32 44 elsif ($m eq 'shift_a') { }
44 0 elsif ($m eq 'shift_b') { }
550 4 54 if (exists $$cb{'select_align'}) { }
552 0 4 unless (exists $$arg{$move})
558 54 10 if (exists $$arg{$m})
564 0 54 unless ($move)
568 47 7 if (exists $$cb{$move})
569 37 10 if ($move eq 'align') { }
583 324 104 if ($$next[0] == $$cur[0] - 1) { }
584 215 109 if ($$next[1] == $$cur[1] - 1) { }
585 155 60 if (exists $$cb{'align'})
591 0 109 if ($$next[1] != $$cur[1])
595 59 50 if (exists $$cb{'shift_b'})
602 0 104 if ($$next[0] != $$cur[0])
606 0 104 if ($$next[1] != $$cur[1] - 1)
610 70 34 if (exists $$cb{'shift_a'})