From d3c9cf212e1d656e1f7cd256bdd1e1f9a2d12352 Mon Sep 17 00:00:00 2001 From: Justin Bedo Date: Mon, 30 Nov 2020 08:20:28 +1100 Subject: gridss.assemble: fix workdir manipulation --- tools/gridss-assemble.nix | 13 +++++++------ 1 file 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; -- cgit v1.2.3