Branch Coverage

blib/lib/obogaf/parser.pm
Criterion Covered Total %
branch 83 86 96.5


line true false branch
16 1 6 unless open FH, '<', "$obofile"
7 1 if ($obofile =~ /.obo$/) { }
19 12 263 if $_ =~ /^\s*$/
20 5 258 if ($_ =~ /^namespace:\s+(\D+)/) { }
6 252 elsif ($_ =~ /^name:\s+(.+)/) { }
6 246 elsif ($_ =~ /^id:\s+(\D+\d+)/) { }
6 240 elsif ($_ =~ /^is_a:\s+(\D+\d+)/) { }
6 234 elsif ($_ =~ /^relationship: part_of\s+(\D+\d+)/) { }
29 5 1 if (defined $namespace) { }
37 5 1 if (defined $namespace) { }
51 1 5 unless open FH, '<', $edgesfile
53 1 10 if $_ =~ /^[!,#]|^\s*$/
56 8 2 if ($vals[0] eq $namespace)
59 1 4 unless (exists $checker{$namespace})
68 1 4 unless open FH, '<', $edgesfile
85 0 6 unless $deg{$b} <=> $deg{$a}
90 3 1 if ($len % 2) { }
112 2 8 if ($chdORpar ne 'parents' and $chdORpar ne 'children')
113 2 6 unless open FH, '<', $edgesfile
117 6 6 if ($chdORpar eq 'parents') { }
132 2 4 if ($annfile =~ /.gz$/) { }
133 1 1 unless open FH, '<:gzip', $annfile
135 1 3 unless open FH, '<', "$annfile"
138 3 24 if $_ =~ /^[!,#]|^\s*$/
162 1 7 unless open FH, '<', "$obofile"
8 1 if ($obofile =~ /.obo$/) { }
165 14 308 if $_ =~ /^\s*$/
166 7 301 if ($_ =~ /^id:\s+(\D+\d+)/)
167 49 259 if ($_ =~ /^alt_id:\s+(\D+\d+)/)
172 2 5 if ($annfile =~ /.gz$/) { }
173 1 1 unless open FH, '<:gzip', $annfile
175 1 4 unless open FH, '<', "$annfile"
179 2 26 if ($_ =~ /^[!,#]|^\s*$/)
180 2 26 if $_ =~ /^[!,#]|^\s*$/
189 8 27 if ($oldclass{$k}) { }
197 8 27 if ($tmp ne 'unseen')
202 1 4 if ($annfile =~ /.gz$/) { }
203 0 1 unless open FH, '<:gzip', $annfile
205 0 4 unless open FH, '<', "$annfile"
209 2 26 if $_ =~ /^[!,#]|^\s*$/
212 16 10 if ($old2new{$oboterm}) { }
221 1 4 if (defined $header)
224 4 1 if (defined $pair)