From c8af9b5de589c3aaceb7d9096090c1cd581e3616 Mon Sep 17 00:00:00 2001
From: Ruben Vorderman <r.h.p.vorderman@lumc.nl>
Date: Tue, 19 Feb 2019 16:45:57 +0100
Subject: [PATCH] dockerize scatterregions

---
 biopet/biopet.wdl | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/biopet/biopet.wdl b/biopet/biopet.wdl
index 310d9c0..8a66e42 100644
--- a/biopet/biopet.wdl
+++ b/biopet/biopet.wdl
@@ -235,27 +235,21 @@ task ReorderGlobbedScatters {
 
 task ScatterRegions {
     input {
-        String? preCommand
         Reference reference
         String outputDirPath
-        File? toolJar
         Int? scatterSize
         File? regions
         Boolean notSplitContigs = false
 
         Int memory = 4
         Float memoryMultiplier = 3.0
+        String dockerTag = "0.2--0"
     }
 
-    String toolCommand = if defined(toolJar)
-        then "java -Xmx" + memory + "G -jar " +toolJar
-        else "biopet-scatterregions -Xmx" + memory + "G"
-
     command {
         set -e -o pipefail
-        ~{preCommand}
         mkdir -p ~{outputDirPath}
-        ~{toolCommand} \
+        biopet-scatterregions -Xmx~{memory}G \
           -R ~{reference.fasta} \
           -o ~{outputDirPath} \
           ~{"-s " + scatterSize} \
@@ -268,6 +262,7 @@ task ScatterRegions {
     }
 
     runtime {
+        docker: "quay.io/biopet-scatterregions/gatk:" + dockerTag
         memory: ceil(memory * memoryMultiplier)
     }
 }
-- 
GitLab