diff --git a/modules/nf-core/nextclade/datasetget/meta.yml b/modules/nf-core/nextclade/datasetget/meta.yml index f3fb403e84c..7494b0ed773 100644 --- a/modules/nf-core/nextclade/datasetget/meta.yml +++ b/modules/nf-core/nextclade/datasetget/meta.yml @@ -30,7 +30,7 @@ output: description: File containing software versions pattern: "versions.yml" - prefix: - type: path + type: directory description: A directory containing the dataset files needed for nextclade run pattern: "prefix" authors: diff --git a/modules/nf-core/nextclade/datasetget/tests/main.nf.test b/modules/nf-core/nextclade/datasetget/tests/main.nf.test new file mode 100644 index 00000000000..b0d80135999 --- /dev/null +++ b/modules/nf-core/nextclade/datasetget/tests/main.nf.test @@ -0,0 +1,34 @@ + +nextflow_process { + + name "Test Process NEXTCLADE_DATASETGET" + script "../main.nf" + process "NEXTCLADE_DATASETGET" + + tag "modules" + tag "modules_nfcore" + tag "nextclade" + tag "nextclade/datasetget" + + test("species-id-time") { + + when { + process { + """ + input[0] = 'sars-cov-2' + input[1] = 'MN908947' + input[2] = '2022-01-18T12:00:00Z' + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + +} diff --git a/modules/nf-core/nextclade/datasetget/tests/main.nf.test.snap b/modules/nf-core/nextclade/datasetget/tests/main.nf.test.snap new file mode 100644 index 00000000000..02ab3e9ece2 --- /dev/null +++ b/modules/nf-core/nextclade/datasetget/tests/main.nf.test.snap @@ -0,0 +1,43 @@ +{ + "test-nextclade-datasetget": { + "content": [ + { + "0": [ + [ + "genemap.gff:md5,21ebebfd0f416eeb959e55ebffd808e8", + "primers.csv:md5,5990c3483bf66ce607aeb90a44e7ef2e", + "qc.json:md5,c512f51fda0212b21ffff05779180963", + "reference.fasta:md5,c7ce05f28e4ec0322c96f24e064ef55c", + "sequences.fasta:md5,41129d255b99e0e92bdf20e866b99a1b", + "tag.json:md5,402ac2b87e2a6a64a3fbf5ad16497af3", + "tree.json:md5,b8f32f547ff9e2131d6fc66b68fc54b1", + "virus_properties.json:md5,5f2de3949e07cb633f3d9e4a7654dc81" + ] + ], + "1": [ + "versions.yml:md5,12e8751f1d841b9aee87d31206c102a7" + ], + "dataset": [ + [ + "genemap.gff:md5,21ebebfd0f416eeb959e55ebffd808e8", + "primers.csv:md5,5990c3483bf66ce607aeb90a44e7ef2e", + "qc.json:md5,c512f51fda0212b21ffff05779180963", + "reference.fasta:md5,c7ce05f28e4ec0322c96f24e064ef55c", + "sequences.fasta:md5,41129d255b99e0e92bdf20e866b99a1b", + "tag.json:md5,402ac2b87e2a6a64a3fbf5ad16497af3", + "tree.json:md5,b8f32f547ff9e2131d6fc66b68fc54b1", + "virus_properties.json:md5,5f2de3949e07cb633f3d9e4a7654dc81" + ] + ], + "versions": [ + "versions.yml:md5,12e8751f1d841b9aee87d31206c102a7" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T11:33:31.41372" + } +} \ No newline at end of file diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index f320d6b94eb..aea25fc32ad 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -974,9 +974,6 @@ ncbigenomedownload: ncbitools/vecscreen: - modules/nf-core/ncbitools/vecscreen/** - tests/modules/nf-core/ncbitools/vecscreen/** -nextclade/datasetget: - - modules/nf-core/nextclade/datasetget/** - - tests/modules/nf-core/nextclade/datasetget/** nextclade/run: - modules/nf-core/nextclade/run/** - tests/modules/nf-core/nextclade/run/** diff --git a/tests/modules/nf-core/nextclade/datasetget/main.nf b/tests/modules/nf-core/nextclade/datasetget/main.nf deleted file mode 100644 index 5935f8bbaaf..00000000000 --- a/tests/modules/nf-core/nextclade/datasetget/main.nf +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { NEXTCLADE_DATASETGET } from '../../../../../modules/nf-core/nextclade/datasetget/main.nf' - -workflow test_nextclade_datasetget { - - dataset = 'sars-cov-2' - reference = 'MN908947' - tag = '2022-01-18T12:00:00Z' - - NEXTCLADE_DATASETGET ( dataset, reference, tag ) - -} diff --git a/tests/modules/nf-core/nextclade/datasetget/nextflow.config b/tests/modules/nf-core/nextclade/datasetget/nextflow.config deleted file mode 100644 index 50f50a7a357..00000000000 --- a/tests/modules/nf-core/nextclade/datasetget/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} \ No newline at end of file diff --git a/tests/modules/nf-core/nextclade/datasetget/test.yml b/tests/modules/nf-core/nextclade/datasetget/test.yml deleted file mode 100644 index 9639700e1b3..00000000000 --- a/tests/modules/nf-core/nextclade/datasetget/test.yml +++ /dev/null @@ -1,22 +0,0 @@ -- name: nextclade datasetget - command: nextflow run ./tests/modules/nf-core/nextclade/datasetget -entry test_nextclade_datasetget -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/nextclade/datasetget/nextflow.config - tags: - - nextclade - - nextclade/datasetget - files: - - path: output/nextclade/sars-cov-2/genemap.gff - md5sum: 21ebebfd0f416eeb959e55ebffd808e8 - - path: output/nextclade/sars-cov-2/primers.csv - md5sum: 5990c3483bf66ce607aeb90a44e7ef2e - - path: output/nextclade/sars-cov-2/qc.json - md5sum: c512f51fda0212b21ffff05779180963 - - path: output/nextclade/sars-cov-2/reference.fasta - md5sum: c7ce05f28e4ec0322c96f24e064ef55c - - path: output/nextclade/sars-cov-2/sequences.fasta - md5sum: 41129d255b99e0e92bdf20e866b99a1b - - path: output/nextclade/sars-cov-2/tag.json - md5sum: 402ac2b87e2a6a64a3fbf5ad16497af3 - - path: output/nextclade/sars-cov-2/tree.json - md5sum: b8f32f547ff9e2131d6fc66b68fc54b1 - - path: output/nextclade/sars-cov-2/virus_properties.json - md5sum: 5f2de3949e07cb633f3d9e4a7654dc81