From fcc09ede0836325d7d83247afc87c04015f8af4b Mon Sep 17 00:00:00 2001
From: Peter van 't Hof <p.j.van_t_hof@lumc.nl>
Date: Wed, 13 Jun 2018 21:05:22 +0200
Subject: [PATCH] Add dbsnp to baserecalibraction

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

diff --git a/gatk.wdl b/gatk.wdl
index 6f52490..78c53b8 100644
--- a/gatk.wdl
+++ b/gatk.wdl
@@ -56,12 +56,17 @@ task BaseRecalibrator {
     File inputBamIndex
     String recalibrationReportPath
     Array[File]+ sequenceGroupInterval
-    Array[File]+ knownIndelsSitesVCFs
-    Array[File]+ knownIndelsSitesIndices
+    Array[File]? knownIndelsSitesVCFs
+    Array[File]? knownIndelsSitesIndices
+    File? dbsnpVCF
+    File? dbsnpVCFindex
     File refDict
     File refFasta
     File refFastaIndex
 
+    Array[File]+ knownIndelsSitesVCFsArg = select_all(flatten([knownIndelsSitesVCFs, [dbsnpVCF]]))
+    Array[File]+ knownIndelsSitesIndicesArg = select_all(flatten([knownIndelsSitesIndices, [dbsnpVCFindex]]))
+
     Float? memory
     Float? memoryMultiplier
 
@@ -80,7 +85,7 @@ task BaseRecalibrator {
           -I ${inputBam} \
           --use-original-qualities \
           -O ${recalibrationReportPath} \
-          --known-sites ${sep=" --known-sites " knownIndelsSitesVCFs} \
+          --known-sites ${sep=" --known-sites " knownIndelsSitesVCFsArg} \
           -L ${sep=" -L " sequenceGroupInterval}
     }
 
-- 
GitLab