From 264627ed6d4cc563f0173b436723d9c440f63735 Mon Sep 17 00:00:00 2001
From: Ruben Vorderman <r.h.p.vorderman@lumc.nl>
Date: Mon, 7 May 2018 16:15:44 +0200
Subject: [PATCH] add samtools application

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

diff --git a/samtools.wdl b/samtools.wdl
index a1192ac..ecff136 100644
--- a/samtools.wdl
+++ b/samtools.wdl
@@ -117,3 +117,31 @@ task fastq {
 
     }
 }
+
+task view {
+    String? preCommand
+    File inFile
+    File? referenceFasta
+    String? outputFileName
+    Boolean? outputBam
+    Boolean? uncompressedBamOutput
+    Int? includeFilter
+    Int? excludeFilter
+    Int? excludeSpecificFilter
+    Int? threads
+
+    command {
+    set -e -o pipefail
+    ${preCommand}
+    samtools view \
+    ${"-T " + referenceFasta} \
+    ${"-o " + outputFileName} \
+    ${true="-b " false="" outputBam} \
+    ${true="-u " false="" uncompressedBamOutput} \
+    ${"-f " + includeFilter} \
+    ${"-F " + excludeFilter} \
+    ${"-G " + excludeSpecificFilter} \
+    ${"--threads " + threads - 1} \
+    ${inFile}
+    }
+}
-- 
GitLab