From a6f81d200e60e2c9e7cfb9449bfaf28fa8c5e002 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ant=C3=B3nio=20Paulo?= <antonio.do.paulo@ist.utl.pt>
Date: Wed, 31 Jul 2019 17:16:22 +0200
Subject: [PATCH] add GATK LearnReadOrientationModel as a task

---
 gatk.wdl | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gatk.wdl b/gatk.wdl
index 578765b..bf3d831 100644
--- a/gatk.wdl
+++ b/gatk.wdl
@@ -298,6 +298,34 @@ task MuTect2 {
     }
 }
 
+task LearnReadOrientationModel {
+    input {
+        Array[File] f1r2TarGz
+
+        Int memory = 4
+        Float memoryMultiplier = 2
+        String dockerImage = "quay.io/biocontainers/gatk4:4.1.2.0--1"
+    }
+
+    command {
+        set -e
+        gatk --java-options -Xmx~{memory}G \
+        LearnReadOrientationModel \
+        -I ~{sep=" -I " f1r2TarGz} \
+        -O "artifact-priors.tar.gz"
+    }
+
+    output {
+        File artifactPriorTable = "artifact-priors.tar.gz"
+    }
+
+
+    runtime {
+        docker: dockerImage
+        memory: ceil(memory * memoryMultiplier)
+    }
+}
+
 task SplitNCigarReads {
     input {
         File inputBam
-- 
GitLab