Branch Coverage

Bio/OntologyIO/obo.pm
Criterion Covered Total %
branch 91 128 71.0


line true false branch
165 3 0 unless $eng
166 0 3 if ($eng->isa('Bio::Ontology::OntologyI'))
168 0 0 if $eng->can('engine')
172 0 3 if $name
189 3 3 if @_
213 3 0 unless $self->term_factory
247 0 1021 unless ($term->identifier and $term->name)
260 850 187 unless defined $oname and defined $t_ns
261 169 18 if ($oname eq $t_ns)
268 2 1019 if ($new_ontology_flag and $term->namespace)
283 97 893 unless ($self->_has_term($parent_term))
295 130 9 if ($self->_ont_engine->get_relationship_type($relationship)) { }
309 66 175 unless ($self->_has_term($parent_term))
338 3 3 unless exists $self->{'_ontologies'}
341 6 0 if (exists $self->{'_ontologies'})
343 5 1 if ($ont)
382 3 2 unless exists $self->{'_ontologies'}
384 0 5 unless ref $ont and $ont->isa('Bio::Ontology::OntologyI')
388 0 5 unless $ont->name
396 947 237 if $ont and not $term->ontology
461 3 6133 if (defined $value)
506 3 21 unless ($line)
507 0 3 unless ($format_version_header_flag)
517 0 21 if ($line =~ /\[\w*\]/)
526 21 0 if ($line =~ /^(\[|format-version: |data-version: |typeref: |version: |date: |saved-by: |auto-generated-by: |default-namespace: |remark: |subsetdef: |import: |synonymtypedef: |idspace: |default-relationship-id-prefix: |id-mapping: )/x)
544 21 0 if ($line =~ /^([\w\-]+)\:\s*(.*)/)
548 3 18 if ($tag =~ /format-version/) { }
3 15 elsif ($tag =~ /default-namespace/) { }
558 3 18 if ($tag =~ /default-namespace/i)
576 1021 5569 if (not $line and $term)
581 1039 4530 if ($line =~ /^\[(\w+)\]\s*(.*)/)
582 1021 18 if (uc $1 eq 'TERM') { }
18 0 elsif (uc $1 eq 'TYPEDEF') { }
606 86 4444 if not $line =~ /^(\[|id: |is_anonymous: |name: |namespace: |alt_id: |def: |comment: |subset: |synonym: |xref: |is_a: |intersection_of: |union_of: |disjoint_from: |relationship: |is_obsolete: |replaced_by: |consider: |created_by: |creation_date: )/x or $skip_stanza_flag
630 4444 0 if ($line =~ /^([\w\-]+)\:\s*(.*)/)
634 0 4444 unless ($val)
645 1021 3423 if ($tag eq 'ID') { }
1021 2402 elsif ($tag eq 'NAME') { }
0 2402 elsif ($tag eq 'XREF_ANALOG') { }
0 2402 elsif ($tag eq 'XREF_UNKNOWN') { }
10 2392 elsif ($tag eq 'NAMESPACE') { }
575 1817 elsif ($tag eq 'DEF') { }
293 1524 elsif ($tag eq 'SYNONYM') { }
1 1523 elsif ($tag eq 'ALT_ID') { }
6 1517 elsif ($tag =~ /XREF/i) { }
19 1498 elsif ($tag eq 'IS_OBSOLETE') { }
44 1454 elsif ($tag eq 'COMMENT') { }
241 1213 elsif ($tag eq 'RELATIONSHIP') { }
990 223 elsif ($tag eq 'IS_A') { }
647 163 858 if ($self->_has_term($term))
655 0 0 unless ($term->has_dbxref($val))
681 19 0 if ($val eq 'true') { }
0 0 elsif ($val eq 'false') { }
719 0 4444 if ($str =~ /(.*)\s+(\{.*\})\s*$/) { }
722 0 0 if ($extr)
725 0 0 if (/(\w+)=\"(.*)\"/) { }
0 0 elsif (/(\w+)=\'(.*)\'/) { }
750 0 575 if ($prefix)
757 0 575 if ($rem =~ /(\w+)\s+(\[.*)/)
764 575 479 unless $extr
767 479 0 if $extr
794 0 4551 if ($line and not $line =~ /:/)
806 0 241 $parts[1] =~ /\^(w+)\s+\!/ ? :
813 0 575 unless $links