From c1e6e47647e21345bd55f1fb07dbadafec402173 Mon Sep 17 00:00:00 2001 From: Steven Sutcliffe Date: Fri, 6 Mar 2026 15:37:46 -0500 Subject: [PATCH 01/10] Add softwareversion to irida json --- CHANGELOG.md | 5 +++++ conf/iridanext.config | 5 ++++- nextflow.config | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f693a6..ccd8281 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ 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.3.4] - 2026-03-06 + +- Added `software_versions.yml` to the `iridanext.output.json.gz` file to track module container updates. [[PR #33](https://github.com/phac-nml/fetchdatairidanext/pull/33)] + ## [1.3.3] - 2026-03-06 ### `Changed` @@ -80,6 +84,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Initial release of fetchdatairidanext pipeline which will download reads from NCBI/INSDC archives. +[1.3.4]: https://github.com/phac-nml/fetchdatairidanext/releases/tag/1.3.4 [1.3.3]: https://github.com/phac-nml/fetchdatairidanext/releases/tag/1.3.3 [1.3.2]: https://github.com/phac-nml/fetchdatairidanext/releases/tag/1.3.2 [1.3.1]: https://github.com/phac-nml/fetchdatairidanext/releases/tag/1.3.1 diff --git a/conf/iridanext.config b/conf/iridanext.config index 739532c..f00ef77 100644 --- a/conf/iridanext.config +++ b/conf/iridanext.config @@ -6,7 +6,10 @@ iridanext { validate = true files { idkey = "irida_id" - global = ["**/prefetch/failures_report.csv"] + global = [ + "**/prefetch/failures_report.csv", + "**/pipeline_info/software_versions.yml" + ] samples = ["**/reads/*.fastq.gz"] } } diff --git a/nextflow.config b/nextflow.config index f586d2f..01c574e 100644 --- a/nextflow.config +++ b/nextflow.config @@ -205,7 +205,7 @@ manifest { description = """IRIDA Next pipeline for fetching data from INSDC Databases""" mainScript = 'main.nf' nextflowVersion = '!>=23.04.0' - version = '1.3.3' + version = '1.3.4' doi = '' defaultBranch = 'main' } From c6685107439e9c4679bb34ac06c47541e42e3d3d Mon Sep 17 00:00:00 2001 From: Steven Sutcliffe Date: Fri, 6 Mar 2026 15:38:51 -0500 Subject: [PATCH 02/10] Fix typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ccd8281..0a5e9b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [1.3.4] - 2026-03-06 -- Added `software_versions.yml` to the `iridanext.output.json.gz` file to track module container updates. [[PR #33](https://github.com/phac-nml/fetchdatairidanext/pull/33)] +- Added `software_versions.yml` to the `iridanext.output.json.gz` file to track module container updates. [PR #33](https://github.com/phac-nml/fetchdatairidanext/pull/33) ## [1.3.3] - 2026-03-06 From 1bae411b79fc863636d16fcb807502c82e3c299d Mon Sep 17 00:00:00 2001 From: Steven Sutcliffe Date: Fri, 6 Mar 2026 15:54:04 -0500 Subject: [PATCH 03/10] Update irida json files in tests --- tests/data/prefetch_errors_iridanext.output.json | 3 +++ tests/data/test_fetch_iridanext.output.json | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tests/data/prefetch_errors_iridanext.output.json b/tests/data/prefetch_errors_iridanext.output.json index df07228..e40dcdf 100644 --- a/tests/data/prefetch_errors_iridanext.output.json +++ b/tests/data/prefetch_errors_iridanext.output.json @@ -1,6 +1,9 @@ { "files": { "global": [ + { + "path": "pipeline_info/software_versions.yml" + }, { "path": "prefetch/failures_report.csv" } diff --git a/tests/data/test_fetch_iridanext.output.json b/tests/data/test_fetch_iridanext.output.json index d8ecedf..9625103 100644 --- a/tests/data/test_fetch_iridanext.output.json +++ b/tests/data/test_fetch_iridanext.output.json @@ -1,6 +1,9 @@ { "files": { "global": [ + { + "path": "pipeline_info/software_versions.yml" + }, { "path": "prefetch/failures_report.csv" } From 53781a5fb56b184397fb48b76790dc0b08dc8e4b Mon Sep 17 00:00:00 2001 From: Steven Sutcliffe Date: Sat, 7 Mar 2026 19:50:25 -0500 Subject: [PATCH 04/10] Moved SRAtools module sratools subfolder --- modules/local/{ => sratools}/prefetch/environment.yml | 0 modules/local/{ => sratools}/prefetch/main.nf | 0 .../{ => sratools}/prefetch/templates/retry_with_backoff.sh | 0 .../local/fastq_download_prefetch_fasterqdump_sratools/main.nf | 2 +- 4 files changed, 1 insertion(+), 1 deletion(-) rename modules/local/{ => sratools}/prefetch/environment.yml (100%) rename modules/local/{ => sratools}/prefetch/main.nf (100%) rename modules/local/{ => sratools}/prefetch/templates/retry_with_backoff.sh (100%) diff --git a/modules/local/prefetch/environment.yml b/modules/local/sratools/prefetch/environment.yml similarity index 100% rename from modules/local/prefetch/environment.yml rename to modules/local/sratools/prefetch/environment.yml diff --git a/modules/local/prefetch/main.nf b/modules/local/sratools/prefetch/main.nf similarity index 100% rename from modules/local/prefetch/main.nf rename to modules/local/sratools/prefetch/main.nf diff --git a/modules/local/prefetch/templates/retry_with_backoff.sh b/modules/local/sratools/prefetch/templates/retry_with_backoff.sh similarity index 100% rename from modules/local/prefetch/templates/retry_with_backoff.sh rename to modules/local/sratools/prefetch/templates/retry_with_backoff.sh diff --git a/subworkflows/local/fastq_download_prefetch_fasterqdump_sratools/main.nf b/subworkflows/local/fastq_download_prefetch_fasterqdump_sratools/main.nf index ebf1400..b6bb2a4 100644 --- a/subworkflows/local/fastq_download_prefetch_fasterqdump_sratools/main.nf +++ b/subworkflows/local/fastq_download_prefetch_fasterqdump_sratools/main.nf @@ -1,5 +1,5 @@ include { CUSTOM_SRATOOLSNCBISETTINGS } from '../../../modules/nf-core/custom/sratoolsncbisettings/main' -include { SRATOOLS_PREFETCH } from '../../../modules/local/prefetch/main' +include { SRATOOLS_PREFETCH } from '../../../modules/local/sratools/prefetch/main' include { PREFETCH_CHECKER } from '../../../modules/local/prefetchchecker/main' include { SRATOOLS_FASTERQDUMP } from '../../../modules/local/sratools/fasterqdump/main' From d9a5e0386ef4cb5c2d1603c346c8d8988123f4b2 Mon Sep 17 00:00:00 2001 From: Steven Sutcliffe Date: Sat, 7 Mar 2026 19:56:40 -0500 Subject: [PATCH 05/10] Moved sratoolsncbisettings to local module --- .../sratoolsncbisettings/environment.yml | 7 +++ modules/local/sratoolsncbisettings/main.nf | 20 +++++++++ modules/local/sratoolsncbisettings/meta.yml | 28 ++++++++++++ .../templates/detect_ncbi_settings.sh | 45 +++++++++++++++++++ .../sratoolsncbisettings/tests/main.nf.test | 42 +++++++++++++++++ .../tests/main.nf.test.snap | 10 +++++ .../tests/nextflow.config | 16 +++++++ .../local/sratoolsncbisettings/tests/tags.yml | 2 + .../main.nf | 2 +- 9 files changed, 171 insertions(+), 1 deletion(-) create mode 100644 modules/local/sratoolsncbisettings/environment.yml create mode 100644 modules/local/sratoolsncbisettings/main.nf create mode 100644 modules/local/sratoolsncbisettings/meta.yml create mode 100644 modules/local/sratoolsncbisettings/templates/detect_ncbi_settings.sh create mode 100644 modules/local/sratoolsncbisettings/tests/main.nf.test create mode 100644 modules/local/sratoolsncbisettings/tests/main.nf.test.snap create mode 100644 modules/local/sratoolsncbisettings/tests/nextflow.config create mode 100644 modules/local/sratoolsncbisettings/tests/tags.yml diff --git a/modules/local/sratoolsncbisettings/environment.yml b/modules/local/sratoolsncbisettings/environment.yml new file mode 100644 index 0000000..44a1b00 --- /dev/null +++ b/modules/local/sratoolsncbisettings/environment.yml @@ -0,0 +1,7 @@ +name: custom_sratoolsncbisettings +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::sra-tools=3.0.8 diff --git a/modules/local/sratoolsncbisettings/main.nf b/modules/local/sratoolsncbisettings/main.nf new file mode 100644 index 0000000..ba9441c --- /dev/null +++ b/modules/local/sratoolsncbisettings/main.nf @@ -0,0 +1,20 @@ +process CUSTOM_SRATOOLSNCBISETTINGS { + tag 'ncbi-settings' + label 'process_low' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/sra-tools:3.0.8--h9f5acd7_0' : + 'biocontainers/sra-tools:3.0.8--h9f5acd7_0' }" + + output: + path('*.mkfg') , emit: ncbi_settings + path 'versions.yml', emit: versions + + when: + task.ext.when == null || task.ext.when + + shell: + config = "/LIBS/GUID = \"${UUID.randomUUID().toString()}\"\\n/libs/cloud/report_instance_identity = \"true\"\\n" + template 'detect_ncbi_settings.sh' +} diff --git a/modules/local/sratoolsncbisettings/meta.yml b/modules/local/sratoolsncbisettings/meta.yml new file mode 100644 index 0000000..46a6cd3 --- /dev/null +++ b/modules/local/sratoolsncbisettings/meta.yml @@ -0,0 +1,28 @@ +name: "custom_sratoolsncbisettings" +description: Test for the presence of suitable NCBI settings or create them on the fly. +keywords: + - NCBI + - settings + - sra-tools + - prefetch + - fasterq-dump +tools: + - "sratools": + description: "SRA Toolkit and SDK from NCBI" + homepage: https://github.com/ncbi/sra-tools + documentation: https://github.com/ncbi/sra-tools/wiki + tool_dev_url: https://github.com/ncbi/sra-tools + licence: ["Public Domain"] +output: + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - ncbi_settings: + type: file + description: An NCBI user settings file. + pattern: "*.mkfg" +authors: + - "@Midnighter" +maintainers: + - "@Midnighter" diff --git a/modules/local/sratoolsncbisettings/templates/detect_ncbi_settings.sh b/modules/local/sratoolsncbisettings/templates/detect_ncbi_settings.sh new file mode 100644 index 0000000..cfe3a32 --- /dev/null +++ b/modules/local/sratoolsncbisettings/templates/detect_ncbi_settings.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash + +set -u + + +# Get the expected NCBI settings path and define the environment variable +# `NCBI_SETTINGS`. +eval "$(vdb-config -o n NCBI_SETTINGS | sed 's/[" ]//g')" + +# If the user settings do not exist yet, create a file suitable for `prefetch` +# and `fasterq-dump`. If an existing settings file does not contain the required +# values, error out with a helpful message. +if [[ ! -f "${NCBI_SETTINGS}" ]]; then + printf '!{config}' > 'user-settings.mkfg' +else + prefetch --help &> /dev/null + if [[ $? = 78 ]]; then + echo "You have an existing vdb-config at '${NCBI_SETTINGS}' but it is"\ + "missing the required entries for /LIBS/GUID and"\ + "/libs/cloud/report_instance_identity."\ + "Feel free to add the following to your settings file:" >&2 + echo "$(printf '!{config}')" >&2 + exit 1 + fi + fasterq-dump --help &> /dev/null + if [[ $? = 78 ]]; then + echo "You have an existing vdb-config at '${NCBI_SETTINGS}' but it is"\ + "missing the required entries for /LIBS/GUID and"\ + "/libs/cloud/report_instance_identity."\ + "Feel free to add the following to your settings file:" >&2 + echo "$(printf '!{config}')" >&2 + exit 1 + fi + if [[ "${NCBI_SETTINGS}" != *.mkfg ]]; then + echo "The detected settings '${NCBI_SETTINGS}' do not have the required"\ + "file extension '.mkfg'." >&2 + exit 1 + fi + cp "${NCBI_SETTINGS}" ./ +fi + +cat <<-END_VERSIONS > versions.yml +"!{task.process}": + sratools: $(vdb-config --version 2>&1 | grep -Eo '[0-9.]+') +END_VERSIONS diff --git a/modules/local/sratoolsncbisettings/tests/main.nf.test b/modules/local/sratoolsncbisettings/tests/main.nf.test new file mode 100644 index 0000000..9f17867 --- /dev/null +++ b/modules/local/sratoolsncbisettings/tests/main.nf.test @@ -0,0 +1,42 @@ +nextflow_process { + + name "Test Process CUSTOM_SRATOOLSNCBISETTINGS" + script "../main.nf" + process "CUSTOM_SRATOOLSNCBISETTINGS" + config "modules/nf-core/custom/sratoolsncbisettings/tests/nextflow.config" + tag "modules" + tag "modules_nfcore" + tag "custom" + tag "custom/sratoolsncbisettings" + + test("Should run without failures") { + + when { + params { + settings_path = '/tmp/.ncbi' + settings_file = "${params.settings_path}/user-settings.mkfg" + outdir = "$outputDir" + } + + process { + """ + file(params.settings_path).mkdirs() + def settings = file(params.modules_testdata_base_path + 'generic/config/ncbi_user_settings.mkfg', checkIfExists: true) + settings.copyTo(params.settings_file) + """ + } + } + + then { + assert process.success + assert snapshot( + process.out.versions + ).match() + + with(process.out.ncbi_settings) { + assert path(get(0)).readLines().any { it.contains('/LIBS/GUID') } + assert path(get(0)).readLines().any { it.contains('/libs/cloud/report_instance_identity') } + } + } + } +} diff --git a/modules/local/sratoolsncbisettings/tests/main.nf.test.snap b/modules/local/sratoolsncbisettings/tests/main.nf.test.snap new file mode 100644 index 0000000..65a706d --- /dev/null +++ b/modules/local/sratoolsncbisettings/tests/main.nf.test.snap @@ -0,0 +1,10 @@ +{ + "Should run without failures": { + "content": [ + [ + "versions.yml:md5,3d6ee88cce1ee517e198633f062589a8" + ] + ], + "timestamp": "2024-01-09T22:43:44.996003" + } +} diff --git a/modules/local/sratoolsncbisettings/tests/nextflow.config b/modules/local/sratoolsncbisettings/tests/nextflow.config new file mode 100644 index 0000000..c4a96e9 --- /dev/null +++ b/modules/local/sratoolsncbisettings/tests/nextflow.config @@ -0,0 +1,16 @@ +params.settings_path = '/tmp/.ncbi' +params.settings_file = "${params.settings_path}/user-settings.mkfg" + +env.NCBI_SETTINGS = params.settings_file + +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: CUSTOM_SRATOOLSNCBISETTINGS { + containerOptions = { + (workflow.containerEngine == 'singularity') ? + "-B ${params.settings_path}:${params.settings_path}" : + "-v ${params.settings_path}:${params.settings_path}" + } + } +} \ No newline at end of file diff --git a/modules/local/sratoolsncbisettings/tests/tags.yml b/modules/local/sratoolsncbisettings/tests/tags.yml new file mode 100644 index 0000000..fb4a08a --- /dev/null +++ b/modules/local/sratoolsncbisettings/tests/tags.yml @@ -0,0 +1,2 @@ +custom/sratoolsncbisettings: + - modules/nf-core/custom/sratoolsncbisettings/** diff --git a/subworkflows/local/fastq_download_prefetch_fasterqdump_sratools/main.nf b/subworkflows/local/fastq_download_prefetch_fasterqdump_sratools/main.nf index b6bb2a4..2fbbec5 100644 --- a/subworkflows/local/fastq_download_prefetch_fasterqdump_sratools/main.nf +++ b/subworkflows/local/fastq_download_prefetch_fasterqdump_sratools/main.nf @@ -1,4 +1,4 @@ -include { CUSTOM_SRATOOLSNCBISETTINGS } from '../../../modules/nf-core/custom/sratoolsncbisettings/main' +include { CUSTOM_SRATOOLSNCBISETTINGS } from '../../../modules/local/sratoolsncbisettings/main' include { SRATOOLS_PREFETCH } from '../../../modules/local/sratools/prefetch/main' include { PREFETCH_CHECKER } from '../../../modules/local/prefetchchecker/main' include { SRATOOLS_FASTERQDUMP } from '../../../modules/local/sratools/fasterqdump/main' From d9c273b24a835c76e47a05f24ddb33c352e44947 Mon Sep 17 00:00:00 2001 From: Steven Sutcliffe Date: Sat, 7 Mar 2026 20:13:38 -0500 Subject: [PATCH 06/10] Migrated nf-core pipeline to local --- CHANGELOG.md | 1 + modules.json | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a5e9b1..14e8e66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [1.3.4] - 2026-03-06 - Added `software_versions.yml` to the `iridanext.output.json.gz` file to track module container updates. [PR #33](https://github.com/phac-nml/fetchdatairidanext/pull/33) +- Move `CUSTOM_SRATOOLSNCBISETTINGS` to a local module, remove from nf-core, and update `sra-toolkit` to `3.2.1`. [PR #33](https://github.com/phac-nml/fetchdatairidanext/pull/33) ## [1.3.3] - 2026-03-06 diff --git a/modules.json b/modules.json index 9a4678a..3a890bb 100644 --- a/modules.json +++ b/modules.json @@ -9,11 +9,6 @@ "branch": "master", "git_sha": "1526dc37227a1101bdca25339337362e187a6b3b", "installed_by": ["modules"] - }, - "custom/sratoolsncbisettings": { - "branch": "master", - "git_sha": "e719354ba77df0a1bd310836aa2039b45c29d620", - "installed_by": ["modules"] } } } From 299e883d8ba1301471a8c466aa5a129ebcf4d4d9 Mon Sep 17 00:00:00 2001 From: Steven Sutcliffe Date: Sat, 7 Mar 2026 20:18:03 -0500 Subject: [PATCH 07/10] Trying to get editorconfig-checker to accept file --- modules/local/sratoolsncbisettings/tests/nextflow.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/local/sratoolsncbisettings/tests/nextflow.config b/modules/local/sratoolsncbisettings/tests/nextflow.config index c4a96e9..f24f8c5 100644 --- a/modules/local/sratoolsncbisettings/tests/nextflow.config +++ b/modules/local/sratoolsncbisettings/tests/nextflow.config @@ -13,4 +13,4 @@ process { "-v ${params.settings_path}:${params.settings_path}" } } -} \ No newline at end of file +} From e53f89e25c5a1e14789b48cf073889867829b2d5 Mon Sep 17 00:00:00 2001 From: Steven Sutcliffe Date: Sat, 7 Mar 2026 20:21:28 -0500 Subject: [PATCH 08/10] Change release date --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14e8e66..8ef0512 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.3.4] - 2026-03-06 +## [1.3.4] - 2026-03-09 - Added `software_versions.yml` to the `iridanext.output.json.gz` file to track module container updates. [PR #33](https://github.com/phac-nml/fetchdatairidanext/pull/33) - Move `CUSTOM_SRATOOLSNCBISETTINGS` to a local module, remove from nf-core, and update `sra-toolkit` to `3.2.1`. [PR #33](https://github.com/phac-nml/fetchdatairidanext/pull/33) From 754aef378dad4b8b44a8c4aa6221b8b785567c17 Mon Sep 17 00:00:00 2001 From: Steven Sutcliffe Date: Mon, 9 Mar 2026 09:08:50 -0400 Subject: [PATCH 09/10] Update the sra-toolkit to 3.2.1 --- modules/local/sratoolsncbisettings/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/local/sratoolsncbisettings/main.nf b/modules/local/sratoolsncbisettings/main.nf index ba9441c..f20a590 100644 --- a/modules/local/sratoolsncbisettings/main.nf +++ b/modules/local/sratoolsncbisettings/main.nf @@ -4,8 +4,8 @@ process CUSTOM_SRATOOLSNCBISETTINGS { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/sra-tools:3.0.8--h9f5acd7_0' : - 'biocontainers/sra-tools:3.0.8--h9f5acd7_0' }" + 'https://depot.galaxyproject.org/singularity/sra-tools:3.2.1--h4304569_1' : + 'biocontainers/sra-tools:3.2.1--h4304569_1' }" output: path('*.mkfg') , emit: ncbi_settings From 4bd17604d4d55b59918d0dffeaf4c3096f98fd02 Mon Sep 17 00:00:00 2001 From: Steven Sutcliffe Date: Mon, 9 Mar 2026 10:40:21 -0400 Subject: [PATCH 10/10] Update snapshot --- .../sratoolsncbisettings/environment.yml | 7 --- .../custom/sratoolsncbisettings/main.nf | 20 --------- .../custom/sratoolsncbisettings/meta.yml | 28 ------------ .../templates/detect_ncbi_settings.sh | 45 ------------------- .../sratoolsncbisettings/tests/main.nf.test | 42 ----------------- .../tests/main.nf.test.snap | 10 ----- .../tests/nextflow.config | 16 ------- .../sratoolsncbisettings/tests/tags.yml | 2 - .../main.nf.test.snap | 6 +-- 9 files changed, 3 insertions(+), 173 deletions(-) delete mode 100644 modules/nf-core/custom/sratoolsncbisettings/environment.yml delete mode 100644 modules/nf-core/custom/sratoolsncbisettings/main.nf delete mode 100644 modules/nf-core/custom/sratoolsncbisettings/meta.yml delete mode 100644 modules/nf-core/custom/sratoolsncbisettings/templates/detect_ncbi_settings.sh delete mode 100644 modules/nf-core/custom/sratoolsncbisettings/tests/main.nf.test delete mode 100644 modules/nf-core/custom/sratoolsncbisettings/tests/main.nf.test.snap delete mode 100644 modules/nf-core/custom/sratoolsncbisettings/tests/nextflow.config delete mode 100644 modules/nf-core/custom/sratoolsncbisettings/tests/tags.yml diff --git a/modules/nf-core/custom/sratoolsncbisettings/environment.yml b/modules/nf-core/custom/sratoolsncbisettings/environment.yml deleted file mode 100644 index 44a1b00..0000000 --- a/modules/nf-core/custom/sratoolsncbisettings/environment.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: custom_sratoolsncbisettings -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - bioconda::sra-tools=3.0.8 diff --git a/modules/nf-core/custom/sratoolsncbisettings/main.nf b/modules/nf-core/custom/sratoolsncbisettings/main.nf deleted file mode 100644 index ba9441c..0000000 --- a/modules/nf-core/custom/sratoolsncbisettings/main.nf +++ /dev/null @@ -1,20 +0,0 @@ -process CUSTOM_SRATOOLSNCBISETTINGS { - tag 'ncbi-settings' - label 'process_low' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/sra-tools:3.0.8--h9f5acd7_0' : - 'biocontainers/sra-tools:3.0.8--h9f5acd7_0' }" - - output: - path('*.mkfg') , emit: ncbi_settings - path 'versions.yml', emit: versions - - when: - task.ext.when == null || task.ext.when - - shell: - config = "/LIBS/GUID = \"${UUID.randomUUID().toString()}\"\\n/libs/cloud/report_instance_identity = \"true\"\\n" - template 'detect_ncbi_settings.sh' -} diff --git a/modules/nf-core/custom/sratoolsncbisettings/meta.yml b/modules/nf-core/custom/sratoolsncbisettings/meta.yml deleted file mode 100644 index 46a6cd3..0000000 --- a/modules/nf-core/custom/sratoolsncbisettings/meta.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: "custom_sratoolsncbisettings" -description: Test for the presence of suitable NCBI settings or create them on the fly. -keywords: - - NCBI - - settings - - sra-tools - - prefetch - - fasterq-dump -tools: - - "sratools": - description: "SRA Toolkit and SDK from NCBI" - homepage: https://github.com/ncbi/sra-tools - documentation: https://github.com/ncbi/sra-tools/wiki - tool_dev_url: https://github.com/ncbi/sra-tools - licence: ["Public Domain"] -output: - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - ncbi_settings: - type: file - description: An NCBI user settings file. - pattern: "*.mkfg" -authors: - - "@Midnighter" -maintainers: - - "@Midnighter" diff --git a/modules/nf-core/custom/sratoolsncbisettings/templates/detect_ncbi_settings.sh b/modules/nf-core/custom/sratoolsncbisettings/templates/detect_ncbi_settings.sh deleted file mode 100644 index cfe3a32..0000000 --- a/modules/nf-core/custom/sratoolsncbisettings/templates/detect_ncbi_settings.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env bash - -set -u - - -# Get the expected NCBI settings path and define the environment variable -# `NCBI_SETTINGS`. -eval "$(vdb-config -o n NCBI_SETTINGS | sed 's/[" ]//g')" - -# If the user settings do not exist yet, create a file suitable for `prefetch` -# and `fasterq-dump`. If an existing settings file does not contain the required -# values, error out with a helpful message. -if [[ ! -f "${NCBI_SETTINGS}" ]]; then - printf '!{config}' > 'user-settings.mkfg' -else - prefetch --help &> /dev/null - if [[ $? = 78 ]]; then - echo "You have an existing vdb-config at '${NCBI_SETTINGS}' but it is"\ - "missing the required entries for /LIBS/GUID and"\ - "/libs/cloud/report_instance_identity."\ - "Feel free to add the following to your settings file:" >&2 - echo "$(printf '!{config}')" >&2 - exit 1 - fi - fasterq-dump --help &> /dev/null - if [[ $? = 78 ]]; then - echo "You have an existing vdb-config at '${NCBI_SETTINGS}' but it is"\ - "missing the required entries for /LIBS/GUID and"\ - "/libs/cloud/report_instance_identity."\ - "Feel free to add the following to your settings file:" >&2 - echo "$(printf '!{config}')" >&2 - exit 1 - fi - if [[ "${NCBI_SETTINGS}" != *.mkfg ]]; then - echo "The detected settings '${NCBI_SETTINGS}' do not have the required"\ - "file extension '.mkfg'." >&2 - exit 1 - fi - cp "${NCBI_SETTINGS}" ./ -fi - -cat <<-END_VERSIONS > versions.yml -"!{task.process}": - sratools: $(vdb-config --version 2>&1 | grep -Eo '[0-9.]+') -END_VERSIONS diff --git a/modules/nf-core/custom/sratoolsncbisettings/tests/main.nf.test b/modules/nf-core/custom/sratoolsncbisettings/tests/main.nf.test deleted file mode 100644 index 9f17867..0000000 --- a/modules/nf-core/custom/sratoolsncbisettings/tests/main.nf.test +++ /dev/null @@ -1,42 +0,0 @@ -nextflow_process { - - name "Test Process CUSTOM_SRATOOLSNCBISETTINGS" - script "../main.nf" - process "CUSTOM_SRATOOLSNCBISETTINGS" - config "modules/nf-core/custom/sratoolsncbisettings/tests/nextflow.config" - tag "modules" - tag "modules_nfcore" - tag "custom" - tag "custom/sratoolsncbisettings" - - test("Should run without failures") { - - when { - params { - settings_path = '/tmp/.ncbi' - settings_file = "${params.settings_path}/user-settings.mkfg" - outdir = "$outputDir" - } - - process { - """ - file(params.settings_path).mkdirs() - def settings = file(params.modules_testdata_base_path + 'generic/config/ncbi_user_settings.mkfg', checkIfExists: true) - settings.copyTo(params.settings_file) - """ - } - } - - then { - assert process.success - assert snapshot( - process.out.versions - ).match() - - with(process.out.ncbi_settings) { - assert path(get(0)).readLines().any { it.contains('/LIBS/GUID') } - assert path(get(0)).readLines().any { it.contains('/libs/cloud/report_instance_identity') } - } - } - } -} diff --git a/modules/nf-core/custom/sratoolsncbisettings/tests/main.nf.test.snap b/modules/nf-core/custom/sratoolsncbisettings/tests/main.nf.test.snap deleted file mode 100644 index 65a706d..0000000 --- a/modules/nf-core/custom/sratoolsncbisettings/tests/main.nf.test.snap +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Should run without failures": { - "content": [ - [ - "versions.yml:md5,3d6ee88cce1ee517e198633f062589a8" - ] - ], - "timestamp": "2024-01-09T22:43:44.996003" - } -} diff --git a/modules/nf-core/custom/sratoolsncbisettings/tests/nextflow.config b/modules/nf-core/custom/sratoolsncbisettings/tests/nextflow.config deleted file mode 100644 index c4a96e9..0000000 --- a/modules/nf-core/custom/sratoolsncbisettings/tests/nextflow.config +++ /dev/null @@ -1,16 +0,0 @@ -params.settings_path = '/tmp/.ncbi' -params.settings_file = "${params.settings_path}/user-settings.mkfg" - -env.NCBI_SETTINGS = params.settings_file - -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - withName: CUSTOM_SRATOOLSNCBISETTINGS { - containerOptions = { - (workflow.containerEngine == 'singularity') ? - "-B ${params.settings_path}:${params.settings_path}" : - "-v ${params.settings_path}:${params.settings_path}" - } - } -} \ No newline at end of file diff --git a/modules/nf-core/custom/sratoolsncbisettings/tests/tags.yml b/modules/nf-core/custom/sratoolsncbisettings/tests/tags.yml deleted file mode 100644 index fb4a08a..0000000 --- a/modules/nf-core/custom/sratoolsncbisettings/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -custom/sratoolsncbisettings: - - modules/nf-core/custom/sratoolsncbisettings/** diff --git a/tests/workflows/fastq_download_prefetch_fasterqdump_sratools/main.nf.test.snap b/tests/workflows/fastq_download_prefetch_fasterqdump_sratools/main.nf.test.snap index 878b9a1..2fb0750 100644 --- a/tests/workflows/fastq_download_prefetch_fasterqdump_sratools/main.nf.test.snap +++ b/tests/workflows/fastq_download_prefetch_fasterqdump_sratools/main.nf.test.snap @@ -23,7 +23,7 @@ ] ], "1": [ - "versions.yml:md5,1a2218ff913fc33408bffccb081b5048", + "versions.yml:md5,583cd2949d8d481fead1dd0124a35dc5", "versions.yml:md5,67c595bdcd89abea73efccf7ce9adc4e", "versions.yml:md5,c585a49fc382d71066a4c55fe7409aef" ], @@ -48,7 +48,7 @@ ] ], "versions": [ - "versions.yml:md5,1a2218ff913fc33408bffccb081b5048", + "versions.yml:md5,583cd2949d8d481fead1dd0124a35dc5", "versions.yml:md5,67c595bdcd89abea73efccf7ce9adc4e", "versions.yml:md5,c585a49fc382d71066a4c55fe7409aef" ] @@ -58,6 +58,6 @@ "nf-test": "0.9.2", "nextflow": "24.10.6" }, - "timestamp": "2026-03-06T09:17:36.4522704" + "timestamp": "2026-03-09T10:14:58.957319301" } } \ No newline at end of file