From 580acd4ba718c66451ced342c652f53dab117a11 Mon Sep 17 00:00:00 2001 From: Gisela Gabernet Date: Wed, 15 Mar 2023 10:32:47 +0100 Subject: [PATCH 01/10] make prediction output mandatory --- modules/local/epytope_peptide_prediction.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/local/epytope_peptide_prediction.nf b/modules/local/epytope_peptide_prediction.nf index 3b906e5..5adf23a 100644 --- a/modules/local/epytope_peptide_prediction.nf +++ b/modules/local/epytope_peptide_prediction.nf @@ -12,7 +12,7 @@ process EPYTOPE_PEPTIDE_PREDICTION { output: tuple val(meta), path("*.json"), emit: json - tuple val(meta), path("*.tsv"), emit: predicted, optional: true + tuple val(meta), path("*.tsv"), emit: predicted tuple val(meta), path("*.fasta"), emit: fasta, optional: true path "versions.yml", emit: versions From 221b7354685209e17513405558ffc9b28bb33674 Mon Sep 17 00:00:00 2001 From: Gisela Gabernet Date: Wed, 15 Mar 2023 11:05:24 +0100 Subject: [PATCH 02/10] revert versions correction --- modules/local/external_tools_import.nf | 4 +++- modules/local/get_prediction_versions.nf | 13 ++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/local/external_tools_import.nf b/modules/local/external_tools_import.nf index 560f557..46348d9 100644 --- a/modules/local/external_tools_import.nf +++ b/modules/local/external_tools_import.nf @@ -14,7 +14,7 @@ process EXTERNAL_TOOLS_IMPORT { output: path "${toolname}", emit: nonfree_tools - path "versions.yml", emit: versions + val "v_*.txt", emit: versions script: """ @@ -75,6 +75,8 @@ process EXTERNAL_TOOLS_IMPORT { # # CREATE VERSION FILE # + echo "${toolname} ${toolversion}" > "v_${toolname}.txt" + cat <<-END_VERSIONS > versions.yml ${toolname}: ${toolversion} END_VERSIONS diff --git a/modules/local/get_prediction_versions.nf b/modules/local/get_prediction_versions.nf index 2dae3b2..fcc7cf9 100644 --- a/modules/local/get_prediction_versions.nf +++ b/modules/local/get_prediction_versions.nf @@ -10,23 +10,22 @@ process GET_PREDICTION_VERSIONS { val external_tool_versions output: - path "versions.yml", emit: versions + path "versions.csv", emit: versions script: def external_tools = external_tool_versions.join(",") """ - cat <<-END_VERSIONS > versions.yml - "${task.process}": - mhcflurry: \$(mhcflurry-predict --version 2>&1 | sed 's/^mhcflurry //; s/ .*\$//') - mhcnuggets: \$(python -c "import pkg_resources; print('mhcnuggets' + pkg_resources.get_distribution('mhcnuggets').version)" | sed 's/^mhcnuggets//; s/ .*\$//' ) - epytope: \$(python -c "import pkg_resources; print('epytope' + pkg_resources.get_distribution('epytope').version)" | sed 's/^epytope//; s/ .*\$//') + cat <<-END_VERSIONS > versions.csv + mhcflurry: \$(mhcflurry-predict --version 2>&1 | sed 's/^mhcflurry //; s/ .*\$//') + mhcnuggets: \$(python -c "import pkg_resources; print('mhcnuggets' + pkg_resources.get_distribution('mhcnuggets').version)" | sed 's/^mhcnuggets//; s/ .*\$//' ) + epytope: \$(python -c "import pkg_resources; print('epytope' + pkg_resources.get_distribution('epytope').version)" | sed 's/^epytope//; s/ .*\$//') END_VERSIONS IFS=',' read -r -a external_tools <<< \"$external_tools\" if ! [ -z "${external_tool_versions}" ]; then for TOOL in "\${external_tools[@]}"; do - echo "\$TOOL" >> versions.yml + echo "\$TOOL" >> versions.csv done fi """ From 612d770e11da10bac2aaceda32073a355f0a0590 Mon Sep 17 00:00:00 2001 From: Gisela Gabernet Date: Wed, 15 Mar 2023 11:11:07 +0100 Subject: [PATCH 03/10] update changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c36c2b1..d6bd8ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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). +## v2.2.1 - WaldhaeuserOst Hotfix - 2023-03-15 + +### `Fixed` + +- [#196](https://github.com/nf-core/epitopeprediction/pull/196) - Revert versions changes that caused bug. Also made prediction not optional to make CI tests fail in case prediction files are not generated. + ## v2.2.0 - WaldhaeuserOst - 2023-03-03 ### `Added` From 439ce0acd3c79dbcd2f8566f4ae91cd99436b79c Mon Sep 17 00:00:00 2001 From: Gisela Gabernet Date: Wed, 15 Mar 2023 17:35:27 +0100 Subject: [PATCH 04/10] fix external tools prediction --- CHANGELOG.md | 2 +- modules/local/cat_files.nf | 2 +- modules/local/csvtk_concat.nf | 2 +- modules/local/epytope_peptide_prediction.nf | 2 +- modules/local/external_tools_import.nf | 3 ++- workflows/epitopeprediction.nf | 1 + 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6bd8ea..d89dc2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `Fixed` -- [#196](https://github.com/nf-core/epitopeprediction/pull/196) - Revert versions changes that caused bug. Also made prediction not optional to make CI tests fail in case prediction files are not generated. +- [#196](https://github.com/nf-core/epitopeprediction/pull/196) - Revert versions changes that caused bug with external tools predictions missing. ## v2.2.0 - WaldhaeuserOst - 2023-03-03 diff --git a/modules/local/cat_files.nf b/modules/local/cat_files.nf index dabe8e8..ee1d20d 100644 --- a/modules/local/cat_files.nf +++ b/modules/local/cat_files.nf @@ -10,7 +10,7 @@ process CAT_FILES { tuple val(meta), path(input) output: - tuple val(meta), path("*_prediction*"), emit: output + tuple val(meta), path("*_prediction{_result,_proteins}*"), emit: output path "versions.yml", emit: versions script: diff --git a/modules/local/csvtk_concat.nf b/modules/local/csvtk_concat.nf index 651afb3..ea88fe2 100644 --- a/modules/local/csvtk_concat.nf +++ b/modules/local/csvtk_concat.nf @@ -10,7 +10,7 @@ process CSVTK_CONCAT { tuple val(meta), path(predicted) output: - tuple val(meta), path("*.tsv"), emit: predicted + tuple val(meta), path("*prediction_result.tsv"), emit: predicted path "versions.yml", emit: versions script: diff --git a/modules/local/epytope_peptide_prediction.nf b/modules/local/epytope_peptide_prediction.nf index 5adf23a..3b906e5 100644 --- a/modules/local/epytope_peptide_prediction.nf +++ b/modules/local/epytope_peptide_prediction.nf @@ -12,7 +12,7 @@ process EPYTOPE_PEPTIDE_PREDICTION { output: tuple val(meta), path("*.json"), emit: json - tuple val(meta), path("*.tsv"), emit: predicted + tuple val(meta), path("*.tsv"), emit: predicted, optional: true tuple val(meta), path("*.fasta"), emit: fasta, optional: true path "versions.yml", emit: versions diff --git a/modules/local/external_tools_import.nf b/modules/local/external_tools_import.nf index 46348d9..153026c 100644 --- a/modules/local/external_tools_import.nf +++ b/modules/local/external_tools_import.nf @@ -14,7 +14,7 @@ process EXTERNAL_TOOLS_IMPORT { output: path "${toolname}", emit: nonfree_tools - val "v_*.txt", emit: versions + path "versions.yml", emit: versions script: """ @@ -78,6 +78,7 @@ process EXTERNAL_TOOLS_IMPORT { echo "${toolname} ${toolversion}" > "v_${toolname}.txt" cat <<-END_VERSIONS > versions.yml + "${task.process}": ${toolname}: ${toolversion} END_VERSIONS """ diff --git a/workflows/epitopeprediction.nf b/workflows/epitopeprediction.nf index 463ef96..fb6475c 100644 --- a/workflows/epitopeprediction.nf +++ b/workflows/epitopeprediction.nf @@ -271,6 +271,7 @@ workflow EPITOPEPREDICTION { EXTERNAL_TOOLS_IMPORT( ch_nonfree_paths ) + ch_versions = EXTERNAL_TOOLS_IMPORT.out.versions.ifEmpty([]) /* ======================================================================================== From eae478b0edc9a96fdbe87c2444ec7f7f09b18b13 Mon Sep 17 00:00:00 2001 From: Gisela Gabernet Date: Wed, 15 Mar 2023 18:13:22 +0100 Subject: [PATCH 05/10] fix version channel --- workflows/epitopeprediction.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflows/epitopeprediction.nf b/workflows/epitopeprediction.nf index fb6475c..b3d0abe 100644 --- a/workflows/epitopeprediction.nf +++ b/workflows/epitopeprediction.nf @@ -271,7 +271,7 @@ workflow EPITOPEPREDICTION { EXTERNAL_TOOLS_IMPORT( ch_nonfree_paths ) - ch_versions = EXTERNAL_TOOLS_IMPORT.out.versions.ifEmpty([]) + ch_versions = ch_versions.mix(EXTERNAL_TOOLS_IMPORT.out.versions.ifEmpty([])) /* ======================================================================================== From de571ab5e7039a0e9fc88915cd8848d58878145a Mon Sep 17 00:00:00 2001 From: Gisela Gabernet Date: Wed, 15 Mar 2023 18:29:15 +0100 Subject: [PATCH 06/10] fix versions --- workflows/epitopeprediction.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflows/epitopeprediction.nf b/workflows/epitopeprediction.nf index b3d0abe..6108cdb 100644 --- a/workflows/epitopeprediction.nf +++ b/workflows/epitopeprediction.nf @@ -271,7 +271,7 @@ workflow EPITOPEPREDICTION { EXTERNAL_TOOLS_IMPORT( ch_nonfree_paths ) - ch_versions = ch_versions.mix(EXTERNAL_TOOLS_IMPORT.out.versions.ifEmpty([])) + ch_versions = ch_versions.mix(EXTERNAL_TOOLS_IMPORT.out.versions.ifEmpty(null)) /* ======================================================================================== From 0413796d0ef5174bcab544cd203251a052283545 Mon Sep 17 00:00:00 2001 From: ggabernet Date: Thu, 16 Mar 2023 12:27:13 +0100 Subject: [PATCH 07/10] rm versions.txt --- modules/local/external_tools_import.nf | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/local/external_tools_import.nf b/modules/local/external_tools_import.nf index 153026c..a9cd0e7 100644 --- a/modules/local/external_tools_import.nf +++ b/modules/local/external_tools_import.nf @@ -75,7 +75,6 @@ process EXTERNAL_TOOLS_IMPORT { # # CREATE VERSION FILE # - echo "${toolname} ${toolversion}" > "v_${toolname}.txt" cat <<-END_VERSIONS > versions.yml "${task.process}": From 37f78a5cc177cf7d9523784734798b6d2c30c781 Mon Sep 17 00:00:00 2001 From: ggabernet Date: Thu, 16 Mar 2023 12:28:34 +0100 Subject: [PATCH 08/10] add comment --- modules/local/get_prediction_versions.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/local/get_prediction_versions.nf b/modules/local/get_prediction_versions.nf index fcc7cf9..8538994 100644 --- a/modules/local/get_prediction_versions.nf +++ b/modules/local/get_prediction_versions.nf @@ -10,7 +10,7 @@ process GET_PREDICTION_VERSIONS { val external_tool_versions output: - path "versions.csv", emit: versions + path "versions.csv", emit: versions // this versions.csv is needed by a downstream process as well. TODO: fix to use versions.yml script: def external_tools = external_tool_versions.join(",") From b3a47178a2611219e1f893694073b7b36b8ec6cc Mon Sep 17 00:00:00 2001 From: ggabernet Date: Thu, 16 Mar 2023 15:29:51 +0100 Subject: [PATCH 09/10] bump version to 2.2.1 --- nextflow.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextflow.config b/nextflow.config index b5c9094..03c191a 100644 --- a/nextflow.config +++ b/nextflow.config @@ -238,7 +238,7 @@ manifest { description = """A fully reproducible and state of the art epitope prediction pipeline.""" mainScript = 'main.nf' nextflowVersion = '!>=22.10.1' - version = '2.2.0' + version = '2.2.1' doi = '' } From 624a7fdf2fb6ad7f8baa1176780ac17240697a3e Mon Sep 17 00:00:00 2001 From: ggabernet Date: Thu, 16 Mar 2023 15:31:31 +0100 Subject: [PATCH 10/10] update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d89dc2e..e898808 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ 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). -## v2.2.1 - WaldhaeuserOst Hotfix - 2023-03-15 +## v2.2.1 - WaldhaeuserOst Hotfix - 2023-03-16 ### `Fixed`