Branch Coverage

lib/NBI/Launcher.pm
Criterion Covered Total %
branch 71 114 62.2


line true false branch
44 1 9 unless my $activate = $args{'activate'}
45 0 9 unless ref $activate eq "HASH"
49 2 7 unless @act_keys == 1 and grep {/^(module|singularity|conda)$/u;} @act_keys
54 1 7 unless $k =~ /^(queue|threads|memory|runtime)$/u
60 1 5 unless $self->{'name'} = $args{'name'}
89 3 2 if ($type eq 'module') { }
1 1 elsif ($type eq 'conda') { }
1 0 elsif ($type eq 'singularity') { }
110 1 1 defined $img ? :
121 1 5 if defined $args{'sample_name'}
126 5 0 if (($inp->{'type'} // "") eq "file" and $inp->{'required'} // 0)
128 5 0 if defined $source
131 0 5 unless defined $source
148 1 1 defined $args{'r1'} && defined $args{'r2'} ? :
178 0 12 if $inp->{'slurm_sync'}
182 1 11 if ($inp->{'required'} and not defined $val)
185 5 6 unless defined $val
188 1 5 if ($type eq 'file' and not -f $val) { }
0 10 elsif ($type eq 'dir' and not -d $val) { }
197 4 7 if $p->{'slurm_sync'}
202 4 1 if (not defined $val and $p->{'default_env'})
207 0 7 if ($p->{'required'} and not defined $val)
210 0 7 unless defined $val
213 0 7 if ($type eq 'int' and not $val =~ /^\d+$/u) { }
0 7 elsif ($type eq 'float' and not $val =~ /^[\d.]+$/u) { }
0 7 elsif ($type eq 'file' and not -f $val) { }
1 8 elsif ($type eq 'dir' and not -d $val) { }
225 1 3 if ($self->{'outdir'}{'required'} and not defined $args{'outdir'})
264 0 2 unless my $sample = $args{'sample'}
265 0 2 unless my $outdir = $args{'outdir'}
278 5 0 if defined $cmd_args{$name}
279 0 0 if ($p->{'default_env'} and defined $ENV{$p->{'default_env'}}) { }
0 0 elsif (defined $p->{'default'}) { }
291 1 2 unless $out->{'required'}
309 2 0 $use_tmpdir ? :
0 2 defined $args{'scratch_dir'} ? :
359 2 0 if ($activation)
377 2 0 if ($validation)
408 1 2 if defined $args{$name}
409 1 1 if ($p->{'default_env'} and defined $ENV{$p->{'default_env'}}) { }
1 0 elsif (defined $p->{'default'}) { }
419 1 4 unless defined $args{$name}
421 2 2 if ($type eq "file" or $type eq "dir")
427 1 0 if (defined $args{'outdir'})
430 1 0 if defined $abs
440 1 0 if ($rt =~ /^(\d+):(\d+):(\d+)$/u)
443 0 0 if ($rt =~ /^(\d+):(\d+)$/u)
446 0 0 if ($rt =~ /^(\d+)$/u)
454 0 0 if $u eq "D"
455 0 0 if $u eq "H"
456 0 0 if $u eq "M"
457 0 0 if $u eq "S"
491 2 1 unless $p->{'slurm_sync'}
492 1 0 if ($p->{'slurm_sync'} eq 'threads') { }
0 0 elsif ($p->{'slurm_sync'} eq 'memory') { }
546 1 1 if defined $args{$inp->{'name'}}
552 3 0 if defined $args{$p->{'name'}}