diff --git a/CHANGELOG.md b/CHANGELOG.md index 92bb9642..e1250b27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#523](https://github.com/nf-core/taxprofiler/pull/523) Removed hardcoded `-m lca` from GANON_CLASSIFY due to more options in new version of ganon (fixed by @LilyAnderssonLee & @jfy133) - [#531](https://github.com/nf-core/taxprofiler/pull/531) Fix FASTA input validation in schema allowing FASTQ extension, expand allowed FASTA extensions (fixed by @jfy133) - [#512](https://github.com/nf-core/taxprofiler/pull/532) Minor formatting and ordering improvements in MultiQC report (by @jfy133) +- [#532](https://github.com/nf-core/taxprofiler/pull/532) - Added missing documentation behind the 'ignore' BRACKEN_BRACKEN error strategy (❤️ to @Mavti for reporting, fixed by @jfy133) ### `Dependencies` diff --git a/docs/usage/faq-troubleshooting.md b/docs/usage/faq-troubleshooting.md index 3c80725d..5692cc50 100644 --- a/docs/usage/faq-troubleshooting.md +++ b/docs/usage/faq-troubleshooting.md @@ -1,9 +1,31 @@ # Troubleshooting and FAQs -## I get a warning during centrifuge_kreport process with exit status 255 +## I get a warning during CENTRIFUGE_KREPORT or KRAKENTOOLS_COMBINEKREPORTS_CENTRIFUGE process with exit status 255 When a sample has insufficient hits for abundance estimation, the resulting `report.txt` file will be empty. -When trying to convert this to a kraken-style report, the conversion tool will exit with a status code `255`, and provide a `WARN`. +When trying to convert this to a kraken-style report or merging together, the tools will exit with a status code `255`, and provide a `WARN`. -This is _not_ an error nor a failure of the pipeline, just your sample has no hits to the provided database when using centrifuge. +This is _not_ an error nor a failure of the pipeline, just your sample has no hits to the provided database when using Centrifuge. + +## Why does any error or failed process from BRACKEN_BRACKEN get ignored? + +If Kraken2 doesn't classify any reads (100% unclassified) Bracken will fail on that input. +Having no reads taxonomically classified can be a reasonable outcome for some samples, and we don't want to treat this as an error. + +Therefore to allow the remainder of a given run to complete if a single Bracken task fails, [we set the Nextflow `errorStrategy` to `ignore`](https://github.com/nf-core/taxprofiler/blob/5d3ee5513a84f92773c8376c55b5f4da39835307/conf/base.config#L61-L63). +You will still get a warning in the Nextflow console output and log that a Bracken task failed. + +If you want to change this behaviour, you can override the `errorStrategy` in your own Nextflow configuration file. + +For example: + +```nextflow +process { + withName: BRACKEN_BRACKEN { + errorStrategy = 'retry' + } +} +``` + +Other `errorStrategy` options can be found on the [Nextflow documentation](https://www.nextflow.io/docs/latest/process.html#errorstrategy). diff --git a/nextflow.config b/nextflow.config index 9d4ff993..50295bc2 100644 --- a/nextflow.config +++ b/nextflow.config @@ -314,20 +314,19 @@ profiles { executor.cpus = 4 executor.memory = 8.GB } - test { includeConfig 'conf/test.config' } - test_full { includeConfig 'conf/test_full.config' } - test_noprofiling { includeConfig 'conf/test_noprofiling.config' } - test_nopreprocessing { includeConfig 'conf/test_nopreprocessing.config' } - test_nothing { includeConfig 'conf/test_nothing.config' } - test_motus { includeConfig 'conf/test_motus.config' } - test_krakenuniq { includeConfig 'conf/test_krakenuniq.config' } - test_malt { includeConfig 'conf/test_malt.config' } - test_falco { includeConfig 'conf/test_falco.config' } - test_fastp { includeConfig 'conf/test_fastp.config' } + test { includeConfig 'conf/test.config' } + test_full { includeConfig 'conf/test_full.config' } + test_noprofiling { includeConfig 'conf/test_noprofiling.config' } + test_nopreprocessing { includeConfig 'conf/test_nopreprocessing.config' } + test_nothing { includeConfig 'conf/test_nothing.config' } + test_motus { includeConfig 'conf/test_motus.config' } + test_krakenuniq { includeConfig 'conf/test_krakenuniq.config' } + test_malt { includeConfig 'conf/test_malt.config' } + test_falco { includeConfig 'conf/test_falco.config' } + test_fastp { includeConfig 'conf/test_fastp.config' } test_alternativepreprocessing { includeConfig 'conf/test_alternativepreprocessing.config' } - test_bbduk { includeConfig 'conf/test_bbduk.config' } - test_prinseqplusplus { includeConfig 'conf/test_prinseqplusplus.config' } - + test_bbduk { includeConfig 'conf/test_bbduk.config' } + test_prinseqplusplus { includeConfig 'conf/test_prinseqplusplus.config' } } // Set default registry for Apptainer, Docker, Podman and Singularity independent of -profile diff --git a/subworkflows/local/longread_preprocessing.nf b/subworkflows/local/longread_preprocessing.nf index 3b25879d..8b1590dc 100644 --- a/subworkflows/local/longread_preprocessing.nf +++ b/subworkflows/local/longread_preprocessing.nf @@ -39,7 +39,6 @@ workflow LONGREAD_PREPROCESSING { FASTQC_PROCESSED ( ch_processed_reads ) ch_versions = ch_versions.mix( FASTQC_PROCESSED.out.versions ) ch_multiqc_files = ch_multiqc_files.mix( FASTQC_PROCESSED.out.zip ) - } else if (params.preprocessing_qc_tool == 'falco') { FALCO_PROCESSED ( ch_processed_reads ) ch_versions = ch_versions.mix( FALCO_PROCESSED.out.versions ) diff --git a/subworkflows/local/utils_nfcore_taxprofiler_pipeline/main.nf b/subworkflows/local/utils_nfcore_taxprofiler_pipeline/main.nf index 9a224154..9b4f6df5 100644 --- a/subworkflows/local/utils_nfcore_taxprofiler_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_taxprofiler_pipeline/main.nf @@ -211,7 +211,7 @@ def toolCitationText() { "Long read preprocessing was performed with:", params.longread_adapterremoval_tool == "porechop_abi" ? "Porechop_ABI (Bonenfant et al. 2023)," : "", params.longread_adapterremoval_tool == "porechop" ? "Porechop (Wick et al. 2017)," : "", - params.longread_filter_tool == "filtlong" ? "Filtlong (Wick 2021)," : "", + params.longread_filter_tool == "filtlong" ? "Filtlong (Wick 2021)." : "", params.longread_filter_tool == "nanoq" ? "Nanoq (Steinig and Coin 2022)." : "", ].join(' ').trim()