Branch Coverage

blib/lib/Bio/ToolBox/parser/bed.pm
Criterion Covered Total %
branch 75 144 52.0


line true false branch
331 12 8 if (@_)
332 0 12 if (scalar @_ == 1) { }
339 12 0 if (exists $options{'file'} or $options{'table'})
343 4 8 if (exists $options{'do_exon'})
346 0 12 if (exists $options{'do_cds'})
349 0 12 if (exists $options{'do_utr'})
352 0 12 if (exists $options{'do_codon'})
355 0 12 if (exists $options{'source'})
358 8 4 if (exists $options{'class'})
360 8 0 if (eval "require $class; 1") { }
380 20 86 if (@_)
399 8 90 if (@_)
408 0 62 if (@_)
417 0 58 if (@_)
426 0 62 if (@_)
450 0 20 if ($self->{'stream'})
456 0 20 unless ($filename)
464 0 20 unless my $Stream = "Bio::ToolBox::Data::Stream"->new("in", $filename)
467 0 20 unless ($bed)
473 4 16 $Stream->extension =~ /peak/i ? :
474 0 20 $bed == 4 && $Stream->extension =~ /bdg|bedgraph/i ? :
480 4 4 if ($c =~ /^track.+type=gappedpeak/i) { }
0 4 elsif ($c =~ /^track.+type=narrowpeak/i) { }
0 4 elsif ($c =~ /^track.+type=broadpeak/i) { }
0 4 elsif ($c =~ /^track.+type=bedgraph/i) { }
0 4 elsif ($c =~ /^track.+type=bed\s/i) { }
0 4 elsif ($c =~ /^track.+type=(\w+)\s/i) { }
509 4 16 if ($peak == 15) { }
4 12 elsif ($peak == 10) { }
0 12 elsif ($peak == 9) { }
0 12 elsif ($bdg) { }
6 6 elsif ($bed > 6) { }
572 0 8 unless $self->{'stream'}
574 2 6 if ($self->version eq 'bed12') { }
588 0 138 unless ($self->fh)
595 0 124 if ($line =~ /^#/ or $line =~ /^(?:track|browser)/ or not $line =~ /\w+/)
601 0 124 unless ($feature)
619 0 36 unless ($self->fh)
622 0 36 unless ($self->{'eof'})
623 0 0 unless $self->parse_file
630 6 0 unless ($self->{'eof'})
634 6 0 wantarray ? :
642 0 14 unless ($self->fh)
645 0 14 if $self->{'eof'}
657 18 100 unless (exists $self->{'seq_ids'}{$s})
660 56 62 if $feature->end > $self->{'seq_ids'}{$s}
669 0 16 unless (scalar @data == 10)
699 0 0 unless (scalar @data == 9)
728 0 0 unless (scalar @data == 9)
748 0 22 unless (scalar @data == $self->{'bed'})
770 0 70 unless (scalar @data == $self->{'bed'})
828 0 16 unless (scalar @data == 15)
878 0 0 unless (scalar keys %{$$self{"seq_ids"};})
882 0 0 wantarray ? :
888 0 0 unless (scalar keys %{$$self{"seq_ids"};})
896 0 0 unless $self->{'eof'}
899 0 0 unless (exists $self->{'seq_ids'}{$s})
902 0 0 if $_->end > $self->{'seq_ids'}{$s}
908 0 0 unless $self->{'stream'}
918 10 28 unless (exists $self->{'id2seqf'})
919 0 10 unless $self->{'eof'}
923 0 86 if (exists $self->{'id2seqf'}{$name}) { }
934 0 38 if (scalar @_ == 0) { }
6 32 elsif (scalar @_ == 1) { }
950 0 38 unless ($name)
956 38 0 if (exists $self->{'id2seqf'}{lc $name})
964 32 6 if ($id)
966 32 0 if ($g->primary_id eq $id)
972 0 0 if ($chrom and $start and $end)
974 0 0 if ($g->strand == $strand and not $g->start > $end || $g->end < $start)
988 6 0 if (scalar @$genes == 1) { }
0 0 elsif (scalar @$genes > 1) { }