From 91a6841a4f1280114da9e86c0cabe6be35360a33 Mon Sep 17 00:00:00 2001 From: npappas <N.Pappas@lumc.nl> Date: Tue, 8 May 2018 13:18:26 +0200 Subject: [PATCH] Flash task --- flash.wdl | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 flash.wdl diff --git a/flash.wdl b/flash.wdl new file mode 100644 index 0000000..0cabd06 --- /dev/null +++ b/flash.wdl @@ -0,0 +1,57 @@ +#workflow runFlash { +# String preCommand +# String outDirPath +# File R1 +# File R2 +# +# call flash { +# input: +# preCommand = preCommand, +# outDirPath = outDirPath, +# inputR1 = R1, +# inputR2 = R2, +# } +#} +task flash { + String? preCommand + File inputR1 + File inputR2 + String outDirPath + String? outPrefix = "flash" + String? logPath = outDirPath + "/" + outPrefix + ".log" + Int? minOverlap + Int? maxOverlap + Boolean? compress = true + Int? threads = 1 + Int? memory = 4 + Int? cores = 1 + + command { + set -e -o pipefail + mkdir -p ${outDirPath} + ${preCommand} + flash \ + ${"--threads=" + threads} \ + ${"--output-directory=" + outDirPath} \ + ${"--output-prefix=" + outPrefix} \ + ${true="--compress " false="" defined(compress)} \ + ${"--min-overlap=" + minOverlap} \ + ${"--max-overlap=" + maxOverlap} \ + ${inputR1} ${inputR2} 2>&1 | tee ${logPath} + } + + output { + File extendedFrags = outDirPath + "/" + outPrefix + ".extendedFrags.fastq.gz" + File notCombined1 = outDirPath + "/" + outPrefix + ".notCombined_1.fastq.gz" + File notCombined2 = outDirPath + "/" + outPrefix + ".notCombined_2.fastq.gz" + File hist = outDirPath + "/" + outPrefix + ".hist" + File histogram = outDirPath + "/" + outPrefix + ".histogram" + String log = select_first([logPath]) + } + + runtime { + cpu: select_first([cores]) + memory: select_first([memory]) + } + +} \ No newline at end of file -- GitLab