From f9152ab2e1db5acff80244e83a7ed7e698f2c15f Mon Sep 17 00:00:00 2001
From: DavyCats <davycats.dc@gmail.com>
Date: Fri, 27 Jul 2018 15:55:25 +0200
Subject: [PATCH] add Somatic strelka task

---
 strelka.wdl | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 strelka.wdl

diff --git a/strelka.wdl b/strelka.wdl
new file mode 100644
index 0000000..137efe9
--- /dev/null
+++ b/strelka.wdl
@@ -0,0 +1,47 @@
+version 1.0
+
+task Somatic {
+    input {
+        String? preCommand
+        String? installDir
+        String runDir
+        File normalBam
+        File tumorBam
+        File refFasta
+
+        Int cores = 1
+        Int memory = 4
+    }
+
+    String toolCommand = if defined(installDir)
+        then installDir + "bin/configureStrelkaSomaticWorkflow.py"
+        else "configureStrelkaSomaticWorkflow.py"
+
+    command {
+        set -e -o pipefail
+        ~{preCommand}
+        ~{toolCommand} \
+        --normalBam ~{normalBam} \
+        --tumorBam ~{tumorBam} \
+        --ref ~{refFasta} \
+        --runDir ~{runDir}
+
+        ~{runDir}/runWorkflow.py \
+        -m local \
+        -J ~{cores} \
+        -g ~{memory}
+    }
+
+    output {
+        String runDir = runDir
+        File indelsVcf = runDir + "/results/variants/somatic.indels.vcf.gz"
+        File indelsIndex = runDir + "/results/variants/somatic.indels.vcf.gz.tbi"
+        File snvVcf = runDir + "/results/variants/somatic.snvs.vcf.gz"
+        File snvIndex = runDir + "/results/variants/somatic.snvs.vcf.gz.tbi"
+    }
+
+    runtime {
+        cpu: cores
+        memory: memory
+    }
+}
\ No newline at end of file
-- 
GitLab