Skip to content

Commit

Permalink
Merge pull request #1049 from MatthiasZepper/ExtraStarAlignArgsWarning
Browse files Browse the repository at this point in the history
Display a warning when '--star_extra_alignment_args' are used with RSEM
  • Loading branch information
drpatelh authored Jun 15, 2023
2 parents 14ba0e0 + dff30b5 commit 6636fcc
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `--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

### Credits
Expand Down
16 changes: 16 additions & 0 deletions lib/WorkflowRnaseq.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ class WorkflowRnaseq {
if (params.rsem_index && params.star_index) {
rsemStarIndexWarn(log)
}
if (params.aligner == 'star_rsem' && params.extra_star_align_args) {
rsemStarExtraArgumentsWarn(log)
}
}

// Warn if --additional_fasta provided with aligner index
Expand Down Expand Up @@ -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 '--<ALIGNER>_index'
//
Expand Down
2 changes: 1 addition & 1 deletion nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit 6636fcc

Please sign in to comment.