Branch Coverage

lib/App/Sandy/Simulator.pm
Criterion Covered Total %
branch 75 194 38.6


line true false branch
210 0 20 if ($self->seqid_weight eq "count" and not defined $self->expression_matrix)
216 0 20 if ($self->count_loops_by eq 'coverage' and not defined $self->coverage) { }
0 40 elsif ($self->count_loops_by eq 'number_of_reads' and not defined $self->number_of_reads) { }
234 0 20 if ($self->strand_bias eq 'plus') { }
0 20 elsif ($self->strand_bias eq 'minus') { }
20 0 elsif ($self->strand_bias eq 'random') { }
264 0 860 if /^;/u
265 100 760 if (/^>/u) { }
281 0 100 if (defined $fields[1])
287 0 760 unless defined $id
297 0 20 unless (%indexed_fasta)
302 0 20 unless $fh->close
304 0 20 if %fasta_rtree
320 20 0 unless ($self->truncate)
325 50 50 if ($class eq 'App::Sandy::Seq::SingleEnd') { }
50 0 elsif ($class eq 'App::Sandy::Seq::PairedEnd') { }
327 0 50 if ($index_size < $read_mean)
334 0 50 if ($index_size < $fragment_mean)
345 0 20 unless (%$indexed_fasta)
350 0 20 unless ($self->_has_no_fasta_rtree)
352 0 0 if @blacklist
362 0 20 unless ($self->_has_no_fasta_rtree)
399 0 0 unless ($init)
405 0 0 if ($en < $pos - 1)
415 0 100 if ($init)
420 50 50 $class eq 'App::Sandy::Seq::SingleEnd' ? :
424 0 100 if ($len > $seq_len - $read_len) { }
433 0 20 unless (%$indexed_fasta)
438 0 20 unless ($self->_has_no_fasta_rtree)
440 0 0 if @blacklist_id
461 0 20 if ($self->seqid_weight eq 'same') { }
0 20 elsif ($self->seqid_weight eq 'count') { }
20 0 elsif ($self->seqid_weight eq 'length') { }
469 0 0 if ($weights->[$i] > 1)
487 0 0 unless (exists $piece_table->{$id} or $self->_exists_fasta_tree($id))
494 0 0 unless (%$indexed_file)
505 0 0 if (exists $piece_table->{$seq_id}) { }
512 0 0 unless (@$ids)
539 0 0 if (%ptable_ind)
590 0 0 unless (@$keys and @$weights)
638 0 20 if ($min <= 0)
642 0 20 $min < 1 ? :
666 100 0 scalar keys %$type_h == 1 ? :
689 0 20 if ($self->genomic_variation)
707 0 20 if (defined $genomic_variation)
730 0 100 if (defined $indexed_snv and defined $indexed_snv->{$std_seq_id})
736 0 0 if (@snvs_homo)
767 100 0 unless ($self->truncate)
770 50 50 if ($class eq 'App::Sandy::Seq::SingleEnd') { }
50 0 elsif ($class eq 'App::Sandy::Seq::PairedEnd') { }
771 0 50 if ($new_size < $self->seq->read_mean)
776 0 50 if ($new_size < $self->seq->fragment_mean)
792 100 0 if (%$type_h) { }
801 0 20 unless (%piece_table)
807 0 20 unless ($self->_has_no_fasta_rtree)
809 0 0 if @blacklist
828 0 0 defined $snv->{'id'} && $snv->{'id'} ne '.' ? :
831 0 0 if ($snv->{'ref'} eq '-') { }
0 0 elsif ($snv->{'alt'} eq '-') { }
855 0 0 unless (defined $seq_id and exists $indexed_fasta->{$seq_id})
867 0 0 if ($snv->{'ref'} eq '-' and $snv->{'pos'} > $size or $snv->{'ref'} ne '-' and $snv->{'pos'} >= $size) { }
0 0 elsif ($snv->{'ref'} ne '-') { }
877 0 0 if (uc $ref ne uc $snv->{'ref'})
889 0 0 if (@saved_snvs)
899 8 0 if ($self->count_loops_by eq 'coverage') { }
0 0 elsif ($self->count_loops_by eq 'number-of-reads') { }
907 3 5 if ref $self->seq eq "App::Sandy::Seq::PairedEnd"
917 0 8 if ($number_of_reads <= 0)
927 0 0 if $self->_has_no_fasta_rtree
933 0 0 if defined $pid
1000 0 8 if ($output_format =~ /(sam|bam)/u) { }
8 0 elsif ($output_format =~ /fastq/u) { }
1003 5 3 if ($seq_class eq 'App::Sandy::Seq::SingleEnd') { }
3 0 elsif ($seq_class eq 'App::Sandy::Seq::PairedEnd') { }
1007 0 3 if $self->join_paired_ends
1011 0 8 if ($output_format eq "fastq.gz")
1050 0 8 $number_of_jobs == 1 ? :
1060 10 4 if my $pid = $pm->start
1081 2 2 if $tid == $number_of_jobs
1093 4 0 if ($output_format =~ /^(sam|fastq)$/u) { }
0 0 elsif ($output_format eq 'fastq.gz') { }
0 0 elsif ($output_format eq 'bam') { }
1107 0 4 if ($seq_class eq "App::Sandy::Seq::PairedEnd" and $file_class =~ /(sam|bam|join)/u)
1117 0 4 if ($output_format =~ /^(sam|bam)$/u and $tid == 1)
1134 6840 0 unless (@_)
1155 0 4 if ($output_format eq "bam" and $tid == $number_of_jobs)
1169 0 4 if ($sig->signal_catched)
1182 0 5 unless rename $tmp, $file
1193 0 5 unless &cat($tmp_files[$i], $fh[$fh_idx])
1197 0 5 unless unlink $tmp_files[$i]
1204 0 5 unless close $fh[$fh_idx]
1208 0 4 if ($self->count_loops_by eq 'number-of-reads') { }
1211 0 0 ref $self->seq eq 'App::Sandy::Seq::PairedEnd' ? :
1227 0 0 unless close $fh
1233 0 0 if (%$parent_count)
1246 0 0 unless close $fh
1261 0 4 unless close $fh