Skip to content

Commit

Permalink
Rm fix remaining bugs (#132)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
robmaz authored Jan 21, 2019
1 parent e97468b commit 4ab579e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 22 deletions.
2 changes: 1 addition & 1 deletion bin/distmap
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
18 changes: 0 additions & 18 deletions lib/perl5/site_perl/GenomeIndex.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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/");


Expand Down
5 changes: 2 additions & 3 deletions lib/perl5/site_perl/HadoopMapping.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down

0 comments on commit 4ab579e

Please sign in to comment.