From 83003fc315e8041cec3248e6d5ec153560e43f97 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Fri, 26 Jan 2024 09:48:41 +0100 Subject: [PATCH 1/4] Add error message to template with link to docs on 'resource available memory' error message --- CHANGELOG.md | 3 ++- nf_core/pipeline-template/workflows/pipeline.nf | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ea7986b93..ac354d0586 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,8 @@ - switch to new image syntax in readme ([#2645](https://github.com/nf-core/tools/pull/2645)) - Add conda channel order to nextflow.config ([#2094](https://github.com/nf-core/tools/pull/2094)) - Fix tyop in pipeline nextflow.config ([#2664](https://github.com/nf-core/tools/pull/2664)) -- add function to check `-profile` is well formatted ([#2678](https://github.com/nf-core/tools/pull/2678)) +- Add function to check `-profile` is well formatted ([#2678](https://github.com/nf-core/tools/pull/2678)) +- Add new error message pointing to docs when 'requirement exceeds available memory' error message ([#2680](https://github.com/nf-core/tools/pull/2680)) ### Download diff --git a/nf_core/pipeline-template/workflows/pipeline.nf b/nf_core/pipeline-template/workflows/pipeline.nf index 558e9a1f9f..7cfbb39ef7 100644 --- a/nf_core/pipeline-template/workflows/pipeline.nf +++ b/nf_core/pipeline-template/workflows/pipeline.nf @@ -127,6 +127,13 @@ workflow.onComplete { } } +workflow.onError { + if (workflow.errorReport.contains("Process requirement exceeds available memory")) { + println("🛑 Default resources exceed availability 🛑 ") + println "💡 See here on how to configure pipeline: https://nf-co.re/docs/usage/configuration#tuning-workflow-resources 💡" + } +} + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ THE END From cc5173fbe40823cce1a998227788b95f79caf991 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Fri, 26 Jan 2024 09:49:48 +0100 Subject: [PATCH 2/4] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac354d0586..b09752f958 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ - Add conda channel order to nextflow.config ([#2094](https://github.com/nf-core/tools/pull/2094)) - Fix tyop in pipeline nextflow.config ([#2664](https://github.com/nf-core/tools/pull/2664)) - Add function to check `-profile` is well formatted ([#2678](https://github.com/nf-core/tools/pull/2678)) -- Add new error message pointing to docs when 'requirement exceeds available memory' error message ([#2680](https://github.com/nf-core/tools/pull/2680)) +- Add new pipeline error message pointing to docs when 'requirement exceeds available memory' error message ([#2680](https://github.com/nf-core/tools/pull/2680)) ### Download From 4d85614d6928bec815b736ad9df1ab048fd8a251 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Fri, 26 Jan 2024 09:51:32 +0100 Subject: [PATCH 3/4] Linting --- nf_core/pipeline-template/workflows/pipeline.nf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nf_core/pipeline-template/workflows/pipeline.nf b/nf_core/pipeline-template/workflows/pipeline.nf index 7cfbb39ef7..8236035d45 100644 --- a/nf_core/pipeline-template/workflows/pipeline.nf +++ b/nf_core/pipeline-template/workflows/pipeline.nf @@ -128,10 +128,10 @@ workflow.onComplete { } workflow.onError { - if (workflow.errorReport.contains("Process requirement exceeds available memory")) { - println("🛑 Default resources exceed availability 🛑 ") - println "💡 See here on how to configure pipeline: https://nf-co.re/docs/usage/configuration#tuning-workflow-resources 💡" - } + if (workflow.errorReport.contains("Process requirement exceeds available memory")) { + println("🛑 Default resources exceed availability 🛑 ") + println "💡 See here on how to configure pipeline: https://nf-co.re/docs/usage/configuration#tuning-workflow-resources 💡" + } } /* From 855e22ef30d2536270134a65421020ae504de71c Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Fri, 26 Jan 2024 11:08:29 +0100 Subject: [PATCH 4/4] Update pipeline.nf --- nf_core/pipeline-template/workflows/pipeline.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/pipeline-template/workflows/pipeline.nf b/nf_core/pipeline-template/workflows/pipeline.nf index 8236035d45..4583f2a9d6 100644 --- a/nf_core/pipeline-template/workflows/pipeline.nf +++ b/nf_core/pipeline-template/workflows/pipeline.nf @@ -130,7 +130,7 @@ workflow.onComplete { workflow.onError { if (workflow.errorReport.contains("Process requirement exceeds available memory")) { println("🛑 Default resources exceed availability 🛑 ") - println "💡 See here on how to configure pipeline: https://nf-co.re/docs/usage/configuration#tuning-workflow-resources 💡" + println("💡 See here on how to configure pipeline: https://nf-co.re/docs/usage/configuration#tuning-workflow-resources 💡") } }