From 1dbfac51511fa8b15d6ff868acf18f7f52c266b4 Mon Sep 17 00:00:00 2001
From: Ruben Vorderman <r.h.p.vorderman@lumc.nl>
Date: Mon, 23 Jul 2018 13:32:21 +0200
Subject: [PATCH] macs2 and htseq.wdl to 1.0

---
 htseq.wdl | 36 ++++++++++++++++++++----------------
 macs2.wdl | 29 ++++++++++++++++-------------
 2 files changed, 36 insertions(+), 29 deletions(-)

diff --git a/htseq.wdl b/htseq.wdl
index b634bf5..87c4c67 100644
--- a/htseq.wdl
+++ b/htseq.wdl
@@ -1,25 +1,29 @@
+version 1.0
+
 task HTSeqCount {
-    String? preCommand
-    Array[File] alignmentFiles
-    File gtfFile
-    String outputTable
-    String? format
-    String? order
-    String? stranded
+    input {
+        String? preCommand
+        Array[File] alignmentFiles
+        File gtfFile
+        String outputTable
+        String? format
+        String? order
+        String? stranded
 
-    Int? memory
+        Int? memory
+    }
 
     command {
         set -e -o pipefail
-        mkdir -p ${sub(outputTable, basename(outputTable), "")}
-        ${preCommand}
+        mkdir -p ~{sub(outputTable, basename(outputTable), "")}
+        ~{preCommand}
         htseq-count \
-        -f ${default="bam" format} \
-        -r ${default="pos" order} \
-        -s ${default="no" stranded} \
-        ${sep=" " alignmentFiles} \
-        ${gtfFile} \
-        > ${outputTable}
+        -f ~{default="bam" format} \
+        -r ~{default="pos" order} \
+        -s ~{default="no" stranded} \
+        ~{sep=" " alignmentFiles} \
+        ~{gtfFile} \
+        > ~{outputTable}
     }
 
     output {
diff --git a/macs2.wdl b/macs2.wdl
index 9880c94..026b418 100644
--- a/macs2.wdl
+++ b/macs2.wdl
@@ -1,20 +1,23 @@
-task PeakCalling {
-    String? preCommand
-    Array[File] bamFiles
-    String outDir
-    String sampleName
-    Int? threads
-    Int? memory
-    Boolean? nomodel
+version 1.0
 
+task PeakCalling {
+    input {
+        String? preCommand
+        Array[File] bamFiles
+        String outDir
+        String sampleName
+        Int? threads
+        Int? memory
+        Boolean? nomodel
+    }
     command {
         set -e -o pipefail
-        ${preCommand}
+        ~{preCommand}
         macs2 callpeak \
-        --treatment ${sep = ' ' bamFiles} \
-        --outdir ${outDir} \
-        --name ${sampleName} \
-        ${default=false true='--nomodel' false='' nomodel}
+        --treatment ~{sep = ' ' bamFiles} \
+        --outdir ~{outDir} \
+        --name ~{sampleName} \
+        ~{default=false true='--nomodel' false='' nomodel}
     }
 
     output {
-- 
GitLab