From 007ef29dd186c78b877f868769a7f2e5478af0f5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ant=C3=B3nio=20Paulo?= <antonio.do.paulo@ist.utl.pt>
Date: Mon, 5 Aug 2019 02:20:05 +0200
Subject: [PATCH] update ModifyStrelka to also add "GT" header

---
 somaticseq.wdl | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/somaticseq.wdl b/somaticseq.wdl
index 4a8b860..349c7d2 100644
--- a/somaticseq.wdl
+++ b/somaticseq.wdl
@@ -280,9 +280,14 @@ task ModifyStrelka {
     }
 
     command {
+        set -e -o pipefail
+
         ~{installDir}/modify_Strelka.py \
         -infile ~{strelkaVCF} \
-        -outfile ~{outputVCFName}
+        -outfile "modified_strelka.vcf"
+
+        first_FORMAT_line_num=$(grep -n -m 1 '##FORMAT' "modified_strelka.vcf" | cut -d : -f 1)
+        sed "$first_FORMAT_line_num"'i##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">' "modified_strelka.vcf" > ~{outputVCFName}
     }
 
     output {
-- 
GitLab