diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d2681fb..7e5747c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ version 6.0.0-dev + Use softlinks to localise the database for centrifuge. + Added the FastqFilter task. + Added a new input `revcomp` to cutadapt to set the `--revcomp` flag, defaults to `false`. ++ Fixed bug whereby `samtools.Fastq` could produce out of sync R1/R2 when used with an unsorted bam input. `samtools collate` is now used by default to group reads by readname in order to avoid this issue. + New samtools task: split. + Update `bedtools.Intersect` to support `-wa`, `-wb`, and `-s` flags. diff --git a/samtools.wdl b/samtools.wdl index 2020840b..f6c0bb70 100644 --- a/samtools.wdl +++ b/samtools.wdl @@ -174,6 +174,7 @@ task Fastq { command { set -e mkdir -p "$(dirname ~{outputRead1})" + samtools collate -u -O ~{inputBam} | \ samtools fastq \ ~{true="-1" false="-s" defined(outputRead2)} ~{outputRead1} \ ~{"-2 " + outputRead2} \ @@ -184,8 +185,7 @@ task Fastq { ~{true="-N" false="-n" appendReadNumber} \ ~{true="-O" false="" outputQuality} \ ~{"-c " + compressionLevel} \ - ~{"--threads " + threads} \ - ~{inputBam} + ~{"--threads " + threads} } output {