From 39cbad542c2c306714ef434a1942107a6377e42b Mon Sep 17 00:00:00 2001 From: Ruben Vorderman <r.h.p.vorderman@lumc.nl> Date: Mon, 23 Jul 2018 13:24:28 +0200 Subject: [PATCH] fastqc to 1.0 --- fastqc.wdl | 81 +++++++++++++++++++++++++++++------------------------- 1 file changed, 43 insertions(+), 38 deletions(-) diff --git a/fastqc.wdl b/fastqc.wdl index d9135f7..a11e1bf 100644 --- a/fastqc.wdl +++ b/fastqc.wdl @@ -1,20 +1,24 @@ +version 1.0 + task fastqc { - File seqFile - String outdirPath - String? preCommand - Boolean? casava - Boolean? nano - Boolean? noFilter - Boolean? extract = true - Boolean? nogroup - Int? minLength - String? format - Int? threads = 1 - File? contaminants - File? adapters - File? limits - Int? kmers - String? dir + input { + File seqFile + String outdirPath + String? preCommand + Boolean? casava + Boolean? nano + Boolean? noFilter + Boolean? extract = true + Boolean? nogroup + Int? minLength + String? format + Int? threads = 1 + File? contaminants + File? adapters + File? limits + Int? kmers + String? dir + } # Chops of the .gz extension if present. String name = sub(seqFile, "\\.gz$","") # This regex chops of the extension and replaces it with _fastqc for the reportdir. @@ -22,24 +26,24 @@ task fastqc { String reportDir = outdirPath + "/" + sub(basename(name), "\\.[^\\.]*$", "_fastqc") command { set -e -o pipefail - ${preCommand} - mkdir -p ${outdirPath} + ~{preCommand} + mkdir -p ~{outdirPath} fastqc \ - ${"--outdir " + outdirPath} \ - ${true="--casava" false="" casava} \ - ${true="--nano" false="" nano} \ - ${true="--nofilter" false="" noFilter} \ - ${true="--extract" false="" extract} \ - ${true="--nogroup" false="" nogroup} \ - ${"--min_length " + minLength } \ - ${"--format " + format} \ - ${"--threads " + threads} \ - ${"--contaminants " + contaminants} \ - ${"--adapters " + adapters} \ - ${"--limits " + limits} \ - ${"--kmers " + kmers} \ - ${"--dir " + dir} \ - ${seqFile} + ~{"--outdir " + outdirPath} \ + ~{true="--casava" false="" casava} \ + ~{true="--nano" false="" nano} \ + ~{true="--nofilter" false="" noFilter} \ + ~{true="--extract" false="" extract} \ + ~{true="--nogroup" false="" nogroup} \ + ~{"--min_length " + minLength } \ + ~{"--format " + format} \ + ~{"--threads " + threads} \ + ~{"--contaminants " + contaminants} \ + ~{"--adapters " + adapters} \ + ~{"--limits " + limits} \ + ~{"--kmers " + kmers} \ + ~{"--dir " + dir} \ + ~{seqFile} } @@ -56,13 +60,14 @@ task fastqc { } task getConfiguration { - String? preCommand - String? fastqcDirFile = "fastqcDir.txt" - + input { + String? preCommand + String? fastqcDirFile = "fastqcDir.txt" + } command { set -e -o pipefail - ${preCommand} - echo $(dirname $(readlink -f $(which fastqc))) > ${fastqcDirFile} + ~{preCommand} + echo $(dirname $(readlink -f $(which fastqc))) > ~{fastqcDirFile} } output { -- GitLab