Branch Coverage

blib/lib/FASTX/Reader.pm
Criterion Covered Total %
branch 74 110 66.3


line true false branch
18 2 31 if (defined $args->{'loadseqs'})
19 1 1 if ($args->{'loadseqs'} eq 'name' or $args->{'loadseqs'} eq 'names') { }
1 0 elsif ($args->{'loadseqs'} eq 'seq' or $args->{'loadseqs'} eq 'seqs' or $args->{'loadseqs'} == 1) { }
42 31 2 if (defined $self->{'filename'} and $self->{'filename'} ne '{{STDIN}}') { }
43 4 27 unless open my $fh, '<', $self->{'filename'}
48 16 11 if (substr($magic_byte, 0, 3) eq "\037\213\cH") { }
0 11 elsif (-B $self->{'filename'}) { }
52 0 16 if (not defined $GZIP_BIN) { }
56 0 16 unless open $fh, '-|', "$GZIP_BIN -dc $self->{'filename'}"
66 0 11 unless open $fh, '<:encoding(utf8)', $self->{'filename'}
71 0 2 if ($self->{'loadseqs'})
76 2 27 if ($self->{'loadseqs'})
92 0 37 if defined $self->{'status'} and $self->{'status'} == 0
96 0 37 unless @$aux
97 3 34 if $aux->[1]
99 28 6 unless (defined $aux->[0])
102 27 1 if (substr($_, 0, 1) eq '>' or substr($_, 0, 1) eq '@')
107 1 27 unless (defined $aux->[0])
115 10 0 /^.(\S+)/u ? :
23 10 /^.(\S+)(?:\s+)(.+)/u ? :
124 22 53 if $c eq '>' or $c eq '@' or $c eq '+'
128 3 30 unless defined $aux->[0]
133 11 22 if $c ne '+'
138 22 0 if (length $qual >= length $seq)
162 0 7 if defined $self->{'status'} and $self->{'status'} == 0
173 1 6 unless (defined $qual)
174 0 1 if (defined $header)
182 5 1 if (substr($header, 0, 1) eq '@' and substr($check, 0, 1) eq '+') { }
187 4 1 if ($seq =~ /^[ACGTNacgtn]+$/u and length $seq == length $qual) { }
205 1 0 if (substr($header, 0, 1) eq '>')
220 0 16 if defined $self->{'status'} and $self->{'status'} == 0
231 2 14 unless (defined $qual)
232 0 2 if (defined $header)
240 14 0 if (substr($header, 0, 1) eq '@' and substr($check, 0, 1) eq '+') { }
245 14 0 if ($seq =~ /^[ACGTNacgtn]+$/u and length $seq == length $qual) { }
251 0 14 unless (defined $y)
273 7 7 if (defined $comments)
275 7 0 if (defined $ctrl)
277 7 0 $filtered eq 'N' ? :
279 7 0 if ($read eq '1') { }
300 0 0 if (substr($header, 0, 1) eq '>')
313 0 4 unless defined $filename
315 0 4 unless open my $fh, '<', $filename
319 0 4 if (substr($magic_byte, 0, 3) eq "\037\213\cH") { }
321 0 0 if (not defined $self->{'GZIP_BIN'}) { }
325 0 0 unless open $fh, '-|', "$self->{'GZIP_BIN'} -dc $filename"
331 1 3 if (substr($first, 0, 1) eq '>') { }
2 1 elsif (substr($first, 0, 1) eq '@') { }
338 2 0 if (substr($sep, 0, 1) eq '+')
349 0 2 unless defined $self->{'loadseqs'}
354 3 3 if ($self->{'loadseqs'} eq 'name') { }
366 0 16 if $^O eq 'MSWin32'
368 16 0 if ($has_which) { }
370 16 16 if which($cmd)
375 0 0 unless $?