Branch Coverage

blib/lib/obogaf/parser.pm
Criterion Covered Total %
branch 96 102 94.1


line true false branch
31 2 6 unless open FH, '<', "$obofile"
8 0 if ($obofile =~ /.obo$/i)
34 12 263 if $_ =~ /^\s*$/
35 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+)/) { }
44 5 1 if (defined $namespace) { }
52 5 1 if (defined $namespace) { }
66 1 5 unless open FH, '<', $edgesfile
68 1 10 if $_ =~ /^[!,#]|^\s*$/
71 8 2 if ($vals[0] eq $namespace)
74 1 4 unless (exists $checker{$namespace})
83 1 4 unless open FH, '<', $edgesfile
100 0 5 unless $deg{$b} <=> $deg{$a}
105 3 1 if ($len % 2) { }
127 2 8 if ($chdORpar ne 'parents' and $chdORpar ne 'children')
128 2 6 unless open FH, '<', $edgesfile
132 6 6 if ($chdORpar eq 'parents') { }
149 1 4 unless open FH, '<', "$termsfile"
152 2 12 if $_ =~ /^\s*$/
159 1 3 unless open FH, '<', "$obofile"
4 0 if ($obofile =~ /.obo$/i)
161 276 81 unless 1 .. /\[Term\]/
162 3 78 if /^\[Term\]/
170 40 912 if (/^id:\s+($oboterm)/ .. /^$/ || eof FH)
177 1 2 unless (defined $res)
188 1 1 unless open FH, '<:gzip', $annfile
1 3 unless open FH, '<', "$annfile"
2 4 if ($annfile =~ /.gz$/i) { }
190 3 24 if $_ =~ /^[!,#]|^\s*$/
214 2 7 unless open FH, '<', "$obofile"
9 0 if ($obofile =~ /.obo$/i)
217 14 308 if $_ =~ /^\s*$/
218 7 301 if ($_ =~ /^id:\s+(\D+\d+)/)
219 49 259 if ($_ =~ /^alt_id:\s+(\D+\d+)/)
224 1 1 unless open FH, '<:gzip', $annfile
1 4 unless open FH, '<', "$annfile"
2 5 if ($annfile =~ /.gz$/i) { }
227 2 26 if ($_ =~ /^[!,#]|^\s*$/)
228 2 26 if $_ =~ /^[!,#]|^\s*$/
237 8 27 if ($oldclass{$k}) { }
245 8 27 if ($tmp ne 'unseen')
250 0 1 unless open FH, '<:gzip', $annfile
0 4 unless open FH, '<', "$annfile"
1 4 if ($annfile =~ /.gz$/i) { }
253 2 26 if $_ =~ /^[!,#]|^\s*$/
256 16 10 if ($old2new{$oboterm}) { }
265 1 4 if (defined $header)
268 4 1 if (defined $pair)