From f59ba77a2af0903abe0bbe38fcfd53b9870d8640 Mon Sep 17 00:00:00 2001 From: itrujnara Date: Tue, 7 May 2024 11:28:35 +0200 Subject: [PATCH 01/12] Linting fix - subworkflow versions --- modules.json | 6 +-- .../tests/main.function.nf.test | 2 +- .../tests/main.function.nf.test.snap | 12 +++++- .../tests/main.workflow.nf.test | 20 ++------- .../tests/nextflow.config | 2 +- .../nf-core/utils_nfcore_pipeline/main.nf | 8 +++- .../tests/main.function.nf.test.snap | 42 +++++++++++++++---- .../tests/main.workflow.nf.test.snap | 6 ++- .../tests/main.nf.test | 2 +- 9 files changed, 67 insertions(+), 33 deletions(-) diff --git a/modules.json b/modules.json index 1e87009..1b6165a 100644 --- a/modules.json +++ b/modules.json @@ -51,17 +51,17 @@ "nf-core": { "utils_nextflow_pipeline": { "branch": "master", - "git_sha": "cd08c91373cd00a73255081340e4914485846ba1", + "git_sha": "5caf7640a9ef1d18d765d55339be751bb0969dfa", "installed_by": ["subworkflows"] }, "utils_nfcore_pipeline": { "branch": "master", - "git_sha": "262b17ed2aad591039f914951659177e6c39a8d8", + "git_sha": "92de218a329bfc9a9033116eb5f65fd270e72ba3", "installed_by": ["subworkflows"] }, "utils_nfvalidation_plugin": { "branch": "master", - "git_sha": "cd08c91373cd00a73255081340e4914485846ba1", + "git_sha": "5caf7640a9ef1d18d765d55339be751bb0969dfa", "installed_by": ["subworkflows"] } } diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test b/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test index 8ed4310..68718e4 100644 --- a/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test +++ b/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test @@ -51,4 +51,4 @@ nextflow_function { ) } } -} \ No newline at end of file +} diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test.snap b/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test.snap index db2030f..e3f0baf 100644 --- a/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test.snap +++ b/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test.snap @@ -3,10 +3,18 @@ "content": [ "v9.9.9" ], - "timestamp": "2024-01-19T11:32:36.031083" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:02:05.308243" }, "Test Function checkCondaChannels": { "content": null, - "timestamp": "2024-01-19T11:32:50.456" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:02:12.425833" } } \ No newline at end of file diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.workflow.nf.test b/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.workflow.nf.test index f7c54bc..ca964ce 100644 --- a/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.workflow.nf.test +++ b/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.workflow.nf.test @@ -11,9 +11,6 @@ nextflow_workflow { test("Should run no inputs") { when { - params { - outdir = "tests/results" - } workflow { """ print_version = false @@ -39,9 +36,6 @@ nextflow_workflow { test("Should print version") { when { - params { - outdir = "tests/results" - } workflow { """ print_version = true @@ -68,19 +62,16 @@ nextflow_workflow { test("Should dump params") { when { - params { - outdir = "$outputDir" - } workflow { """ print_version = false dump_parameters = true - outdir = params.outdir + outdir = 'results' check_conda_channels = false input[0] = false input[1] = true - input[2] = params.outdir + input[2] = outdir input[3] = false """ } @@ -96,19 +87,16 @@ nextflow_workflow { test("Should not create params JSON if no output directory") { when { - params { - outdir = "$outputDir" - } workflow { """ print_version = false dump_parameters = true - outdir = params.outdir + outdir = null check_conda_channels = false input[0] = false input[1] = true - input[2] = null + input[2] = outdir input[3] = false """ } diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config b/subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config index 53574ff..d0a926b 100644 --- a/subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config +++ b/subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config @@ -6,4 +6,4 @@ manifest { nextflowVersion = '!>=23.04.0' version = '9.9.9' doi = 'https://doi.org/10.5281/zenodo.5070524' -} \ No newline at end of file +} diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf index a8b55d6..14558c3 100644 --- a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf +++ b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf @@ -65,9 +65,15 @@ def checkProfileProvided(nextflow_cli_args) { // Citation string for pipeline // def workflowCitation() { + def temp_doi_ref = "" + String[] manifest_doi = workflow.manifest.doi.tokenize(",") + // Using a loop to handle multiple DOIs + // Removing `https://doi.org/` to handle pipelines using DOIs vs DOI resolvers + // Removing ` ` since the manifest.doi is a string and not a proper list + for (String doi_ref: manifest_doi) temp_doi_ref += " https://doi.org/${doi_ref.replace('https://doi.org/', '').replace(' ', '')}\n" return "If you use ${workflow.manifest.name} for your analysis please cite:\n\n" + "* The pipeline\n" + - " ${workflow.manifest.doi}\n\n" + + temp_doi_ref + "\n" + "* The nf-core framework\n" + " https://doi.org/10.1038/s41587-020-0439-x\n\n" + "* Software dependencies\n" + diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test.snap b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test.snap index 10f948e..1037232 100644 --- a/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test.snap +++ b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test.snap @@ -1,25 +1,41 @@ { "Test Function checkProfileProvided": { "content": null, - "timestamp": "2024-02-09T15:43:55.145717" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:03:03.360873" }, "Test Function checkConfigProvided": { "content": [ true ], - "timestamp": "2024-01-19T11:34:13.548431224" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:02:59.729647" }, "Test Function nfCoreLogo": { "content": [ "\n\n-\u001b[2m----------------------------------------------------\u001b[0m-\n \u001b[0;32m,--.\u001b[0;30m/\u001b[0;32m,-.\u001b[0m\n\u001b[0;34m ___ __ __ __ ___ \u001b[0;32m/,-._.--~'\u001b[0m\n\u001b[0;34m |\\ | |__ __ / ` / \\ |__) |__ \u001b[0;33m} {\u001b[0m\n\u001b[0;34m | \\| | \\__, \\__/ | \\ |___ \u001b[0;32m\\`-._,-`-,\u001b[0m\n \u001b[0;32m`._,._,'\u001b[0m\n\u001b[0;35m nextflow_workflow v9.9.9\u001b[0m\n-\u001b[2m----------------------------------------------------\u001b[0m-\n" ], - "timestamp": "2024-01-19T11:34:38.840454873" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:03:10.562934" }, "Test Function workflowCitation": { "content": [ "If you use nextflow_workflow for your analysis please cite:\n\n* The pipeline\n https://doi.org/10.5281/zenodo.5070524\n\n* The nf-core framework\n https://doi.org/10.1038/s41587-020-0439-x\n\n* Software dependencies\n https://github.com/nextflow_workflow/blob/master/CITATIONS.md" ], - "timestamp": "2024-01-19T11:34:22.24352016" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:03:07.019761" }, "Test Function without logColours": { "content": [ @@ -73,13 +89,21 @@ "biwhite": "" } ], - "timestamp": "2024-01-19T11:35:04.418416984" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:03:17.969323" }, "Test Function dashedLine": { "content": [ "-\u001b[2m----------------------------------------------------\u001b[0m-" ], - "timestamp": "2024-01-19T11:34:55.420000755" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:03:14.366181" }, "Test Function with logColours": { "content": [ @@ -133,6 +157,10 @@ "biwhite": "\u001b[1;97m" } ], - "timestamp": "2024-01-19T11:35:13.436366565" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:03:21.714424" } } \ No newline at end of file diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test.snap b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test.snap index d07ce54..859d103 100644 --- a/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test.snap +++ b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test.snap @@ -10,6 +10,10 @@ ] } ], - "timestamp": "2024-01-19T11:35:22.538940073" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:03:25.726491" } } \ No newline at end of file diff --git a/subworkflows/nf-core/utils_nfvalidation_plugin/tests/main.nf.test b/subworkflows/nf-core/utils_nfvalidation_plugin/tests/main.nf.test index 517ee54..5784a33 100644 --- a/subworkflows/nf-core/utils_nfvalidation_plugin/tests/main.nf.test +++ b/subworkflows/nf-core/utils_nfvalidation_plugin/tests/main.nf.test @@ -197,4 +197,4 @@ nextflow_workflow { ) } } -} \ No newline at end of file +} From 45e46c2f4ef518bd007cb716dd75478e69efaa56 Mon Sep 17 00:00:00 2001 From: itrujnara Date: Tue, 7 May 2024 11:29:04 +0200 Subject: [PATCH 02/12] Version bump to 1.0.0 --- assets/multiqc_config.yml | 4 ++-- nextflow.config | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml index 355469b..79971ec 100644 --- a/assets/multiqc_config.yml +++ b/assets/multiqc_config.yml @@ -1,7 +1,7 @@ report_comment: > - This report has been generated by the nf-core/reportho + This report has been generated by the nf-core/reportho analysis pipeline. For information about how to interpret these results, please see the - documentation. + documentation. report_section_order: "nf-core-reportho-methods-description": order: -1000 diff --git a/nextflow.config b/nextflow.config index 6c195f4..b71a083 100644 --- a/nextflow.config +++ b/nextflow.config @@ -244,7 +244,7 @@ manifest { description = """A pipeline for ortholog fetching and analysis""" mainScript = 'main.nf' nextflowVersion = '!>=23.04.0' - version = '1.0dev' + version = '1.0.0' doi = '' } From 235a872f991b909b4b9a72e9e9f242655aa771a4 Mon Sep 17 00:00:00 2001 From: itrujnara Date: Tue, 7 May 2024 11:35:01 +0200 Subject: [PATCH 03/12] Removed dev note from readme --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index 0186d5b..c959964 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,6 @@ ## Introduction -> [!WARNING] -> This pipeline is still in active development. While the overall design will remain stable, all technical details, such as parameter names, are subject to change without notice. - **nf-core/reportho** is a bioinformatics pipeline that compares and assembles orthology predictions for a query protein. It fetches ortholog lists for a query (or its closest annotated homolog) from public sources, calculates pairwise and global agreement, and generates a consensus list with the desired level of confidence. Optionally, it offers common analysis on the consensus orthologs, such as MSA and phylogeny reconstruction. Additionally, it generates a clean, human-readable report of the results. From 44c834837989c84a3cbc559947bb2c051b0df5f0 Mon Sep 17 00:00:00 2001 From: itrujnara Date: Tue, 7 May 2024 11:51:49 +0200 Subject: [PATCH 04/12] Bug fix - React version reporting --- modules/local/make_report.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/local/make_report.nf b/modules/local/make_report.nf index 4d5aacd..88b657c 100644 --- a/modules/local/make_report.nf +++ b/modules/local/make_report.nf @@ -55,7 +55,7 @@ process MAKE_REPORT { ${task.process}: Node: \$(node --version) Yarn: \$(yarn --version) - React: \$(yarn view react version) + React: \$(yarn info react version | cut -d $'\n' -f 2) Python: \$(python --version | cut -d ' ' -f 2) END_VERSIONS """ From 8d0dc1100e092916dd7a84ada525eb8f98361ff9 Mon Sep 17 00:00:00 2001 From: itrujnara Date: Tue, 7 May 2024 11:59:51 +0200 Subject: [PATCH 05/12] Updated changelog --- CHANGELOG.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 21c5a73..99e97fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,14 +3,64 @@ 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). -## v1.0dev - [date] +## [1.0.0](https://github.com/nf-core/reportho/releases/tag/1.0.0) - Marvelous Mainsail [2024-05-07] -Initial release of nf-core/reportho, created with the [nf-core](https://nf-co.re/) template. +Although its location and design may vary greatly, the mainsail is always a key source of propulsion for a ship. + +This is the initial release of nf-core/reportho, created with the [nf-core](https://nf-co.re/) template. + +### `Credits` + +The following people have made significant contributions to the release through design, development and review: + +- [Igor Trujnara](https://github.com/itrujnara) +- [Luisa Santus](https://github.com/luisas) +- [Jose Espinosa-Carrasco](https://github.com/JoseEspinosa) +- [Alessio Vignoli](https://github.com/alessiovignoli) + +We also thank everyone else from the nf-core community who has participated in planning and development. ### `Added` +The pipeline was created. In particular, it has the following features: + +- fetching of ortholog predictions from public databases, through APIs and from local snapshots +- systematic comparison of the predictions and calculation of comparison statistics +- creation of an ortholog list with user-defined criteria +- basic downstream analysis of the obtained ortholog list +- generation of a human-readable report + ### `Fixed` +Nothing yet. + ### `Dependencies` +The pipeline has the following notable dependencies: + +| Program | Version | +| --------------- | ------- | +| Python | 3.11.0 | +| Python Requests | 2.31.0 | +| Biopython | 1.83 | +| R | 4.3.3 | +| PyYAML | 5.4.1 | +| T-COFFEE | 13.46.0 | +| pigz | 2.8 | +| csvtk | 0.26.0 | +| Node | 21.6.2 | +| Yarn | 1.22.19 | +| React | 18.3.1 | + +At release date, the following database versions were current: + +| Database | Version | +| -------------- | ------------- | +| OMA | Jul2023 | +| PANTHER | 18 | +| OrthoInspector | Eukaryota2023 | +| EggNOG | 5.0 | + ### `Deprecated` + +Nothing. From c0a90ba8f78072393d0af654c3a0983f635b081f Mon Sep 17 00:00:00 2001 From: itrujnara Date: Wed, 8 May 2024 14:30:22 +0200 Subject: [PATCH 06/12] Fixed sequence-based fetch key error --- bin/fetch_oma_by_sequence.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/fetch_oma_by_sequence.py b/bin/fetch_oma_by_sequence.py index eeab2ba..70f719b 100755 --- a/bin/fetch_oma_by_sequence.py +++ b/bin/fetch_oma_by_sequence.py @@ -35,7 +35,7 @@ def main() -> None: break # Write exact match status - if entry["identified_by"] == "exact match": + if json["identified_by"] == "exact match": print("true", file=open(sys.argv[4], 'w')) else: print("false", file=open(sys.argv[4], 'w')) From fc8355a357e7081ac7cd43841093610aaa68b3e6 Mon Sep 17 00:00:00 2001 From: itrujnara Date: Wed, 8 May 2024 14:30:37 +0200 Subject: [PATCH 07/12] Updated incorrect script name --- modules/local/identify_seq_online.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/local/identify_seq_online.nf b/modules/local/identify_seq_online.nf index e61bb0b..b522af8 100644 --- a/modules/local/identify_seq_online.nf +++ b/modules/local/identify_seq_online.nf @@ -21,7 +21,7 @@ process IDENTIFY_SEQ_ONLINE { prefix = task.ext.prefix ?: meta.id """ fetch_oma_by_sequence.py $fasta id_raw.txt ${prefix}_taxid.txt ${prefix}_exact.txt - uniprotize_oma.py id_raw.txt > ${prefix}_id.txt + uniprotize_oma_online.py id_raw.txt > ${prefix}_id.txt cat <<- END_VERSIONS > versions.yml "${task.process}": From b8f53cc431b2955c40adcfd8045db891fec2a4dc Mon Sep 17 00:00:00 2001 From: itrujnara Date: Wed, 8 May 2024 14:30:46 +0200 Subject: [PATCH 08/12] Fixed typo --- modules/local/make_report.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/local/make_report.nf b/modules/local/make_report.nf index 88b657c..9b22aa7 100644 --- a/modules/local/make_report.nf +++ b/modules/local/make_report.nf @@ -55,7 +55,7 @@ process MAKE_REPORT { ${task.process}: Node: \$(node --version) Yarn: \$(yarn --version) - React: \$(yarn info react version | cut -d $'\n' -f 2) + React: \$(yarn info react version | cut -d \$'\n' -f 2) Python: \$(python --version | cut -d ' ' -f 2) END_VERSIONS """ From b889372ecbc18f7be9d80007017ae94c8692165c Mon Sep 17 00:00:00 2001 From: itrujnara Date: Wed, 8 May 2024 14:43:58 +0200 Subject: [PATCH 09/12] Revert "Version bump to 1.0.0" This reverts commit 45e46c2f4ef518bd007cb716dd75478e69efaa56. --- assets/multiqc_config.yml | 4 ++-- nextflow.config | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml index 79971ec..355469b 100644 --- a/assets/multiqc_config.yml +++ b/assets/multiqc_config.yml @@ -1,7 +1,7 @@ report_comment: > - This report has been generated by the nf-core/reportho + This report has been generated by the nf-core/reportho analysis pipeline. For information about how to interpret these results, please see the - documentation. + documentation. report_section_order: "nf-core-reportho-methods-description": order: -1000 diff --git a/nextflow.config b/nextflow.config index b71a083..6c195f4 100644 --- a/nextflow.config +++ b/nextflow.config @@ -244,7 +244,7 @@ manifest { description = """A pipeline for ortholog fetching and analysis""" mainScript = 'main.nf' nextflowVersion = '!>=23.04.0' - version = '1.0.0' + version = '1.0dev' doi = '' } From 1d55566d347d75f5502fd46fecdf55dfcfec0064 Mon Sep 17 00:00:00 2001 From: itrujnara Date: Wed, 8 May 2024 15:08:29 +0200 Subject: [PATCH 10/12] Updated dump_params to use new parameter names --- modules/local/dump_params.nf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/local/dump_params.nf b/modules/local/dump_params.nf index 323189b..de9747b 100644 --- a/modules/local/dump_params.nf +++ b/modules/local/dump_params.nf @@ -13,8 +13,8 @@ process DUMP_PARAMS { val use_centroid val min_score val skip_downstream - val use_iqtree - val use_fastme + val skip_iqtree + val skip_fastme output: tuple val(meta), path("params.yml"), emit: params @@ -32,8 +32,8 @@ process DUMP_PARAMS { use_centroid: ${use_centroid} min_score: ${min_score} skip_downstream: ${skip_downstream} - use_iqtree: ${use_iqtree} - use_fastme: ${use_fastme} + skip_iqtree: ${skip_iqtree} + skip_fastme: ${skip_fastme} END_PARAMS """ From 0491d3c4a03e014290857c11199980a5dbfe85f3 Mon Sep 17 00:00:00 2001 From: Jose Espinosa-Carrasco Date: Thu, 9 May 2024 11:00:13 +0200 Subject: [PATCH 11/12] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99e97fe..3e24a14 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). -## [1.0.0](https://github.com/nf-core/reportho/releases/tag/1.0.0) - Marvelous Mainsail [2024-05-07] +## v1.0dev - [date] Although its location and design may vary greatly, the mainsail is always a key source of propulsion for a ship. From 5c289ceae9c177ef579fb5def29f06b860738f6d Mon Sep 17 00:00:00 2001 From: Jose Espinosa-Carrasco Date: Thu, 9 May 2024 11:09:27 +0200 Subject: [PATCH 12/12] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e24a14..3891aa3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,7 +52,7 @@ The pipeline has the following notable dependencies: | Yarn | 1.22.19 | | React | 18.3.1 | -At release date, the following database versions were current: +At release date, the following database versions were current and used for testing the pipeline: | Database | Version | | -------------- | ------------- |