From 2e936fdb40c7af00f0ab8df7587bb839868f26d8 Mon Sep 17 00:00:00 2001 From: Matthias Zepper Date: Wed, 14 Jun 2023 17:01:29 +0200 Subject: [PATCH 1/2] Display a warning when '--star_extra_alignment_args' are used in combination with the STAR-RSEM route. --- CHANGELOG.md | 6 ++++++ lib/WorkflowRnaseq.groovy | 16 ++++++++++++++++ nextflow_schema.json | 2 +- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index daae6c447..13d0707a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## v3.13.0dev - [date] + +### Enhancements & fixes + +- [PR #1049](https://github.com/nf-core/rnaseq/pull/1049) - RSEM imposes own arguments to STAR, therefore `--star_extra_alignment_args` are ignored for this route. A warning is displayed when both are used together. + ## [[3.12.0](https://github.com/nf-core/rnaseq/releases/tag/3.12.0)] - 2023-06-02 ### Credits diff --git a/lib/WorkflowRnaseq.groovy b/lib/WorkflowRnaseq.groovy index 08d684e77..ed2f4356a 100755 --- a/lib/WorkflowRnaseq.groovy +++ b/lib/WorkflowRnaseq.groovy @@ -86,6 +86,9 @@ class WorkflowRnaseq { if (params.rsem_index && params.star_index) { rsemStarIndexWarn(log) } + if (params.star_extra_alignment_args) { + rsemStarExtraArgumentsWarn(log) + } } // Warn if --additional_fasta provided with aligner index @@ -394,6 +397,19 @@ class WorkflowRnaseq { "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" } + // + // Print a warning if using '--aligner star_rsem' and providing '--star_extra_alignment_args' + // + private static void rsemStarExtraArgumentsWarn(log) { + log.warn "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + + " No additional arguments can be passed to STAR when using RSEM.\n" + + " Because RSEM enforces its own parameters for STAR, any extra arguments\n" + + " to STAR will be ignored. Alternatively, choose the STAR+Salmon route.\n\n" + + " This warning has been generated because you have provided both\n" + + " '--aligner star_rsem' and '--extra_star_align_args'.\n\n" + + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + } + // // Print a warning if using '--additional_fasta' and '--_index' // diff --git a/nextflow_schema.json b/nextflow_schema.json index 4bb08ed2d..e090cd02c 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -417,7 +417,7 @@ }, "extra_star_align_args": { "type": "string", - "description": "Extra arguments to pass to STAR alignment command in addition to defaults defined by the pipeline.", + "description": "Extra arguments to pass to STAR alignment command in addition to defaults defined by the pipeline. Only available for the STAR-Salmon route.", "fa_icon": "fas fa-plus" }, "extra_salmon_quant_args": { From dff30b5c3c3b065c6104539ac27fba345d58ae77 Mon Sep 17 00:00:00 2001 From: Matthias Zepper <6963520+MatthiasZepper@users.noreply.github.com> Date: Wed, 14 Jun 2023 18:20:39 +0200 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Harshil Patel --- CHANGELOG.md | 2 +- lib/WorkflowRnaseq.groovy | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13d0707a2..90cba0311 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Enhancements & fixes -- [PR #1049](https://github.com/nf-core/rnaseq/pull/1049) - RSEM imposes own arguments to STAR, therefore `--star_extra_alignment_args` are ignored for this route. A warning is displayed when both are used together. +- [PR #1049](https://github.com/nf-core/rnaseq/pull/1049) - RSEM imposes own arguments to STAR, therefore `--extra_star_align_args` are ignored for this route. A warning is displayed when both are used together. ## [[3.12.0](https://github.com/nf-core/rnaseq/releases/tag/3.12.0)] - 2023-06-02 diff --git a/lib/WorkflowRnaseq.groovy b/lib/WorkflowRnaseq.groovy index ed2f4356a..0dd946596 100755 --- a/lib/WorkflowRnaseq.groovy +++ b/lib/WorkflowRnaseq.groovy @@ -86,7 +86,7 @@ class WorkflowRnaseq { if (params.rsem_index && params.star_index) { rsemStarIndexWarn(log) } - if (params.star_extra_alignment_args) { + if (params.aligner == 'star_rsem' && params.extra_star_align_args) { rsemStarExtraArgumentsWarn(log) } }