Skip to content

Commit 99ae64d

Browse files
committed
Improve error message
1 parent 1b6dff8 commit 99ae64d

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
99

1010
### `Fixed`
1111

12+
- [#828](https://github.com/nf-core/eager/issues/828) Improved error message if required metagenomic screening parameters not set correctly
13+
1214
### `Dependencies`
1315

1416
### `Deprecated`

main.nf

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,13 @@ if (params.run_multivcfanalyzer) {
107107
}
108108

109109
if (params.run_metagenomic_screening) {
110-
if ( params.bam_unmapped_type == "discard" ) {
111-
exit 1, "[nf-core/eager] error: metagenomic classification can only run on unmapped reads. Please supply --bam_unmapped_type 'fastq'. Supplied: --bam_unmapped_type '${params.bam_unmapped_type}'."
110+
111+
if ( !params.run_bam_filtering ) {
112+
exit 1, "[nf-core/eager] error: metagenomic classification can only run on unmapped reads. Please supply --run_bam_filtering --bam_unmapped_type 'fastq'."
112113
}
113114

114-
if (params.bam_unmapped_type != 'fastq' ) {
115-
exit 1, "[nf-core/eager] error: metagenomic classification can only run on unmapped reads in FASTQ format. Please supply --bam_unmapped_type 'fastq'. Found parameter: --bam_unmapped_type '${params.bam_unmapped_type}'."
115+
if ( params.bam_unmapped_type != "fastq" ) {
116+
exit 1, "[nf-core/eager] error: metagenomic classification can only run on unmapped reads. Please supply --bam_unmapped_type 'fastq'. Supplied: --bam_unmapped_type '${params.bam_unmapped_type}'."
116117
}
117118

118119
if (!params.database) {

0 commit comments

Comments
 (0)