From 303116bc7fd311c61d505833c2caa51da39c9b40 Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Fri, 8 May 2026 12:02:13 +0100 Subject: [PATCH 1/2] fix(mqc): use active aligner display name for fail_mapped header Plumb an aligner_display_name string from RNASEQ into MULTIQC_RNASEQ so the fail_mapped per-sample TSV header reflects the metric the active aligner actually emits, instead of always saying "STAR uniquely mapped reads (%)". Also drop the hardcoded "STAR" reference from the pipeline-completion warning that flags samples below min_mapped_reads. Closes #1846 Co-Authored-By: Claude Opus 4.7 (1M context) --- CHANGELOG.md | 1 + subworkflows/local/multiqc_rnaseq/main.nf | 3 ++- .../local/utils_nfcore_rnaseq_pipeline/main.nf | 2 +- workflows/rnaseq/main.nf | 10 ++++++++++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 248ffe38d..639b48fea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Enhancements and fixes - [PR #1844](https://github.com/nf-core/rnaseq/pull/1844) - Bump version to 3.27.0dev after release 3.26.0; flip the MultiQC report links and RO-Crate URL/version back to dev +- [PR #XXXX](https://github.com/nf-core/rnaseq/pull/XXXX) - Use the active aligner's display name in the MultiQC `fail_mapped` per-sample status row, and drop the hardcoded "STAR" reference from the pipeline-completion `min_mapped_reads` warning, so Bowtie2 reports no longer mislabel the metric as STAR ([#1846](https://github.com/nf-core/rnaseq/issues/1846)) ## [[3.26.0](https://github.com/nf-core/rnaseq/releases/tag/3.26.0)] - 2026-05-07 diff --git a/subworkflows/local/multiqc_rnaseq/main.nf b/subworkflows/local/multiqc_rnaseq/main.nf index 1af5e8e46..90f7825f6 100644 --- a/subworkflows/local/multiqc_rnaseq/main.nf +++ b/subworkflows/local/multiqc_rnaseq/main.nf @@ -18,6 +18,7 @@ workflow MULTIQC_RNASEQ { ch_strand_data // channel: [ val(meta), provided, status, salmon, rseqc ] - per-sample strand classification, used for the Strandedness checks section ch_trim_read_count // channel: [ val(meta), val(num_reads) ] - for fail_trimmed section ch_percent_mapped_pass // channel: [ id, percent_mapped, pass ] - for fail_mapped section + aligner_display_name // string: display name of the aligner used for the percent_mapped metric, e.g. 'STAR uniquely mapped reads' or 'Bowtie2 overall alignment rate' ch_fastq // channel: [ val(meta), [ reads ] ] ch_collated_versions // channel: path(versions yaml) samplesheet_path // path: pipeline input samplesheet @@ -73,7 +74,7 @@ workflow MULTIQC_RNASEQ { .collectFile { id, percent_mapped, _pass -> [ "${id}_fail_mapped_samples_mqc.tsv", - sample_status_header.text + "Sample\tSTAR uniquely mapped reads (%)\n${id}\t${percent_mapped}\n", + sample_status_header.text + "Sample\t${aligner_display_name} (%)\n${id}\t${percent_mapped}\n", ] } .map { f -> [f.baseName.replace('_fail_mapped_samples_mqc', ''), f] } diff --git a/subworkflows/local/utils_nfcore_rnaseq_pipeline/main.nf b/subworkflows/local/utils_nfcore_rnaseq_pipeline/main.nf index a810e053f..56590c049 100644 --- a/subworkflows/local/utils_nfcore_rnaseq_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_rnaseq_pipeline/main.nf @@ -878,7 +878,7 @@ def rnaseqSummary(monochrome_logs=true, pass_mapped_reads=[:], pass_trimmed_read log.info "-${colors.purple}[$workflow.manifest.name]${colors.red} Please check MultiQC report: ${fail_trimmed_count}/${pass_trimmed_reads.size()} samples skipped since they failed ${params.min_trimmed_reads} trimmed read threshold.${colors.reset}-" } if (fail_mapped_count > 0) { - log.info "-${colors.purple}[$workflow.manifest.name]${colors.red} Please check MultiQC report: ${fail_mapped_count}/${pass_mapped_reads.size()} samples skipped since they failed STAR ${params.min_mapped_reads}% mapped threshold.${colors.reset}-" + log.info "-${colors.purple}[$workflow.manifest.name]${colors.red} Please check MultiQC report: ${fail_mapped_count}/${pass_mapped_reads.size()} samples skipped since they failed the ${params.min_mapped_reads}% mapped threshold.${colors.reset}-" } if (fail_strand_count > 0) { log.info "-${colors.purple}[$workflow.manifest.name]${colors.red} Please check MultiQC report: ${fail_strand_count}/${pass_strand_check.size()} samples failed strandedness check.${colors.reset}-" diff --git a/workflows/rnaseq/main.nf b/workflows/rnaseq/main.nf index 8a7e2aaa6..796c36c07 100755 --- a/workflows/rnaseq/main.nf +++ b/workflows/rnaseq/main.nf @@ -99,6 +99,15 @@ workflow RNASEQ { def ch_biotypes_header_multiqc = file("$projectDir/workflows/rnaseq/assets/multiqc/biotypes_header.txt", checkIfExists: true) def ch_transcript_fasta_placeholder = ch_pca_header_multiqc + // Match the General Statistics column the active aligner emits so the + // MultiQC fail_mapped row reads consistently with the rest of the report. + def aligner_display_name = [ + 'star_salmon' : 'STAR uniquely mapped reads', + 'star_rsem' : 'STAR uniquely mapped reads', + 'hisat2' : 'HISAT2 overall alignment rate', + 'bowtie2_salmon' : 'Bowtie2 overall alignment rate', + ].get(params.aligner, 'Aligned reads') + // Pre-build fasta_fai value channels for subworkflows that need [meta, fasta, fai] // .first() converts the queue channel to a value channel so it can be consumed multiple times ch_fasta_fai = ch_fasta.combine(ch_fai).map { fasta, fai -> [ [:], fasta, fai ] }.first() @@ -809,6 +818,7 @@ workflow RNASEQ { ch_strand_data, ch_trim_read_count, ch_genome_bam_bai_mapping.percent_mapped_pass, + aligner_display_name, ch_fastq, ch_collated_versions, params.input, From 867f51e67f779a4ce7b86af1335080fd4a46a11f Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Fri, 8 May 2026 12:02:41 +0100 Subject: [PATCH 2/2] docs(changelog): backfill PR number for #1846 fix [skip ci] Co-Authored-By: Claude Opus 4.7 (1M context) --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 639b48fea..0f714049a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Enhancements and fixes - [PR #1844](https://github.com/nf-core/rnaseq/pull/1844) - Bump version to 3.27.0dev after release 3.26.0; flip the MultiQC report links and RO-Crate URL/version back to dev -- [PR #XXXX](https://github.com/nf-core/rnaseq/pull/XXXX) - Use the active aligner's display name in the MultiQC `fail_mapped` per-sample status row, and drop the hardcoded "STAR" reference from the pipeline-completion `min_mapped_reads` warning, so Bowtie2 reports no longer mislabel the metric as STAR ([#1846](https://github.com/nf-core/rnaseq/issues/1846)) +- [PR #1850](https://github.com/nf-core/rnaseq/pull/1850) - Use the active aligner's display name in the MultiQC `fail_mapped` per-sample status row, and drop the hardcoded "STAR" reference from the pipeline-completion `min_mapped_reads` warning, so Bowtie2 reports no longer mislabel the metric as STAR ([#1846](https://github.com/nf-core/rnaseq/issues/1846)) ## [[3.26.0](https://github.com/nf-core/rnaseq/releases/tag/3.26.0)] - 2026-05-07