From a702288af9c2319eff354f3c9cce1352262d82c0 Mon Sep 17 00:00:00 2001
From: Peter van 't Hof <p.j.van_t_hof@lumc.nl>
Date: Thu, 13 Sep 2018 10:26:17 +0200
Subject: [PATCH] Fixing arguments

---
 manta.wdl   |  2 +-
 strelka.wdl | 30 +++++++++++++++---------------
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/manta.wdl b/manta.wdl
index 5b8b1cd..4509cc5 100644
--- a/manta.wdl
+++ b/manta.wdl
@@ -62,7 +62,7 @@ task RunSomatic {
           file: runDir + "/results/variants/candidateSV.vcf.gz",
           index: runDir + "/results/variants/candidateSV.vcf.gz.tbi"
         }
-        File tumorSV = if (paired)
+        IndexedVcfFile tumorSV = if (paired)
             then object {
               file: runDir + "/results/variants/somaticSV.vcf.gz",
               index: runDir + "/results/variants/somaticSV.vcf.gz.tbi"
diff --git a/strelka.wdl b/strelka.wdl
index 959fabf..c47345e 100644
--- a/strelka.wdl
+++ b/strelka.wdl
@@ -1,5 +1,7 @@
 version 1.0
 
+import "common.wdl" as common
+
 task ConfigureGermline {
     input {
         String? preCommand
@@ -7,8 +9,7 @@ task ConfigureGermline {
         String runDir
         Array[File]+ bams
         Array[File]+ indexes
-        File refFasta
-        File refFastaIndex
+        Reference reference
         File? callRegions
         File? callRegionsIndex
         Boolean exome = false
@@ -24,7 +25,7 @@ task ConfigureGermline {
         ~{preCommand}
         ~{toolCommand} \
         --bam ~{sep=" --bam " bams} \
-        --ref ~{refFasta} \
+        --ref ~{reference.fasta} \
         --runDir ~{runDir} \
         ~{"--callRegions " + callRegions} \
         ~{true="--exome" false="" exome} \
@@ -41,16 +42,12 @@ task ConfigureSomatic {
         String? preCommand
         String? installDir
         String runDir
-        File normalBam
-        File normalIndex
-        File tumorBam
-        File tumorIndex
-        File refFasta
-        File refFastaIndex
+        IndexedBamFile normalBam
+        IndexedBamFile tumorBam
+        Reference reference
         File? callRegions
         File? callRegionsIndex
-        File? indelCandidates
-        File? indelCandidatesIndex
+        IndexedVcfFile? indelCandidates
         Boolean exome = false
     }
 
@@ -58,16 +55,18 @@ task ConfigureSomatic {
         then installDir + "bin/configureStrelkaSomaticWorkflow.py"
         else "configureStrelkaSomaticWorkflow.py"
 
+    String indelCandidatesArg = if (defined(indelCandidates)) then "--indelCandidates " + select_first([indelCandidates]).file else ""
+
     command {
         set -e -o pipefail
         ~{preCommand}
         ~{toolCommand} \
-        --normalBam ~{normalBam} \
-        --tumorBam ~{tumorBam} \
-        --ref ~{refFasta} \
+        --normalBam ~{normalBam.file} \
+        --tumorBam ~{tumorBam.file} \
+        --ref ~{reference.fasta} \
         --runDir ~{runDir} \
         ~{"--callRegions " + callRegions} \
-        ~{"--indelCandidates " + indelCandidates} \
+        ~{indelCandidatesArg} \
         ~{true="--exome" false="" exome} \
     }
 
@@ -82,6 +81,7 @@ task Run {
         Int cores = 1
         Int memory = 4
         Boolean somatic = true
+        #FIXME: This task does not have input files
     }
 
     command {
-- 
GitLab