Branch Coverage

lib/App/Sandy/Simulator.pm
Criterion Covered Total %
branch 75 196 38.2


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') { }
277 0 860 if /^;/u
278 100 760 if (/^>/u) { }
295 0 100 if (defined $fields[1])
304 0 760 unless defined $id
314 0 20 unless (%indexed_fasta)
319 0 20 unless $fh->close
321 0 20 if %fasta_rtree
337 20 0 unless ($self->truncate)
342 50 50 if ($class eq 'App::Sandy::Seq::SingleEnd') { }
50 0 elsif ($class eq 'App::Sandy::Seq::PairedEnd') { }
344 0 50 if ($index_size < $read_mean)
351 0 50 if ($index_size < $fragment_mean)
362 0 20 unless (%$indexed_fasta)
367 0 20 unless ($self->_has_no_fasta_rtree)
369 0 0 if @blacklist
379 0 20 unless ($self->_has_no_fasta_rtree)
416 0 0 unless ($init)
422 0 0 if ($en < $pos - 1)
432 0 100 if ($init)
437 50 50 $class eq 'App::Sandy::Seq::SingleEnd' ? :
441 0 100 if ($len > $seq_len - $read_len) { }
450 0 20 unless (%$indexed_fasta)
455 0 20 unless ($self->_has_no_fasta_rtree)
457 0 0 if @blacklist_id
473 0 0 if $old_id ne $id
489 0 20 if ($self->seqid_weight eq 'same') { }
0 20 elsif ($self->seqid_weight eq 'count') { }
20 0 elsif ($self->seqid_weight eq 'length') { }
497 0 0 if ($weights->[$i] > 1)
515 0 0 unless (exists $piece_table->{$id} or $self->_exists_fasta_tree($id))
522 0 0 unless (%$indexed_file)
533 0 0 if (exists $piece_table->{$seq_id}) { }
540 0 0 unless (@$ids)
567 0 0 if (%ptable_ind)
618 0 0 unless (@$keys and @$weights)
666 0 20 if ($min <= 0)
670 0 20 $min < 1 ? :
694 100 0 scalar keys %$type_h == 1 ? :
717 0 20 if ($self->genomic_variation)
735 0 20 if (defined $genomic_variation)
758 0 100 if (defined $indexed_snv and defined $indexed_snv->{$std_seq_id})
764 0 0 if (@snvs_homo)
795 100 0 unless ($self->truncate)
798 50 50 if ($class eq 'App::Sandy::Seq::SingleEnd') { }
50 0 elsif ($class eq 'App::Sandy::Seq::PairedEnd') { }
799 0 50 if ($new_size < $self->seq->read_mean)
804 0 50 if ($new_size < $self->seq->fragment_mean)
820 100 0 if (%$type_h) { }
829 0 20 unless (%piece_table)
835 0 20 unless ($self->_has_no_fasta_rtree)
837 0 0 if @blacklist
856 0 0 defined $snv->{'id'} && $snv->{'id'} ne '.' ? :
859 0 0 if ($snv->{'ref'} eq '-') { }
0 0 elsif ($snv->{'alt'} eq '-') { }
883 0 0 unless (defined $seq_id and exists $indexed_fasta->{$seq_id})
895 0 0 if ($snv->{'ref'} eq '-' and $snv->{'pos'} > $size or $snv->{'ref'} ne '-' and $snv->{'pos'} >= $size) { }
0 0 elsif ($snv->{'ref'} ne '-') { }
905 0 0 if (uc $ref ne uc $snv->{'ref'})
917 0 0 if (@saved_snvs)
927 8 0 if ($self->count_loops_by eq 'coverage') { }
0 0 elsif ($self->count_loops_by eq 'number-of-reads') { }
935 3 5 if ref $self->seq eq "App::Sandy::Seq::PairedEnd"
945 0 8 if ($number_of_reads <= 0)
955 0 0 if $self->_has_no_fasta_rtree
961 0 0 if defined $pid
1025 0 8 if ($output_format =~ /(sam|bam)/u) { }
8 0 elsif ($output_format =~ /fastq/u) { }
1028 5 3 if ($seq_class eq 'App::Sandy::Seq::SingleEnd') { }
3 0 elsif ($seq_class eq 'App::Sandy::Seq::PairedEnd') { }
1032 0 3 if $self->join_paired_ends
1036 0 8 if ($output_format eq "fastq.gz")
1075 0 8 $number_of_jobs == 1 ? :
1085 10 4 if my $pid = $pm->start
1106 2 2 if $tid == $number_of_jobs
1118 4 0 if ($output_format =~ /^(sam|fastq)$/u) { }
0 0 elsif ($output_format eq 'fastq.gz') { }
0 0 elsif ($output_format eq 'bam') { }
1132 0 4 if ($seq_class eq "App::Sandy::Seq::PairedEnd" and $file_class =~ /(sam|bam|join)/u)
1142 0 4 if ($output_format =~ /^(sam|bam)$/u and $tid == 1)
1159 6840 0 unless (@_)
1180 0 4 if ($output_format eq "bam" and $tid == $number_of_jobs)
1194 0 4 if ($sig->signal_catched)
1207 0 5 unless rename $tmp, $file
1218 0 5 unless &cat($tmp_files[$i], $fh[$fh_idx])
1222 0 5 unless unlink $tmp_files[$i]
1229 0 5 unless close $fh[$fh_idx]
1233 0 4 if ($self->count_loops_by eq 'number-of-reads') { }
1236 0 0 ref $self->seq eq 'App::Sandy::Seq::PairedEnd' ? :
1252 0 0 unless close $fh
1258 0 0 if (%$parent_count)
1271 0 0 unless close $fh
1286 0 4 unless close $fh