Branch Coverage

blib/lib/Bio/DB/USeq.pm
Criterion Covered Total %
branch 151 328 46.0


line true false branch
890 2 0 if (@_)
891 1 1 if ($_[0] =~ /^-/) { }
901 2 0 if ($file)
902 0 2 unless $self->open($file)
914 0 2 unless ($filename)
918 0 2 unless ($filename =~ /\.useq$/i)
922 0 2 if ($self->slices)
930 0 2 unless ($error == 0)
938 0 2 unless $self->_parse_members
947 0 1 unless $self->{'zip'}
951 0 1 unless ($error == 0)
978 0 8 unless my $seq_id = shift()
979 8 0 if (exists $self->{'seq_ids'}{$seq_id})
990 0 0 unless %{$self->{'metadata'};}
997 0 1 unless $key
998 1 0 unless %{$self->{'metadata'};}
999 1 0 if (exists $self->{'metadata'}{$key})
1019 0 1 unless my $seq_id = shift()
1021 0 1 unless %{$self->{'metadata'};}
1024 0 1 if (exists $self->{'metadata'}{"chromStats_$seq_id"})
1045 1 0 unless $delay_write
1052 0 1 unless my $seq_id = shift()
1058 0 0 unless my $seq_id = shift()
1066 0 0 unless %{$self->{'metadata'};}
1069 0 0 if (exists $self->{'metadata'}{'globalStats'})
1092 0 0 if not defined $min or $stats->{'minVal'} < $min
1093 0 0 if not defined $max or $stats->{'maxVal'} < $max
1132 0 0 unless my $slice = shift()
1138 0 1087 unless my $slice = shift()
1144 0 2020 unless my $slice = shift()
1150 0 4 unless my $slice = shift()
1156 0 1020 unless my $slice = shift()
1162 0 6 unless my $slice = shift()
1168 0 0 unless my $slice = shift()
1191 0 1 unless $self->length($seq_id)
1211 0 2 if (ref $args{'-type'} and ref $args{'-type'} eq 'ARRAY') { }
1220 0 2 if ($type =~ /chromosome/) { }
2 0 elsif ($type =~ /region|interval|observation|coverage|wiggle|summary/) { }
1232 0 0 wantarray ? :
1242 0 2 unless $iterator
1245 0 0 if (exists $args{'-iterator'} and $args{'-iterator'})
1254 2 0 wantarray ? :
1294 0 0 unless @list
1295 0 0 if scalar @list == 1
1297 0 0 if $f->start == $start and $f->end == $end
1313 0 3 unless $self->length($seq_id)
1319 0 3 if (ref $args{'-type'} and ref $args{'-type'} eq 'ARRAY') { }
1343 0 1 unless $self->length($seq_id)
1348 0 1 unless @slices
1363 31 0 if defined $r->[2]
1367 1 0 wantarray ? :
1375 0 0 unless $self->length($seq_id)
1380 0 0 unless @slices
1394 0 0 wantarray ? :
1407 0 1 unless ($readMe)
1416 0 5 if (/^#/)
1417 0 0 unless $_ =~ /validCount/
1420 5 0 if (/^\s*([^=\s]+)\s*=\s*(.+)\s*$/)
1441 2 6 if $member eq 'archiveReadMe.txt'
1448 0 6 unless ($chromo and $strand and defined $start and defined $stop and $number and $extension)
1455 2 4 unless (defined $self->{'stranded'})
1456 1 1 if ($strand eq '.') { }
1467 3 3 if (exists $self->{'seq_ids'}{$chromo}) { }
1468 3 0 if ($stop > $self->{'seq_ids'}{$chromo})
1477 1 0 $strand eq '-' ? :
4 1 $strand eq '.' ? :
1 5 $strand eq '+' ? :
1490 0 2 if (@errors)
1493 0 2 unless (%{$self->{'coord2file'};})
1506 5 0 if ($_[0] =~ /^\-/) { }
1516 0 5 unless ($seq_id)
1530 0 6 unless exists $self->{'coord2file'}{$seq_id}
1534 6 0 if ($strand == 0) { }
1537 1 5 if $self->stranded
1542 0 0 unless $self->stranded
1547 1 5 if ($both) { }
1573 4 1 unless exists $wanted{$_}
1580 1009 7 if exists $self->{'buffer'}{$slice}
1589 0 7 if ($type eq 's') { }
0 7 elsif ($type eq 'sf') { }
0 7 elsif ($type eq 'st') { }
0 7 elsif ($type eq 'ss') { }
6 1 elsif ($type eq 'ssf') { }
0 1 elsif ($type eq 'sst') { }
1 0 elsif ($type eq 'ssft') { }
0 0 elsif ($type eq 'i') { }
0 0 elsif ($type eq 'if') { }
0 0 elsif ($type eq 'it') { }
0 0 elsif ($type eq 'ii') { }
0 0 elsif ($type eq 'iif') { }
0 0 elsif ($type eq 'iit') { }
0 0 elsif ($type eq 'iift') { }
0 0 elsif ($type eq 'is') { }
0 0 elsif ($type eq 'isf') { }
0 0 elsif ($type eq 'ist') { }
0 0 elsif ($type eq 'isft') { }
2127 0 1000 unless @$slices
2133 0 1001 unless $self->slice_type($slice) =~ /f/
2146 1000 0 $count ? :
2152 0 11 unless @$slices
2163 0 12 unless $self->slice_type($slice) =~ /f/
2173 21145 0 if (defined $r->[2])
2177 44 21101 if not defined $min or $r->[2] < $min
2178 144 21001 if not defined $max or $r->[2] > $max
2196 0 1 unless -w $self->zip->fileName
2202 1 0 if exists $md->{'comments'}
2208 5 2 if /useqArchiveVersion|dataType|versionedGenome|comments|chromStats|globalStats/
2215 0 1 if exists $md->{'globalStats'}
2217 1 6 if /chromStats/
2232 0 2 unless $score->{'validCount'}
2238 0 1 unless $score->{'validCount'}
2240 1 0 if ($score->{'validCount'} > 1)
2243 0 1 if $var < 0
2276 0 0 unless exists $self->{'useq'}
2282 0 0 unless exists $self->{'useq'}
2288 0 0 unless exists $self->{'useq'}
2294 0 0 unless exists $self->{'useq'}
2300 0 0 unless exists $self->{'useq'}
2306 0 0 unless exists $self->{'useq'}
2320 1 0 if exists $args{'-useq'}
2367 0 0 wantarray ? :
2410 0 4 unless my $useq = $args{'-useq'}
2425 3 1 if (scalar @slices > 1)
2434 2 2 if ($iterator->type =~ /region|interval|observation/)
2448 1 1 $iterator->type =~ /summary/ ? :
2452 0 2 if ($iterator->strand == 0 and $useq->stranded) { }
2457 0 0 if ($useq->slice_strand($_) == 1) { }
2473 1 1 if ($iterator->type =~ /:(\d+)$/i)
2476 0 1 if $bin > $length
2488 2 8 if ($self->{'wiggle'} == 1) { }
2 6 elsif ($self->{'wiggle'} == 2) { }
2508 2 4 unless ($self->{'current_results'})
2510 0 2 unless $slice
2517 0 291 unless $Bio::DB::USeq::Iterator::a->[0] <=> $Bio::DB::USeq::Iterator::b->[0]
2524 0 6 unless (defined $obs)
2533 5 1 defined $obs->[3] ? :
2550 1 1 unless $slices
2559 1 0 if ($self->{'bin'} and $step > 1) { }
2571 1000 0 if (scalar @$slices > 1) { }
2576 939 1061 if $s > $useq->slice_end($slice)
2577 60 1001 if $e < $useq->slice_start($slice)
2611 0 0 exists $pos2score{$s} ? :
2619 0 1 $strand == -1 ? :
0 1 $strand == 1 ? :
2639 1 1 unless $slices
2657 0 1 $strand == -1 ? :
0 1 $strand == 1 ? :
2671 0 1 unless my $useq = $args{'-useq'}
2680 1 0 wantarray ? :
2707 0 0 if $bins and $bins > 1
2719 0 0 unless defined $s
2722 0 0 if not defined $min or $s < $min
2723 0 0 if not defined $max or $s > $max
2760 0 1 unless my $useq = $args{'-useq'}
2763 1 0 if exists $args{'-slices'}
2764 1 0 if exists $args{'-bin'}
2765 1 0 if exists $args{'-step'}
2775 1 0 if exists $self->{'bin'}
2777 1 0 if exists $self->{'step'}
2781 1 0 if exists $self->{'slices'}
2782 0 1 unless ($slices)
2800 10 0 if (scalar @$slices > 1) { }
2805 0 20 if $s > $useq->slice_end($slice)
2806 9 11 if $e < $useq->slice_start($slice)