diff --git a/biopet.wdl b/biopet.wdl
index 7a16368f4f6faaf6e17945115784ac0ded1b4076..46f617975e7d1e2a34f41dca827112e43415c2cb 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]))
+    }
 }