From d71fc8b7e58e0b6409fc5a0745464fb41288d84d Mon Sep 17 00:00:00 2001 From: jvfe Date: Mon, 22 Jul 2024 10:59:33 -0300 Subject: [PATCH] chore: Update bakta db download version --- .../bakta-baktadbdownload.diff | 14 +++++ .../bakta/baktadbdownload/environment.yml | 7 +++ modules/nf-core/bakta/baktadbdownload/main.nf | 4 +- .../nf-core/bakta/baktadbdownload/meta.yml | 5 +- .../bakta/baktadbdownload/tests/main.nf.test | 55 +++++++++++++++++++ .../baktadbdownload/tests/main.nf.test.snap | 29 ++++++++++ .../baktadbdownload/tests/nextflow.config | 7 +++ .../bakta/baktadbdownload/tests/tags.yml | 2 + 8 files changed, 119 insertions(+), 4 deletions(-) create mode 100644 modules/nf-core/bakta/baktadbdownload/bakta-baktadbdownload.diff create mode 100644 modules/nf-core/bakta/baktadbdownload/environment.yml create mode 100644 modules/nf-core/bakta/baktadbdownload/tests/main.nf.test create mode 100644 modules/nf-core/bakta/baktadbdownload/tests/main.nf.test.snap create mode 100644 modules/nf-core/bakta/baktadbdownload/tests/nextflow.config create mode 100644 modules/nf-core/bakta/baktadbdownload/tests/tags.yml diff --git a/modules/nf-core/bakta/baktadbdownload/bakta-baktadbdownload.diff b/modules/nf-core/bakta/baktadbdownload/bakta-baktadbdownload.diff new file mode 100644 index 00000000..cd309e33 --- /dev/null +++ b/modules/nf-core/bakta/baktadbdownload/bakta-baktadbdownload.diff @@ -0,0 +1,14 @@ +Changes in module 'nf-core/bakta/baktadbdownload' +--- modules/nf-core/bakta/baktadbdownload/main.nf ++++ modules/nf-core/bakta/baktadbdownload/main.nf +@@ -4,7 +4,7 @@ + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/bakta:1.9.3--pyhdfd78af_0' : +- 'biocontainers/bakta:1.9.3--pyhdfd78af_0' }" ++ 'quay.io/biocontainers/bakta:1.7.0--pyhdfd78af_1' }" + + output: + path "db*" , emit: db + +************************************************************ diff --git a/modules/nf-core/bakta/baktadbdownload/environment.yml b/modules/nf-core/bakta/baktadbdownload/environment.yml new file mode 100644 index 00000000..f6a53ff7 --- /dev/null +++ b/modules/nf-core/bakta/baktadbdownload/environment.yml @@ -0,0 +1,7 @@ +name: bakta_baktadbdownload +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::bakta=1.9.3 diff --git a/modules/nf-core/bakta/baktadbdownload/main.nf b/modules/nf-core/bakta/baktadbdownload/main.nf index f5e6d111..27c6b6aa 100644 --- a/modules/nf-core/bakta/baktadbdownload/main.nf +++ b/modules/nf-core/bakta/baktadbdownload/main.nf @@ -1,9 +1,9 @@ process BAKTA_BAKTADBDOWNLOAD { label 'process_single' - conda "bioconda::bakta=1.7.0" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bakta:1.7.0--pyhdfd78af_1' : + 'https://depot.galaxyproject.org/singularity/bakta:1.9.3--pyhdfd78af_0' : 'quay.io/biocontainers/bakta:1.7.0--pyhdfd78af_1' }" output: diff --git a/modules/nf-core/bakta/baktadbdownload/meta.yml b/modules/nf-core/bakta/baktadbdownload/meta.yml index 996f5b0c..21acacda 100644 --- a/modules/nf-core/bakta/baktadbdownload/meta.yml +++ b/modules/nf-core/bakta/baktadbdownload/meta.yml @@ -15,7 +15,6 @@ tools: tool_dev_url: https://github.com/oschwengers/bakta doi: "10.1099/mgen.0.000685" licence: ["GPL v3"] - output: - versions: type: file @@ -25,7 +24,9 @@ output: type: directory description: BAKTA database directory pattern: "db*/" - authors: - "@jfy133" - "@jasmezz" +maintainers: + - "@jfy133" + - "@jasmezz" diff --git a/modules/nf-core/bakta/baktadbdownload/tests/main.nf.test b/modules/nf-core/bakta/baktadbdownload/tests/main.nf.test new file mode 100644 index 00000000..a5f827f9 --- /dev/null +++ b/modules/nf-core/bakta/baktadbdownload/tests/main.nf.test @@ -0,0 +1,55 @@ +nextflow_process { + + name "Test Process BAKTA_BAKTADBDOWNLOAD" + script "../main.nf" + process "BAKTA_BAKTADBDOWNLOAD" + config "./nextflow.config" + + tag "modules" + tag "modules_nfcore" + tag "bakta" + tag "bakta/baktadbdownload" + + test("Bakta database download") { + + when { + process { + """ + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert path(process.out.db.get(0)).exists() }, + { assert snapshot(process.out.versions).match() } + ) + } + + } + + test("Bakta database download - stub") { + + options "-stub" + + when { + process { + """ + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.db + + process.out.versions + ).match() } + ) + } + + } + +} diff --git a/modules/nf-core/bakta/baktadbdownload/tests/main.nf.test.snap b/modules/nf-core/bakta/baktadbdownload/tests/main.nf.test.snap new file mode 100644 index 00000000..b1c82267 --- /dev/null +++ b/modules/nf-core/bakta/baktadbdownload/tests/main.nf.test.snap @@ -0,0 +1,29 @@ +{ + "Bakta database download": { + "content": [ + [ + "versions.yml:md5,df9b091b08a41b7d5eef95727b7eac29" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-19T11:34:41.812416438" + }, + "Bakta database download - stub": { + "content": [ + [ + [ + + ], + "versions.yml:md5,df9b091b08a41b7d5eef95727b7eac29" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-19T11:35:01.082923401" + } +} \ No newline at end of file diff --git a/modules/nf-core/bakta/baktadbdownload/tests/nextflow.config b/modules/nf-core/bakta/baktadbdownload/tests/nextflow.config new file mode 100644 index 00000000..8b99646a --- /dev/null +++ b/modules/nf-core/bakta/baktadbdownload/tests/nextflow.config @@ -0,0 +1,7 @@ +process { + + withName: 'BAKTA_BAKTADBDOWNLOAD' { + ext.args = "--type light" + } + +} diff --git a/modules/nf-core/bakta/baktadbdownload/tests/tags.yml b/modules/nf-core/bakta/baktadbdownload/tests/tags.yml new file mode 100644 index 00000000..c469fa48 --- /dev/null +++ b/modules/nf-core/bakta/baktadbdownload/tests/tags.yml @@ -0,0 +1,2 @@ +bakta/baktadbdownload: + - "modules/nf-core/bakta/baktadbdownload/**"