diff --git a/CHANGELOG.md b/CHANGELOG.md index 156f76aae3..261730d4a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- [#1541](https://github.com/nf-core/sarek/pull/1541) - Getting bam and bai published in the same folder - [#1542](https://github.com/nf-core/sarek/pull/1542) - Removing legacy configs of `CUSTOM_DUMPSOFTWAREVERSIONS` ### Removed diff --git a/workflows/sarek/main.nf b/workflows/sarek/main.nf index 0f13d7e424..1d94174476 100644 --- a/workflows/sarek/main.nf +++ b/workflows/sarek/main.nf @@ -253,6 +253,12 @@ workflow SAREK { } .set { reads_grouping_key } + reads_for_alignment = reads_for_alignment.map{ meta, reads -> + // Update meta.id to meta.sample no multiple lanes or splitted fastqs + if (meta.size * meta.num_lanes == 1) [ meta + [ id:meta.sample ], reads ] + else [ meta, reads ] + } + // reads will be sorted sort_bam = true FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON(reads_for_alignment, index_alignment, sort_bam, fasta, fasta_fai)