diff options
author | Justin Bedo <cu@cua0.org> | 2020-11-30 08:20:28 +1100 |
---|---|---|
committer | Justin Bedo <cu@cua0.org> | 2020-11-30 08:20:28 +1100 |
commit | d3c9cf212e1d656e1f7cd256bdd1e1f9a2d12352 (patch) | |
tree | ac3d0661612f1135b6eb1fffeb6894900d4de781 | |
parent | e4e46adf874a47a726f3f142c656ecaff9ee6cd3 (diff) |
gridss.assemble: fix workdir manipulation
-rw-r--r-- | tools/gridss-assemble.nix | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tools/gridss-assemble.nix b/tools/gridss-assemble.nix index f0a2693..9e51cab 100644 --- a/tools/gridss-assemble.nix +++ b/tools/gridss-assemble.nix @@ -40,7 +40,7 @@ assert (homoRef); stage rec { name = "gridss-assemble"; - buildInputs = with pkgs; [ jre bwa rsync ]; + buildInputs = with pkgs; [ jre bwa ]; outputs = [ "out" "work" ]; buildCommand = '' TMPDIR=$(pwd) @@ -50,24 +50,25 @@ stage rec { ln -s $f done ${concatMapStringsSep "\n" linkInput inputs} - ${concatMapStringsSep "\n" (w: "rsync -a --ignore-existing ${w}/ ./") workdirs} + mkdir out.gridss.working + ${concatMapStringsSep "\n" (w: "cp -r ${w}/* ./out.gridss.working") workdirs} + chmod -R u+rwX out.gridss.working java -Xmx${heapSize} -Dsamjdk.create_index=true \ -cp ${bionix.gridss.jar} gridss.AssembleBreakends \ VERBOSITY=WARNING \ REFERENCE_SEQUENCE=ref.fa \ ${concatMapStringsSep " " (i: "INPUT='${i}'") inputs} \ WORKER_THREADS=$NIX_BUILD_CORES \ - OUTPUT=$out \ + OUTPUT=out \ ${optionalString (config != null) ("OPTIONS_FILE=" + bionix.gridss.gridssConfig config)} \ WORKING_DIR=$TMPDIR/ \ TMP_DIR=$TMPDIR/ \ ${optionalString (jobIndex != null) "JOB_INDEX=${toString jobIndex}"} \ ${optionalString (jobIndex != null) "JOB_NODES=${toString jobNodes}"} \ ${optionalString (flags != null) flags} - rm -rf tmp + [ -e out ] && cp -r out $out touch $out - cp -r $TMPDIR $work - chmod u+rwX -R $work + cp -r out.gridss.working $work ''; passthru.filetype = filetype.bam { ref = ref; sorting = sort.name {}; }; passthru.multicore = true; |