From 4ab579e5e96b937eb0b97aaf1c2040e382ad333c Mon Sep 17 00:00:00 2001 From: robmaz <31442300+robmaz@users.noreply.github.com> Date: Mon, 21 Jan 2019 14:17:54 +0100 Subject: [PATCH] Rm fix remaining bugs (#132) * distmap: fix trim-args type --trim-args should expect a string argument * GenomeIndex.pm: remove checks for obsolete args should also fix issue #127 * HadoopMapping.pm: mktemp needs template arg * HadoopMapping.pm: exec to see mapper return code --- bin/distmap | 2 +- lib/perl5/site_perl/GenomeIndex.pm | 18 ------------------ lib/perl5/site_perl/HadoopMapping.pm | 5 ++--- 3 files changed, 3 insertions(+), 22 deletions(-) diff --git a/bin/distmap b/bin/distmap index 5d09131..b5aa151 100755 --- a/bin/distmap +++ b/bin/distmap @@ -120,7 +120,7 @@ GetOptions( "only-map" => \$only_map, "only-hdfs-download" => \$only_hdfs_download, "only-delete-temp" => \$only_delete_temp, - "trim-args" => \$trim_args, + "trim-args=s" => \$trim_args, ## other "tmp-dir=s" => \$tmp_dir, "output-format=s" => \$output_format, diff --git a/lib/perl5/site_perl/GenomeIndex.pm b/lib/perl5/site_perl/GenomeIndex.pm index a3152ab..076d4aa 100644 --- a/lib/perl5/site_perl/GenomeIndex.pm +++ b/lib/perl5/site_perl/GenomeIndex.pm @@ -218,24 +218,6 @@ sub copy_exec { $i++; } - - if (-e $args_dict->{"picard_mergesamfiles_jar"}) { - copy($args_dict->{"picard_mergesamfiles_jar"}, "$bin_dir_path/"); - } - - if (-e $args_dict->{"picard_sortsam_jar"}) { - copy($args_dict->{"picard_sortsam_jar"}, "$bin_dir_path/"); - } - - if (-e $args_dict->{"picard_jar"}) { - copy($args_dict->{"picard_jar"}, "$bin_dir_path/"); - } - - - if (-e $args_dict->{"trim_script_path"}) { - copy($args_dict->{"trim_script_path"}, "$bin_dir_path/"); - } - system("chmod -R +x $bin_dir_path/"); diff --git a/lib/perl5/site_perl/HadoopMapping.pm b/lib/perl5/site_perl/HadoopMapping.pm index 36f56be..d2e4adc 100755 --- a/lib/perl5/site_perl/HadoopMapping.pm +++ b/lib/perl5/site_perl/HadoopMapping.pm @@ -459,11 +459,10 @@ sub write_hadoop_mapping_job { print $ofh "job=\"$args_dict->{'job_desc'}"."_Mapping_"."$args_dict->{'read_folder'}\"\n\n"; # now only works like this - print $ofh "mpsh=\$(mktemp)\n"; + print $ofh "mpsh=\$(mktemp distmap.XXXXX)\n"; print $ofh "cat > \$mpsh << 'TOK'\n"; print $ofh "#!/bin/bash\n"; - print $ofh "./$args_dict->{'mapper_command'}\n"; - print $ofh "wait\n"; + print $ofh "exec ./$args_dict->{'mapper_command'}\n"; print $ofh "TOK\n"; print $ofh "chmod +x \$mpsh\n";