Branch Coverage

blib/lib/CracTools/Utils.pm
Criterion Covered Total %
branch 40 96 41.6


line true false branch
30 1 0 if (@tab > 0)
46 0 0 if ($v1_nums[$i] >= $v2_nums[$i]) { }
52 0 0 if (scalar @v2_nums > @v1_nums) { }
63 50 0 defined $strand ? :
87 0 1 if @pos_list == 0
92 1 0 if ($length % $Base64_BITNESS > 0)
130 6 30 if ($index[$e] & 1 << $i)
146 0 5 unless defined $file
152 5 0 if (not defined $format) { }
153 2 3 if ($file =~ /\.(fasta|fa)(\.|$)/) { }
3 0 elsif ($file =~ /\.(fastq|fq)(\.|$)/) { }
165 2 3 if ($format eq 'fasta') { }
3 0 elsif ($format eq 'fastq') { }
172 5 2 if (defined $prev_line) { }
192 6 1 if defined $line
193 6 1 if (defined $name) { }
219 2 0 if (defined $entry1 and defined $entry2) { }
230 0 0 if ($format eq 'fasta') { }
0 0 elsif ($format eq 'fastq') { }
265 0 0 unless defined $region
268 0 0 if ($file =~ /\.bam$/) { }
269 0 0 unless open $fh, '-|', "samtools view $file $region"
283 0 0 unless defined $format
289 0 0 unless ($fasta_seq =~ /^>\S+\n\S+/)
293 0 0 if ($format eq 'raw')
308 1 0 if (defined $block_starts)
343 1 0 if ($type =~ /gff3/i) { }
0 0 elsif ($type eq 'gtf' or $type eq 'gff2') { }
374 1 0 defined $alt ? :
376 1 0 defined $info ? :
403 0 0 if (defined $key and defined $val)
470 0 4 unless defined $file
472 3 1 if (not defined $parsing_method and defined $type)
473 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) { }
496 0 4 unless defined $parsing_method
508 0 4 if (defined $skip)
516 4 0 if (defined $header_regex)
525 34 1 if (defined $line) { }
545 0 10 if ($file =~ /\.gz$/) { }
546 0 0 unless open $fh, "gunzip -c $file |"
548 0 10 unless open $fh, "< $file"
557 0 0 if ($file =~ /\.gz$/) { }
558 0 0 unless open $fh, "| gzip > $file"
560 0 0 unless open $fh, "> $file"