Skip to content

Commit 2527837

Browse files
authored
Merge pull request #842 from nf-core/metascreen-message
Improve error message for metagenomic classification incorrect parameters
2 parents 2300444 + d889512 commit 2527837

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ 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
1213
- [#836](https://github.com/nf-core/eager/issues/836) Remove deprecated parameters from test profiles
1314
- [#838](https://github.com/nf-core/eager/issues/836) Fix --snpcapture_bed files not being picked up by Nextflow
1415
- Fix PMDtools reference mask not being picked up by Nextflow, and it's use being evaluated against --snpcapture_bed rather than --pmdtools_reference_mask
15-
- Renamed a range of MultiQC general stats table headers to improve clarity, documentation has been updated accordingly.
16+
- Renamed a range of MultiQC general stats table headers to improve clarity, documentation has been updated accordingly.
1617

1718
### `Dependencies`
1819

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)