Branch Coverage

blib/lib/Bio/ToolBox/Data/Feature.pm
Criterion Covered Total %
branch 101 432 23.3


line true false branch
1017 0 0 unless defined $column
1023 0 28 if @_
1029 0 65 if @_
1035 0 0 if @_
1036 0 0 if (exists $self->{'data'}{'line_count'}) { }
0 0 elsif (exists $self->{'data'}{'header_line_count'}) { }
1049 0 196 if @_
1052 118 78 wantarray ? :
1057 0 390 unless defined $column
1060 83 307 if (defined $value)
1065 389 1 CORE::length $v ? :
1070 1 20 if ($_[0])
1073 1 0 if (defined $i) { }
0 0 elsif (exists $self->{'feature'}) { }
1085 0 20 if (exists $self->{'feature'})
1091 20 0 defined $i ? :
1097 5 104 if ($_[0])
1100 5 0 $_[0] =~ /^\d+$/ ? :
1101 1 4 if (defined $i and $d) { }
0 4 elsif (not $d) { }
4 0 elsif (exists $self->{'feature'}) { }
1102 1 0 if (substr($self->{'data'}->name($i), -1) eq '0') { }
1122 12 96 if (exists $self->{'feature'})
1127 96 0 if (defined $i)
1129 17 79 if (substr($self->{'data'}->name($i), -1) eq '0') { }
1143 1 27 if ($_[0])
1146 1 0 $_[0] =~ /^\d+$/ ? :
1147 1 0 if (defined $i and $d) { }
0 0 elsif (not $d) { }
0 0 elsif (exists $self->{'feature'}) { }
1161 0 27 if (exists $self->{'feature'})
1168 27 0 defined $i ? :
1175 1 24 if ($_[0])
1178 0 1 if (defined $i) { }
0 1 elsif (exists $self->{'feature'}) { }
1190 4 21 if (exists $self->{'feature'})
1196 18 3 defined $i ? :
1202 0 18 if ($str eq '1' or $str eq '-1' or $str eq '0') { }
0 18 elsif ($str eq '+') { }
18 0 elsif ($str eq '-') { }
0 0 elsif ($str eq '.') { }
0 0 elsif ($str eq '2') { }
0 0 elsif ($str eq '*') { }
1230 1 74 if ($_[0])
1233 1 0 if (defined $i) { }
0 0 elsif (exists $self->{'feature'}) { }
1244 4 70 if (exists $self->{'feature'})
1249 70 0 if (defined $i) { }
0 0 elsif (my $att = $self->gff_attributes) { }
1260 0 3 if @_
1266 0 0 exists $self->{'feature'} ? :
3 0 defined $start_i ? :
1268 3 0 if $end
1269 3 0 CORE::length $coord > 2 ? :
1274 1 8 if ($_[0])
1277 0 1 if (defined $i) { }
0 1 elsif (exists $self->{'feature'}) { }
1289 0 9 if (defined $i)
1293 4 5 if (exists $self->{'feature'})
1297 5 0 if ($self->{'data'}->feature)
1306 0 65 if @_
1308 65 0 if defined $i
1309 65 0 if (defined $v and $v ne '.')
1312 0 0 if exists $self->{'feature'}
1313 0 0 if (my $att = $self->gff_attributes)
1321 0 0 if @_
1322 0 0 if ($self->{'data'}->vcf)
1328 0 0 if (defined $s and defined $e) { }
0 0 elsif (defined $s) { }
1342 0 0 defined $c ? :
1347 0 0 if $self->{'data'}->gff
1348 0 0 if $self->{'data'}->vcf
1354 0 0 unless $self->{'data'}->gff
1355 0 0 if exists $self->{'attributes'}
1359 0 0 unless $tag and $value
1370 0 0 unless $self->{'data'}->vcf
1371 0 0 if exists $self->{'attributes'}
1376 0 0 if ($self->{'data'}->name(7) eq 'INFO')
1377 0 0 defined $_->[1] ? :
1386 0 0 if ($self->{'data'}->number_columns > 8)
1392 0 0 defined $sampleVals[$_] ? :
1403 0 0 if $self->{'data'}->gff
1404 0 0 if $self->{'data'}->vcf
1410 0 0 unless $self->{'data'}->gff
1411 0 0 unless exists $self->{'attributes'}
1413 0 0 if (exists $self->{'attributes'}{'ID'})
1417 0 0 if (exists $self->{'attributes'}{'Name'})
1423 0 0 if $key eq 'ID'
1424 0 0 if $key eq 'Name'
1436 0 0 unless $self->{'data'}->vcf
1437 0 0 unless exists $self->{'attributes'}
1443 0 0 defined $self->{'attributes'}{'INFO'}{$_} ? :
1453 0 0 if exists $self->{'attributes'}{'9'}{'GT'}
1455 0 0 if $key eq 'GT'
1458 0 0 if (@order) { }
1467 0 0 if (@order) { }
1485 0 9 if @_
1486 0 9 if exists $self->{'feature'}
1489 9 0 unless $self->feature_type eq 'named' or $force
1493 0 0 if ($f)
1499 0 0 unless $self->{'data'}->database
1506 0 0 unless $f
1513 0 1 if @_
1514 0 1 unless $self->{'data'}->database
1515 1 0 if ($self->feature_type eq 'coordinate') { }
0 0 elsif ($self->feature_type eq 'named') { }
1520 1 0 $db ? :
1524 0 0 $f ? :
1535 0 0 unless defined $db
1536 0 0 unless $db->can('features')
1556 0 0 if ($self->feature_type eq 'named' and $args{'subfeature'})
1566 0 0 if (exists $args{'strand'})
1568 0 0 $args{'strand'} =~ /\-|r/i ? :
1570 0 0 if (exists $args{'extend'} and $args{'extend'})
1572 0 0 if $start <= 0
1575 0 0 unless defined $seqid and defined $start and defined $stop
1579 0 0 if ($strand == -1)
1591 0 0 unless (@$subfeatures)
1602 0 0 unless $Bio::ToolBox::Data::Feature::a->[1] <=> $Bio::ToolBox::Data::Feature::b->[1]
1614 0 0 if ($self->strand == -1)
1626 0 0 unless ($GENETOOL_LOADED)
1629 0 0 if ($@) { }
1639 0 0 unless $feature
1643 0 0 if ($subf eq 'exon') { }
0 0 elsif ($subf eq 'cds') { }
0 0 elsif ($subf eq '5p_utr') { }
0 0 elsif ($subf eq '3p_utr') { }
0 0 elsif ($subf eq 'intron') { }
1672 0 7 unless ($args{'dataset'})
1678 0 0 if ($self->feature_type eq 'named' and $args{'subfeature'})
1687 7 0 if ($self->feature_type eq 'coordinate') { }
0 0 elsif ($self->feature_type eq 'named') { }
1693 0 7 exists $args{'strand'} && defined $args{'strand'} ? :
1698 0 0 unless $f
1703 0 0 exists $args{'strand'} && defined $args{'strand'} ? :
1710 0 0 if (exists $args{'extend'} and $args{'extend'})
1716 0 7 if $params[1] <= 0
1717 0 7 if ($params[2] < $params[1])
1719 0 0 if $params[2] <= 0
1725 0 7 unless $params[0] and defined $params[1]
1745 0 0 unless (@$subfeatures)
1749 0 0 if exists $args->{'exon'}
1760 0 0 defined $args->{'strand'} ? :
1768 0 0 if defined $exon_scores
1782 0 1 unless ($args{'dataset'})
1792 0 1 unless ($args{'extend'})
1795 0 1 unless $args{'db'} or $self->{'data'}->open_meta_database
1798 1 0 unless defined $args{'coordinate'}
1804 0 1 if $params[1] < 1
1806 0 1 defined $args{'strand'} ? :
1817 0 1 if ($args{'avoid'})
1822 0 1 if ($args{'absolute'}) { }
1824 0 0 wantarray ? :
1840 0 4 unless ($args{'dataset'})
1849 0 4 unless $args{'db'} or $self->{'data'}->open_meta_database
1853 0 0 if ($self->feature_type eq 'named' and $args{'subfeature'})
1865 0 4 defined $args{'strand'} ? :
1866 0 4 if ($args{'extend'})
1869 0 0 if $params[1] < 1
1881 0 4 if ($args{'avoid'})
1886 0 4 if ($args{'absolute'}) { }
1888 0 0 wantarray ? :
1892 4 0 unless defined $args{'coordinate'}
1903 0 0 unless (@$subfeatures)
1907 0 0 if exists $args->{'exon'}
1925 0 0 defined $args->{'strand'} ? :
1952 0 0 if ($args->{'extend'})
1984 0 0 if ($args->{'absolute'}) { }
1986 0 0 wantarray ? :
2002 0 5 defined $args->{'strand'} ? :
2003 0 5 if ($args->{'position'} == 5 and $strand >= 0) { }
0 5 elsif ($args->{'position'} == 3 and $strand >= 0) { }
5 0 elsif ($args->{'position'} == 5 and $strand < 0) { }
0 0 elsif ($args->{'position'} == 3 and $strand < 0) { }
0 0 elsif ($args->{'position'} == 4) { }
2029 0 0 if (ref $args->{'avoid'} eq 'ARRAY') { }
0 0 elsif ($args->{'avoid'} eq '1') { }
0 0 elsif ($args->{'avoid'} =~ /w+/i) { }
2034 0 0 if (defined $args->{'type'}) { }
2058 0 0 if (@overlap_features)
2067 0 0 if $feat->primary_id eq $primary
2074 0 0 if ($position >= $start and $position <= $stop)
2089 0 5 if ($strand >= 0) { }
5 0 elsif ($strand < 0) { }
2099 5 0 wantarray ? :
2107 0 0 if ($method eq 'ncount') { }
2110 0 0 unless $p >= $start and $p <= $end
2112 0 0 if (exists $namecheck->{$n}) { }
2128 0 0 unless $p >= $start and $p <= $end
2143 0 0 unless ($args{'db'})
2146 0 0 unless ($args{'data'} and ref $args{'data'} eq 'HASH')
2149 0 0 unless ($args{'callback'})
2155 0 0 if ($self->feature_type eq 'named' and $args{'subfeature'}) { }
2160 0 0 if (@$subfeatures) { }
2187 0 0 unless defined $tid
2216 0 0 unless $args{'bed'} =~ /^\d+$/
2217 0 0 unless $args{'bed'} >= 3
2225 0 0 if ($chr eq '.' or not CORE::length $chr or $start eq '.' or not CORE::length $start)
2233 0 0 if ($args{'bed'} >= 4)
2237 0 0 if ($args{'bed'} >= 5)
2238 0 0 exists $args{'score'} ? :
2239 0 0 unless defined $score
2242 0 0 if ($args{'bed'} >= 6)
2244 0 0 if (exists $args{'strand'} and defined $args{'strand'}) { }
2250 0 0 $s == -1 ? :
2269 0 0 if ($chr eq '.' or not CORE::length $chr or $start eq '.' or not CORE::length $start)
2274 0 0 if (exists $args{'strand'} and defined $args{'strand'}) { }
2280 0 0 $strand == 1 ? :
0 0 $strand == -1 ? :
2285 0 0 if (defined $type and $type =~ /:/)
2288 0 0 unless ($source)
2291 0 0 unless ($primary_tag)
2292 0 0 $args{'primary_tag'} || defined $type ? :
2296 0 0 exists $args{'score'} ? :
2297 0 0 unless defined $score
2305 0 0 if (exists $args{'attributes'} and ref $args{'attributes'} eq 'ARRAY')