Branch Coverage

blib/lib/CracTools/Utils.pm
Criterion Covered Total %
branch 33 84 39.2


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) { }
81 0 5 unless defined $file
87 5 0 if (not defined $format) { }
88 2 3 if ($file =~ /\.(fasta|fa)(\.|$)/) { }
3 0 elsif ($file =~ /\.(fastq|fq)(\.|$)/) { }
100 2 3 if ($format eq 'fasta') { }
3 0 elsif ($format eq 'fastq') { }
107 5 2 if (defined $prev_line) { }
127 6 1 if defined $line
128 6 1 if (defined $name) { }
154 2 0 if (defined $entry1 and defined $entry2) { }
165 0 0 if ($format eq 'fasta') { }
0 0 elsif ($format eq 'fastq') { }
200 0 0 unless defined $region
203 0 0 if ($file =~ /\.bam$/) { }
204 0 0 unless open $fh, '-|', "samtools view $file $region"
218 0 0 unless defined $format
224 0 0 unless ($fasta_seq =~ /^>\S+\n\S+/)
228 0 0 if ($format eq 'raw')
243 1 0 if (defined $block_starts)
278 1 0 if ($type =~ /gff3/i) { }
0 0 elsif ($type eq 'gtf' or $type eq 'gff2') { }
341 0 0 if (defined $key and defined $val)
397 0 5 unless defined $file
399 3 2 if (not defined $parsing_method and defined $type)
400 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) { }
423 0 5 unless defined $parsing_method
435 0 5 if (defined $skip)
443 5 0 if (defined $header_regex)
452 37 2 if (defined $line) { }
471 0 11 if ($file =~ /\.gz$/) { }
472 0 0 unless open $fh, "gunzip -c $file |"
474 0 11 unless open $fh, "< $file"
483 0 0 if ($file =~ /\.gz$/) { }
484 0 0 unless open $fh, "| gzip > $file"
486 0 0 unless open $fh, "> $file"