From 9bc3b50ac8b0a12525c4caeb3ad5e93437f125e4 Mon Sep 17 00:00:00 2001
From: Ruben Vorderman <r.h.p.vorderman@lumc.nl>
Date: Thu, 14 Jun 2018 14:22:47 +0200
Subject: [PATCH] added SeqStat

---
 biopet.wdl | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/biopet.wdl b/biopet.wdl
index 7a16368..46f6179 100644
--- a/biopet.wdl
+++ b/biopet.wdl
@@ -277,6 +277,28 @@ task ScatterRegions {
 }
 
 task Seqstat {
+    String? preCommand
+    File? toolJar
+    File fastq
+    String outputFile
+    Float? memory
+    Float? memoryMultiplier
+    Int mem = ceil(select_first([memory, 4.0]))
+
+    String toolCommand = if defined(toolJar)
+    then "java -Xmx" + mem + "G -jar " +toolJar
+    else "biopet-seqstat -Xmx" + mem + "G"
 
+    command {
+        set -e -o pipefail
+        ${preCommand}
+        mkdir -p ${outputFile}
+        ${toolCommand} \
+        --fastq ${fastq} \
+        --output ${outputFile}
+    }
+    runtime {
+        memory: ceil(mem * select_first([memoryMultiplier, 2.0]))
+    }
 }
 
-- 
GitLab