diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ac54982c..612a91836 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,13 +11,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - [#828](https://github.com/nf-core/eager/issues/828) Improved error message if required metagenomic screening parameters not set correctly - [#836](https://github.com/nf-core/eager/issues/836) Remove deprecated parameters from test profiles -- [#838](https://github.com/nf-core/eager/issues/836) Fix --snpcapture_bed files not being picked up by Nextflow (thanks to @meganemichel for reporting) +- [#838](https://github.com/nf-core/eager/issues/836) Fix --snpcapture_bed files not being picked up by Nextflow (❤ to @meganemichel for reporting) - [#843](https://github.com/nf-core/eager/issues/843) Re-add direct piping of AdapterRemovalFixPrefix to pigz - [#844](https://github.com/nf-core/eager/issues/844) Fixed reference masking prior to pmdtools - [#845](https://github.com/nf-core/eager/issues/845) Updates parameter documention to specify `-s` preseq parameter also applies to lc_extrap - [#851](https://github.com/nf-core/eager/issues/851) Fixes a file-name clash during additional_library_merge, post-BAM trimming of different UDG treated libraries of a sample - Renamed a range of MultiQC general stats table headers to improve clarity, documentation has been updated accordingly -- [#858](https://github.com/nf-core/eager/pull/858) Corrected tutorials to reflect updated BAM trimming flags (thanks to @marcel-keller for reporting) +- [#857](https://github.com/nf-core/eager/issues/857) Corrected samtools fastq flag to _retain_ read-pair information when converting off-target BAM files to fastq in paired-end mapping (❤ to @alexhbnr for reporting) +- [#858](https://github.com/nf-core/eager/pull/858) Corrected tutorials to reflect updated BAM trimming flags (❤ to @marcel-keller for reporting) ### `Dependencies` diff --git a/main.nf b/main.nf index 2a43ba715..afd26d4db 100644 --- a/main.nf +++ b/main.nf @@ -638,7 +638,7 @@ process convertBam { script: base = "${bam.baseName}" """ - samtools fastq -tn ${bam} | pigz -p ${task.cpus} > ${base}.converted.fastq.gz + samtools fastq -t ${bam} | pigz -p ${task.cpus} > ${base}.converted.fastq.gz """ } @@ -1683,7 +1683,7 @@ process samtools_filter { samtools index ${libraryid}.filtered.bam ${size} ## FASTQ - samtools fastq -tn ${libraryid}.unmapped.bam | pigz -p ${task.cpus - 1} > ${libraryid}.unmapped.fastq.gz + samtools fastq -tN ${libraryid}.unmapped.bam | pigz -p ${task.cpus - 1} > ${libraryid}.unmapped.fastq.gz rm ${libraryid}.unmapped.bam """ } else if ( "${params.bam_unmapped_type}" == "both" && params.bam_filter_minreadlength == 0 ){ @@ -1693,7 +1693,7 @@ process samtools_filter { samtools index ${libraryid}.filtered.bam ${size} ## FASTQ - samtools fastq -tn ${libraryid}.unmapped.bam | pigz -p ${task.cpus -1} > ${libraryid}.unmapped.fastq.gz + samtools fastq -tN ${libraryid}.unmapped.bam | pigz -p ${task.cpus -1} > ${libraryid}.unmapped.fastq.gz """ // Unmapped/MAPQ Filtering WITH min-length filtering } else if ( "${params.bam_unmapped_type}" == "keep" && params.bam_filter_minreadlength != 0 ) { @@ -1723,7 +1723,7 @@ process samtools_filter { samtools index ${libraryid}.filtered.bam ${size} ## FASTQ - samtools fastq -tn ${libraryid}.unmapped.bam | pigz -p ${task.cpus - 1} > ${libraryid}.unmapped.fastq.gz + samtools fastq -tN ${libraryid}.unmapped.bam | pigz -p ${task.cpus - 1} > ${libraryid}.unmapped.fastq.gz rm ${libraryid}.unmapped.bam """ } else if ( "${params.bam_unmapped_type}" == "both" && params.bam_filter_minreadlength != 0 ){ @@ -1734,7 +1734,7 @@ process samtools_filter { samtools index ${libraryid}.filtered.bam ${size} ## FASTQ - samtools fastq -tn ${libraryid}.unmapped.bam | pigz -p ${task.cpus} > ${libraryid}.unmapped.fastq.gz + samtools fastq -tN ${libraryid}.unmapped.bam | pigz -p ${task.cpus} > ${libraryid}.unmapped.fastq.gz """ } }