Branch Coverage

Bio/DB/GFF.pm
Criterion Covered Total %
branch 198 362 54.7


line true false branch
719 0 5 if (@_ == 1) { }
733 3 2 unless ($class->can('new'))
734 0 3 unless eval "require $class;1;"
738 0 5 if defined $preferred_groups
743 0 5 if defined $preferred_groups
753 0 5 unless defined $aggregators
754 5 0 ref $aggregators eq 'ARRAY' ? :
815 0 25 if defined $types
969 0 195 if $self->absolute
978 8 195 if (@args == 0) { }
195 0 elsif (@args == 1) { }
0 0 elsif (wantarray) { }
1002 68 156 if defined $_[0] and $_[0] =~ /^-/
1003 85 71 if @_ == 3
1004 35 36 if @_ == 2
1005 33 3 if @_ == 1
1071 10 5 if (defined $_[0] and $_[0] =~ /^-/) { }
1089 10 5 unless defined $automerge
1091 0 15 $refseq ? :
1130 0 0 !defined($_[0]) || $_[0] =~ /^-/ ? :
1174 0 16 if (@_ == 1) { }
1184 16 0 unless defined $automerge
1188 16 0 if ($automerge)
1190 33 0 if $a->disaggregate([], $self)
1197 0 16 if defined $ref
1200 0 16 if $self->debug
1202 0 33 unless $a->aggregate($features, $self)
1247 0 5 ref $_[0] ? :
1251 5 0 if ($self->automerge)
1253 10 0 if $a->disaggregate([], $self)
1262 0 5 if $self->debug
1264 0 10 unless $a->aggregate($features, $self)
1289 0 5 ref $_[0] eq 'ARRAY' ? :
1294 0 5 wantarray ? :
1317 0 0 ref $_[0] eq 'ARRAY' ? :
1322 0 0 wantarray ? :
1349 0 0 UNIVERSAL::isa($_, 'Bio::DB::GFF::Feature') ? :
1350 0 0 unless @ids
1377 0 75 UNIVERSAL::isa($_, 'Bio::DB::GFF::Feature') ? :
1378 0 20 unless @ids
1406 0 25 UNIVERSAL::isa($_, 'Bio::DB::GFF::Feature') ? :
1407 0 5 unless @ids
1483 21 0 unless defined $offset
1484 21 0 unless defined $start
1485 0 21 if not defined $end and $length
1494 0 21 unless $valid_range_types{lc $range_type}
1498 10 11 if (defined $name and $name ne '')
1500 10 0 if defined $start
1501 0 10 if defined $end
1503 5 5 unless @segments
1535 0 195 if @_
1562 10 160 if @_
1637 0 0 ref $ids[0] ? :
1657 0 0 ref $ids[0] ? :
1686 0 0 ref $ids[0] ? :
1713 0 0 if defined $automerge
1714 0 0 if defined $iterator
1750 0 5 unless $self->do_initialize($erase)
1756 0 0 unless $i % 2
1837 0 5 if ref $file_or_directory and tied *$file_or_directory
1841 5 0 unless $tied_stdin
1842 0 5 unless local(@ARGV) = $self->setup_argv($file_or_directory, 'gff', 'gff3')
1844 5 0 unless $tied_stdin
1868 0 0 unless my $fh = 'IO::File'->new($file)
1933 0 5 if ref $file_or_directory and tied *$file_or_directory
1937 5 0 unless $tied
1938 0 5 unless local(@ARGV) = $self->setup_argv($file_or_directory, 'fa', 'dna', 'fasta')
1940 5 0 unless $tied
1963 0 0 unless my $fh = 'IO::File'->new($file)
1983 0 0 unless $self->insert_sequence_chunk($acc, \$offset, \$seq)
1984 0 0 unless $self->insert_sequence($acc, $offset, $seq)
1996 5 5 if (-d $file_or_directory) { }
0 5 elsif (my $fd = fileno $file_or_directory) { }
0 5 elsif (ref $file_or_directory) { }
1998 0 5 if $^O =~ /^MSWin/i and eval 'use Win32; 1'
2002 0 0 unless open STDIN, "<&=$fd"
2011 0 45 if (/\.gz$/) { }
0 45 elsif (/\.Z$/) { }
0 45 elsif (/\.bz2$/) { }
2040 0 0 if @_
2108 8 0 if @_
2129 5 211 if @_
2152 5 106 if @_
2196 0 20 unless my(@result) = $self->do_attributes(@_)
2197 10 10 if wantarray
2200 5 5 if $tag
2233 0 0 if @_
2262 5 15 if (ref $aggregator) { }
0 15 elsif ($aggregator =~ m[^(\w+)\{([^/\}]+)/?(.*)\}$]) { }
2272 0 0 if ($mainpart)
2276 0 0 if $self->debug
2282 0 15 unless eval "require $class; 1"
2305 0 106 if (@_)
2309 0 106 unless $d
2343 5 10 if (@_)
2344 5 0 ref $_ eq 'ARRAY' ? :
2348 5 10 unless $d
2355 139 5 if exists $self->{'preferred_groups_hash'}
2361 0 5 unless (@preferred)
2362 0 0 $gff3 || $self->{'load_data'}{'gff3_flag'} ? :
2454 0 5 -t STDERR && !$ENV{'EMACS'} ? :
2463 214 0 if ($mode eq 'gff') { }
0 0 elsif ($mode eq 'fasta') { }
2464 0 214 if (/^>/) { }
2473 0 0 if (/^##|\t/) { }
2493 2 212 if $line =~ /^\#\#\s*gff-version\s+3/
2495 2 212 if (defined $self->{'load_data'}{'gff3_flag'} and not defined $self->{'load_data'}{'gff3_warning'})
2500 0 214 if $line =~ /^\#\#\s*group-tags?\s+(.+)/
2502 10 204 if ($line =~ /^\#\#\s*sequence-region\s+(\S+)\s+(-?\d+)\s+(-?\d+)/i)
2524 14 190 if /^#/
2527 0 165 unless defined $ref and defined $method and defined $start and defined $stop
2529 340 155 if $$_ eq '.'
2539 0 165 if ($start > $stop)
2541 0 0 if ($strand eq '+') { }
0 0 elsif ($strand eq '-') { }
2548 165 0 unless ref $gclass
2549 165 0 unless ref $gname
2580 5 5 if defined $ld->{'id'}
2589 2620 30330 if (/^>(\S+)/) { }
2590 2615 5 if defined $ld->{'id'}
2595 0 2620 if $self->{'__verbose__'} and $ld->{'count'} % 1000 == 0
2622 0 5 -t STDERR && !$ENV{'EMACS'} ? :
2638 0 30330 if (my $cs = $self->dna_chunk_size)
2663 0 335 unless ref $self
2665 5 330 if @_
2830 75 10 unless defined $automerge
2834 0 85 unless $valid_range_types{lc $range_type}
3243 15 829 unless $srcseq
3247 829 0 if (defined $group_class and defined $group_name)
3250 559 270 if ($group_hash) { }
3264 505 324 if (ref $parent) { }
3284 0 15 if $feature and not $feature->group
3291 10 0 if (@$accumulated_features and !defined($feature) || $accumulated_features->[-1]->group ne $feature->group)
3294 0 30 unless $a->aggregate($accumulated_features, $self)
3297 5 5 $feature ? :
3298 0 10 unless @result
3328 0 168 unless ref $types and @$types
3333 1432 0 $method ? :
3334 0 1432 $source ? :
3338 153 15 if $self->{'match_subs'}{$expr}
3346 0 15 if $self->debug
3349 0 15 if $@
3381 162 433 if defined $start and length $start
3470 0 100 if defined $search->{'start'} and $search->{'start'} > $search->{'stop'}
3471 0 100 if exists $search->{'seq_id'}
3478 85 15 if ($options->{'automerge'})
3480 15 160 if $options->{'iterator'}
3481 110 65 if $a->disaggregate(\@aggregated_types, $self)
3486 15 85 if ($options->{'iterator'})
3489 5 10 $options->{'automerge'} ? :
3507 80 5 if ($options->{'automerge'})
3508 0 80 if $self->debug
3510 0 95 if $self->debug
3564 66 99 if ($gff3) { }
3598 0 138 unless defined $value
3599 24 114 if ($value =~ /^\"(.+)\"$/)
3610 0 138 if ($tag eq 'tstart' and $target_found) { }
0 138 elsif ($tag eq 'tend' and $target_found) { }
12 126 elsif (ucfirst $tag eq 'Note') { }
21 105 elsif ($tag eq 'Target' and /([^:\"\s]+):([^\"\s]+)/) { }
0 105 elsif (not defined $value) { }
3638 78 21 if (@attributes and not $gclass && $gname)
3640 78 0 ref $self ? :
3647 90 15 if not $gclass or ($$preferred{lc $gclass} || 0) < ($$preferred{lc $c} || 0)
3678 5 66 if @_
3702 0 92 if ($tag eq 'Parent') { }
52 40 elsif ($tag eq 'ID' or $tag eq 'Name') { }
14 26 elsif ($tag eq 'Target') { }
0 26 elsif ($tag =~ /synonym/i) { }
3709 0 0 @names > 1 ? :
3728 66 0 unless (defined $gname)
3735 66 0 if defined $gname
3744 0 66 unless $self->gff3_name_munging
3746 66 0 if ($name =~ /^(\w+):(.+)/) { }
3840 0 0 unless $next
3841 0 0 ref $next eq 'ARRAY' ? :
3844 0 0 $self->{'type'} eq 'group' ? :
0 0 $self->{'type'} eq 'feature' ? :
0 0 $self->{'type'} eq 'name' ? :
3846 0 0 unless $segment
3859 0 0 unless @$self