Skip to content
Snippets Groups Projects
Unverified Commit 42fbbcb8 authored by Ruben Vorderman's avatar Ruben Vorderman Committed by GitHub
Browse files

Merge pull request #123 from biowdl/BIOWDL-284

Use compression level 1 in cutadapt.
parents 91f5503e 821ad55c
No related branches found
No related tags found
No related merge requests found
......@@ -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.
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment