From 5fc58ce1f5585a5bb4078b095674b67aba8d8f7d Mon Sep 17 00:00:00 2001
From: cagaser <c.agaser@lumc.nl>
Date: Sun, 21 Feb 2021 21:43:20 +0100
Subject: [PATCH] add bcftools view filtering options

---
 bcftools.wdl | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/bcftools.wdl b/bcftools.wdl
index 28380de..5f6c2a1 100644
--- a/bcftools.wdl
+++ b/bcftools.wdl
@@ -290,7 +290,10 @@ task View {
     input {
         File inputFile
         String outputPath = "output.vcf"
-
+		
+        String? exclude
+        String? include
+		Boolean excludeUncalled = false
         String memory = "256M"
         Int timeMinutes = 1 + ceil(size(inputFile, "G"))
         String dockerImage = "quay.io/biocontainers/bcftools:1.10.2--h4f4756c_2"
@@ -302,6 +305,7 @@ task View {
         set -e
         mkdir -p "$(dirname ~{outputPath})"
         bcftools view \
+		~{true="--exclude-uncalled" false="" firstAlleleOnly} \
         -o ~{outputPath} \
         -O ~{true="z" false="v" compressed} \
         ~{inputFile}
@@ -324,6 +328,8 @@ task View {
         # inputs
         inputFile: {description: "A vcf or bcf file.", category: "required"}
         outputPath: {description: "The location the output VCF file should be written.", category: "common"}
+        include: {description: "Select sites for which the expression is true (see man page for details).", category: "advanced"}
+        exclude: {description: "Exclude sites for which the expression is true (see man page for details).", category: "advanced"}
         memory: {description: "The amount of memory this job will use.", category: "advanced"}
         timeMinutes: {description: "The maximum amount of time the job will run in minutes.", category: "advanced"}
         dockerImage: {description: "The docker image used for this task. Changing this may result in errors which the developers may choose not to address.", category: "advanced"}
-- 
GitLab