Branch Coverage

blib/lib/UMLS/Interface/PathFinder.pm
Criterion Covered Total %
branch 0 674 0.0


line true false branch
91 0 0 unless (defined $errorhandler)
98 0 0 unless (defined $handler)
144 0 0 unless (defined $self and ref $self)
150 0 0 unless ($sdb)
172 0 0 unless (defined $self and ref $self)
176 0 0 if ($option == 1) { }
196 0 0 unless (defined $self and ref $self)
200 0 0 if ($option == 1) { }
220 0 0 unless (defined $self and ref $self)
235 0 0 if (defined $forcerun or defined $verbose or defined $realtime or defined $debugoption or defined $debugpath or defined $cuilist)
241 0 0 if (defined $debugoption)
249 0 0 if (defined $t)
254 0 0 if (defined $undirected)
260 0 0 if (defined $cuilist)
267 0 0 if (defined $debugpath)
270 0 0 unless open DEBUG_FILE, ">$debugpath"
275 0 0 if (defined $realtime)
282 0 0 if (defined $verbose)
289 0 0 if (defined $forcerun)
295 0 0 if ($option_t == 0)
311 0 0 unless (defined $self and ref $self)
316 0 0 if ($max_depth >= 0)
329 0 0 unless ($sdb)
341 0 0 if (defined $depth)
347 0 0 if ($option_realtime) { }
402 0 0 unless (defined $self and ref $self)
407 0 0 unless ($concept)
412 0 0 unless ($errorhandler->_validCui($concept))
417 0 0 if ($cuifinder->_forbiddenConcept($concept) == 1)
425 0 0 if (exists do { $hash }->{$concept}{$series}) { }
430 0 0 if ($d > $max_depth)
442 0 0 if (not exists $maximumDepths{$concept}) { }
0 0 elsif ($maximumDepths{$concept} < $d) { }
452 0 0 if ($series =~ /$child/)
453 0 0 if ($child eq $concept)
473 0 0 unless (defined $self and ref $self)
478 0 0 unless (defined $concept)
483 0 0 unless ($errorhandler->_validCui($concept))
504 0 0 if ($option_realtime) { }
526 0 0 unless (defined $self and ref $self)
531 0 0 if ($concept eq $root)
538 0 0 unless ($sdb)
568 0 0 unless (defined $self and ref $self)
573 0 0 unless ($tableFile and $tableName and $tableNameHuman)
579 0 0 unless ($sdb)
586 0 0 if ($count != 0)
608 0 0 unless (defined $self and ref $self)
613 0 0 unless ($tableFile and $tableName and $tableNameHuman)
619 0 0 unless ($sdb)
627 0 0 if ($option_forcerun == 0) { }
632 0 0 if ($answer =~ /(N|n)/)
679 0 0 unless (defined $self and ref $self)
688 0 0 unless ($cuifinder->_checkTableExists($tableName))
712 0 0 unless (defined $self and ref $self)
718 0 0 unless ($sdb)
735 0 0 if ($debug)
754 0 0 unless (defined $self and ref $self)
759 0 0 unless (defined $concept and defined $d and defined $root)
764 0 0 unless ($errorhandler->_validCui($concept))
771 0 0 if ($option_verbose)
772 0 0 unless open TABLEFILE, ">$tableFile"
790 0 0 unless ($sdb)
798 0 0 if ($option_verbose)
815 0 0 unless defined $self and ref $self
821 0 0 unless (defined $self and ref $self)
826 0 0 unless ($concept)
831 0 0 unless ($errorhandler->_validCui($concept))
862 0 0 if ($cuifinder->_forbiddenConcept($concept))
868 0 0 if (exists $visited{$series}) { }
875 0 0 if ($option_debugpath)
881 0 0 if ($concept eq $root)
893 0 0 if ($#{$parents;} < 0)
903 0 0 if ($series =~ /$parent/)
904 0 0 if ($concept eq $parent)
913 0 0 if ($stackflag == 0)
940 0 0 unless (defined $self and ref $self)
945 0 0 unless (defined $concept and defined $d)
950 0 0 unless ($errorhandler->_validCui($concept))
955 0 0 if ($cuifinder->_forbiddenConcept($concept))
959 0 0 unless ($sdb)
974 0 0 if ($option_cuilist) { }
977 0 0 if ($cuifinder->_inCuiList($concept))
989 0 0 if ($option_verbose)
990 0 0 if ($option_cuilist) { }
991 0 0 if ($cuifinder->_inCuiList($concept))
1006 0 0 if ($series =~ /$child/)
1007 0 0 if ($child eq $concept)
1012 0 0 if (defined $leafs)
1013 0 0 if (%{$leafs;})
1017 0 0 if (defined $subsumers)
1018 0 0 if (%{$subsumers;})
1034 0 0 if ($count == 0)
1039 0 0 if ($#{$children;} < 0)
1056 0 0 unless (defined $self and ref $self)
1061 0 0 unless ($cui)
1066 0 0 unless ($errorhandler->_validCui($cui))
1072 0 0 unless ($sdb)
1075 0 0 if ($cuifinder->_inParentTaxonomy($cui))
1078 0 0 if ($option_realtime) { }
1112 0 0 unless (defined $self and ref $self)
1117 0 0 unless ($cui)
1122 0 0 unless ($errorhandler->_validCui($cui))
1128 0 0 unless ($sdb)
1133 0 0 if ($option_realtime) { }
1139 0 0 unless ($sdb)
1148 0 0 if (defined $depth) { }
1198 0 0 unless (defined $self and ref $self)
1203 0 0 unless (defined $concept1)
1206 0 0 unless (defined $concept2)
1211 0 0 unless ($errorhandler->_validCui($concept1))
1214 0 0 unless ($errorhandler->_validCui($concept2))
1219 0 0 if ($option_realtime) { }
1242 0 0 unless (defined $self and ref $self)
1247 0 0 unless (defined $concept1)
1250 0 0 unless (defined $concept2)
1255 0 0 unless ($errorhandler->_validCui($concept1))
1258 0 0 unless ($errorhandler->_validCui($concept2))
1268 0 0 if ($path =~ /C[0-9]+/)
1292 0 0 unless (defined $self and ref $self)
1297 0 0 unless (defined $concept1)
1300 0 0 unless (defined $concept2)
1305 0 0 unless ($errorhandler->_validCui($concept1))
1308 0 0 unless ($errorhandler->_validCui($concept2))
1321 0 0 unless ($rel =~ /(PAR|CHD|RB|RN)/)
1327 0 0 if ($option_realtime) { }
1337 0 0 if ($debug)
1339 0 0 if (defined $hash)
1342 0 0 if ($c =~ /C[0-9]+/)
1366 0 0 unless (defined $self and ref $self)
1371 0 0 unless (defined $concept1)
1374 0 0 unless (defined $concept2)
1379 0 0 unless ($errorhandler->_validCui($concept1))
1382 0 0 unless ($errorhandler->_validCui($concept2))
1417 0 0 if ($childstring =~ /($rel)/ and $flag == 0)
1421 0 0 if ($childstring =~ /($rel)/) { }
1429 0 0 if ($counter == $children) { }
0 0 elsif ($counter == $parent) { }
1460 0 0 unless (defined $self and ref $self)
1465 0 0 unless (defined $arrayref1)
1468 0 0 unless (defined $arrayref2)
1483 0 0 if ($tmpString =~ / $element /)
1505 0 0 unless (defined $self and ref $self)
1510 0 0 unless (defined $concept1)
1513 0 0 unless (defined $concept2)
1518 0 0 unless ($errorhandler->_validCui($concept1))
1521 0 0 unless ($errorhandler->_validCui($concept2))
1533 0 0 if ($length == 2) { }
1543 0 0 if ($split1 == 0)
1580 0 0 unless (defined $self and ref $self)
1585 0 0 unless (defined $paths1)
1588 0 0 unless (defined $paths2)
1613 0 0 if ($c1 eq $c2)
1617 0 0 if (not $option_undirected) { }
1621 0 0 if ($totalchanges > 1)
1622 0 0 if ($dchange1 > 0 and $dchange2 > 0)
1643 0 0 if ($childstring =~ /($rel)/)
1644 0 0 if ($parentstring =~ /($rel)/)
1649 0 0 if ($i == 0)
1650 0 0 if ($childstring =~ /($rel)/)
1655 0 0 if ($cr > 0 and $pr > 0) { }
1662 0 0 if ($previous ne '')
1663 0 0 if ($previous eq 'CHD' and $pr > 0)
1664 0 0 if ($previous eq 'PAR' and $cr > 0)
1668 0 0 if ($pr > 0)
1669 0 0 if ($cr > 0)
1675 0 0 if ($cflag == 1 and $direction >= 1)
1679 0 0 if ($direction > 1)
1720 0 0 unless (defined $self and ref $self)
1725 0 0 unless (defined $start)
1730 0 0 unless ($errorhandler->_validCui($start))
1781 0 0 if ($distance > $length)
1787 0 0 if ($cuifinder->_forbiddenConcept($concept))
1791 0 0 if (exists $visited{$v}) { }
1796 0 0 if ($distance == $length)
1801 0 0 if ($flag == 1) { }
0 0 elsif ($flag == 2) { }
1806 0 0 if (exists do { $ends }->{$element})
1815 0 0 if ($option_debugpath)
1830 0 0 unless ($option_undirected)
1831 0 0 if ($relation eq 'CHD')
1835 0 0 if ($dchange < 2)
1841 0 0 if ($series =~ /$parent/)
1842 0 0 if ($parent eq $concept)
1857 0 0 unless ($option_undirected)
1858 0 0 if ($relation eq 'PAR')
1862 0 0 if ($dchange < 2)
1868 0 0 if ($series =~ /$child/)
1869 0 0 if ($child eq $concept)
1903 0 0 unless (defined $self and ref $self)
1908 0 0 unless (defined $concept)
1912 0 0 unless ($errorhandler->_validCui($concept))
1942 0 0 if ($cuifinder->_forbiddenConcept($cui))
1945 0 0 if (exists $visited{$cui}) { }
1949 0 0 if ($cui eq $concept)
1958 0 0 if ($series =~ /$child/)
1959 0 0 if ($child eq $cui)
1979 0 0 unless defined $self and ref $self
2011 0 0 if ($option_debugpath)
2017 0 0 if ($cuifinder->_forbiddenConcept($cui))
2023 0 0 if (exists $visited{$cui}{$series}) { }
2030 0 0 if ($cui eq $root)
2032 0 0 if ($length > $maximum_path_length)
2042 0 0 if ($#{$parents;} < 0)
2052 0 0 if ($series =~ /$parent/)
2053 0 0 if ($cui eq $parent)
2062 0 0 if ($stackflag == 0)
2079 0 0 unless (defined $self and ref $self)
2109 0 0 unless (defined $self and ref $self)
2119 0 0 if ($cui eq $concept)
2121 0 0 if ($d > 0)
2144 0 0 unless (defined $self and ref $self)
2148 0 0 if ($option_realtime) { }
2163 0 0 if (defined $path) { }
2184 0 0 unless (defined $self and ref $self)
2193 0 0 unless ($sdb)
2210 0 0 unless (defined $self and ref $self)
2214 0 0 unless (defined $concept1)
2217 0 0 unless (defined $concept2)
2222 0 0 unless ($errorhandler->_validCui($concept1))
2225 0 0 unless ($errorhandler->_validCui($concept2))
2234 0 0 unless ($sdb)
2260 0 0 unless (defined $self and ref $self)
2265 0 0 unless (defined $concept1)
2268 0 0 unless (defined $concept2)
2273 0 0 unless ($errorhandler->_validCui($concept1))
2276 0 0 unless ($errorhandler->_validCui($concept2))
2318 0 0 unless (defined $self and ref $self)
2323 0 0 if ($concept1 eq $concept2)
2364 0 0 if ($#stack1 >= 0)
2377 0 0 if ($#stack2 >= 0)
2391 0 0 if ($c1 eq $concept2)
2393 0 0 if ($#stack2 < 0)
2398 0 0 if ($c2 eq $concept1)
2400 0 0 if ($#stack1 < 0)
2404 0 0 if ($path_length1 > -1 and $path_length2 > -1)
2405 0 0 $path_length1 < $path_length2 ? :
2411 0 0 if ($path_length1 > -1 and $path_length1 <= $distance2 + 2)
2412 0 0 if ($path_length2 > -1 and $path_length2 <= $distance1 + 2)
2417 0 0 if (exists $visited1{$c1}) { }
2420 0 0 if (exists $visited2{$c2}) { }
2424 0 0 if ($cui1flag == 0)
2425 0 0 if ($cui2flag == 0)
2428 0 0 if ($cui1flag > 0 and $cuifinder->_forbiddenConcept($c1))
2429 0 0 if ($cui2flag > 0 and $cuifinder->_forbiddenConcept($c2))
2432 0 0 if ($flag1 > 0 and $flag2 > 0)
2440 0 0 unless ($option_undirected)
2441 0 0 if ($relation1 eq 'CHD')
2442 0 0 if ($relation2 eq 'CHD')
2447 0 0 if ($flag1 == 0 and $dchange1 < 2)
2450 0 0 if ($flag2 == 0 and $dchange2 < 2)
2456 0 0 if ($series1 =~ /$parent1/)
2457 0 0 if ($parent1 eq $c1)
2466 0 0 if ($series2 =~ /$parent2/)
2467 0 0 if ($parent2 eq $c2)
2483 0 0 unless ($option_undirected)
2484 0 0 if ($relation1 eq 'PAR')
2485 0 0 if ($relation2 eq 'PAR')
2493 0 0 if ($flag1 == 0 and $dchange1 < 2)
2497 0 0 if ($flag2 == 0 and $dchange2 < 2)
2503 0 0 if ($series1 =~ /$child1/)
2504 0 0 if ($child1 eq $c1)
2515 0 0 if ($series2 =~ /$child2/)
2516 0 0 if ($child2 eq $c2)
2545 0 0 unless (defined $self and ref $self)
2583 0 0 if ($length > 0 and $distance + 2 >= $length)
2588 0 0 if ($concept eq $concept2)
2594 0 0 if (exists $visited{$concept}) { }
2598 0 0 if ($cuifinder->_forbiddenConcept($concept))
2601 0 0 if ($option_debugpath)
2611 0 0 unless ($option_undirected)
2612 0 0 if ($relation eq 'CHD')
2616 0 0 if ($dchange < 2)
2621 0 0 if ($series =~ /$parent/)
2622 0 0 if ($parent eq $concept)
2635 0 0 unless ($option_undirected)
2636 0 0 if ($relation eq 'PAR')
2640 0 0 if ($dchange < 2)
2646 0 0 if ($series =~ /$child/)
2647 0 0 if ($child eq $concept)
2682 0 0 unless (defined $self and ref $self)
2687 0 0 unless (defined $concept1)
2690 0 0 unless (defined $concept2)
2695 0 0 unless ($errorhandler->_validCui($concept1))
2698 0 0 unless ($errorhandler->_validCui($concept2))
2714 0 0 if (defined $lcs)
2730 0 0 if $concept eq $lcs
2735 0 0 if $concept eq $lcs
2741 0 0 if (exists $lcsLengths{$lcs}) { }
2742 0 0 if ($lcsLengths{$lcs} >= $rCount + $lCount - 1)
2758 0 0 unless (scalar keys %lcsPaths)
2766 0 0 if ($prev_len == -1 or $prev_len == $lcsLengths{$lcs}) { }
2768 0 0 if ($#{$pathref;} + 1 == $lcsLengths{$lcs})
2797 0 0 unless (defined $self and ref $self)
2801 0 0 if ($concept1 eq $concept2)
2844 0 0 if ($#stack1 >= 0)
2857 0 0 if ($#stack2 >= 0)
2873 0 0 if ($c1 eq $concept2)
2875 0 0 if ($#stack2 < 0)
2880 0 0 if ($c2 eq $concept1)
2882 0 0 if ($#stack1 < 0)
2886 0 0 if ($path_length1 > -1 and $path_length2 > -1)
2891 0 0 if ($path_length1 > -1 and $path_length1 <= $distance2 + 2)
2892 0 0 if ($path_length2 > -1 and $path_length2 <= $distance1 + 2)
2897 0 0 if (exists $visited1{$c1}) { }
2900 0 0 if (exists $visited2{$c2}) { }
2904 0 0 if ($cui1flag == 0)
2905 0 0 if ($cui2flag == 0)
2908 0 0 if ($cui1flag > 0 and $cuifinder->_forbiddenConcept($c1))
2909 0 0 if ($cui2flag > 0 and $cuifinder->_forbiddenConcept($c2))
2912 0 0 if ($flag1 > 0 and $flag2 > 0)
2915 0 0 if ($flag1 <= 0)
2916 0 0 unless (exists $closerConceptHash{$c1})
2920 0 0 if ($flag2 <= 0)
2921 0 0 unless (exists $closerConceptHash{$c2})
2932 0 0 unless ($option_undirected)
2933 0 0 if ($relation1 eq 'CHD')
2934 0 0 if ($relation2 eq 'CHD')
2939 0 0 if ($flag1 == 0 and $dchange1 < 2)
2942 0 0 if ($flag2 == 0 and $dchange2 < 2)
2948 0 0 if ($series1 =~ /$parent1/)
2949 0 0 if ($parent1 eq $c1)
2958 0 0 if ($series2 =~ /$parent2/)
2959 0 0 if ($parent2 eq $c2)
2975 0 0 unless ($option_undirected)
2976 0 0 if ($relation1 eq 'PAR')
2977 0 0 if ($relation2 eq 'PAR')
2985 0 0 if ($flag1 == 0 and $dchange1 < 2)
2989 0 0 if ($flag2 == 0 and $dchange2 < 2)
2995 0 0 if ($series1 =~ /$child1/)
2996 0 0 if ($child1 eq $c1)
3007 0 0 if ($series2 =~ /$child2/)
3008 0 0 if ($child2 eq $c2)
3018 0 0 if ($path_length1 < 0 and $path_length2 < 0)
3020 0 0 $path_length1 < $path_length2 ? :
3022 0 0 if ($path_length1 < 0)
3023 0 0 if ($path_length2 < 0)
3027 0 0 if ($closerConceptHash{$cui} < $length)