diff --git a/CHANGELOG.md b/CHANGELOG.md index ad9ea5f05072c653dadcd971820d94104468bfc5..bcdcc6f41972cc47859927af8753ce90b508e931 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ that users understand how the changes affect the new version. version 1.0.0-dev --------------------------- ++ Cutadapt: If the output is a gzipped file, compress with level 1 (instead of default 6). ++ Cutadapt: Fix issues with read2output when using single-end reads. + Add feature type, idattr and additional attributes to htseq-count. + Added allow-contain option to bowtie. + Added a changelog to keep track of changes. diff --git a/cutadapt.wdl b/cutadapt.wdl index 6161d8baf3721b1e93fc006e9f6761ee5e695285..84ba9b59db9a0db17f70e1aa6fe72564380c0909 100644 --- a/cutadapt.wdl +++ b/cutadapt.wdl @@ -5,7 +5,7 @@ task Cutadapt { File read1 File? read2 String read1output = "cut_r1.fq.gz" - String? read2output = if defined(read2) then "cut_r2.fq.gz" else read2 + String? read2output String? format Array[String]+? adapter Array[String]+? front @@ -59,15 +59,19 @@ task Cutadapt { Boolean? bwa Boolean? zeroCap Boolean? noZeroCap - String? reportPath - + String reportPath = "cutadapt_report.txt" + #Int compressionLevel = 1 # This only affects outputs with the .gz suffix. + # --compression-level has a bug in 2.4 https://github.com/marcelm/cutadapt/pull/388 + #~{"--compression-level=" + compressionLevel} \ + Boolean Z = true # equal to compressionLevel=1 # Fixme: replace once upstream is fixed. Int cores = 1 Int memory = 16 # FIXME: Insane memory. Double-check if needed. - String dockerImage = "quay.io/biocontainers/cutadapt:2.3--py36h14c3975_0" + String dockerImage = "quay.io/biocontainers/cutadapt:2.4--py37h14c3975_0" } - String read2outputArg = if (defined(read2output)) - then "mkdir -p $(dirname " + read2output + ")" + String realRead2output = select_first([read2output, "cut_r2.fq.gz"]) + String read2outputArg = if (defined(read2)) + then "mkdir -p $(dirname " + realRead2output + ")" else "" # FIXME: This crappy overengineering can be removed once cromwell can handle subworkflow inputs correctly. @@ -95,13 +99,14 @@ task Cutadapt { ~{read2outputArg} cutadapt \ ~{"--cores=" + cores} \ + ~{true="-Z" false="" Z} \ ~{true="-a" false="" defined(adapterForward)} ~{sep=" -a " adapterForward} \ ~{true="-A" false="" defined(adapterReverse)} ~{sep=" -A " adapterReverse} \ ~{true="-g" false="" defined(front)} ~{sep=" -g " front} \ ~{true="-G" false="" defined(frontRead2)} ~{sep=" -G " frontRead2} \ ~{true="-b" false="" defined(anywhereForward)} ~{sep=" -b " anywhereForward} \ ~{true="-B" false="" defined(anywhereReverse)} ~{sep=" -B " anywhereReverse} \ - --output ~{read1output} ~{"--paired-output " + read2output} \ + --output ~{read1output} ~{if defined(read2) then "-p " + realRead2output else ""} \ ~{"--to-short-output " + tooShortOutputPath} \ ~{"--to-short-paired-output " + tooShortPairedOutputPath} \ ~{"--to-long-output " + tooLongOutputPath} \ @@ -151,9 +156,7 @@ task Cutadapt { output{ File cutRead1 = read1output File? cutRead2 = read2output - File report = if defined(reportPath) - then select_first([reportPath]) - else stdout() + File report = reportPath File? tooLongOutput=tooLongOutputPath File? tooShortOutput=tooShortOutputPath File? untrimmedOutput=untrimmedOutputPath