Branch Coverage

blib/lib/CracTools/Utils.pm
Criterion Covered Total %
branch 41 98 41.8


line true false branch
31 1 0 if (@tab > 0)
47 0 0 if ($v1_nums[$i] >= $v2_nums[$i]) { }
53 0 0 if (scalar @v2_nums > @v1_nums) { }
64 50 0 defined $strand ? :
88 0 1 if @pos_list == 0
93 1 0 if ($length % $Base64_BITNESS > 0)
131 6 30 if ($index[$e] & 1 << $i)
147 0 5 unless defined $file
153 5 0 if (not defined $format) { }
154 2 3 if ($file =~ /\.(fasta|fa)(\.|$)/) { }
3 0 elsif ($file =~ /\.(fastq|fq)(\.|$)/) { }
166 2 3 if ($format eq 'fasta') { }
3 0 elsif ($format eq 'fastq') { }
173 5 2 if (defined $prev_line) { }
193 6 1 if defined $line
194 6 1 if (defined $name) { }
220 2 0 if (defined $entry1 and defined $entry2) { }
231 0 0 if ($format eq 'fasta') { }
0 0 elsif ($format eq 'fastq') { }
266 0 0 unless defined $region
269 0 0 if ($file =~ /\.bam$/) { }
270 0 0 unless open $fh, '-|', "samtools view $file $region"
284 0 0 unless defined $format
290 0 0 unless ($fasta_seq =~ /^>\S+\n\S+/)
294 0 0 if ($format eq 'raw')
309 1 0 if (defined $block_starts)
344 1 0 if ($type =~ /gff3/i) { }
0 0 elsif ($type eq 'gtf' or $type eq 'gff2') { }
356 4 0 if (defined $k and defined $v)
377 1 0 defined $alt ? :
379 1 0 defined $info ? :
406 0 0 if (defined $key and defined $val)
473 0 4 unless defined $file
475 3 1 if (not defined $parsing_method and defined $type)
476 1 2 if ($type =~ /gff3/i or $type eq 'gtf' or $type eq 'gff2') { }
1 1 elsif ($type =~ /bed/i) { }
1 0 elsif ($type =~ /vcf/i) { }
0 0 elsif ($type =~ /chimCT/i) { }
0 0 elsif ($type =~ /SAM/i or $type =~ /BAM/i) { }
499 0 4 unless defined $parsing_method
511 0 4 if (defined $skip)
519 4 0 if (defined $header_regex)
528 34 1 if (defined $line) { }
548 0 10 if ($file =~ /\.gz$/) { }
549 0 0 unless open $fh, "gunzip -c $file |"
551 0 10 unless open $fh, "< $file"
560 0 0 if ($file =~ /\.gz$/) { }
561 0 0 unless open $fh, "| gzip > $file"
563 0 0 unless open $fh, "> $file"