According to perldoc you should catch all of your system calls with a check of $? if you want your programs to exit nicely if the shell gives an error. Example below.
#set -x or && could be used. Here both are used.
my $indexcmd = "set -x && bgzip -c $invcf > $outvcf && tabix -p vcf $outvcf";
my $ret = `$indexcmd`;
$? == 0 or die "system cmd `$indexcmd` failed: $ret\n exit code: $?";
Example of affected scripts (not exhaustive ):
- createBWAandSAMtoolsIndices.pl
- per_folder/index_creator.pl
- createLocalRealignmentIntervals.pl
- runpindel.pl
- maybe every perl script that contains
system().
According to perldoc you should catch all of your system calls with a check of $? if you want your programs to exit nicely if the shell gives an error. Example below.
Example of affected scripts (not exhaustive ):
system().