diff --git a/modules/nf-core/vt/decompose/meta.yml b/modules/nf-core/vt/decompose/meta.yml index 8b9decd8288..0a08d876730 100644 --- a/modules/nf-core/vt/decompose/meta.yml +++ b/modules/nf-core/vt/decompose/meta.yml @@ -13,7 +13,7 @@ tools: homepage: "https://genome.sph.umich.edu/wiki/Vt" documentation: "https://genome.sph.umich.edu/wiki/Vt" tool_dev_url: "https://github.com/atks/vt" - licence: "['MIT']" + licence: ["MIT"] input: - meta: type: map diff --git a/modules/nf-core/vt/decompose/tests/main.nf.test b/modules/nf-core/vt/decompose/tests/main.nf.test new file mode 100644 index 00000000000..a23a34cc8ce --- /dev/null +++ b/modules/nf-core/vt/decompose/tests/main.nf.test @@ -0,0 +1,60 @@ + +nextflow_process { + + name "Test Process VT_DECOMPOSE" + script "../main.nf" + process "VT_DECOMPOSE" + config "./nextflow.config" + + tag "modules" + tag "modules_nfcore" + tag "vt" + tag "vt/decompose" + + test("test-vt-decompose") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + [] + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test-vt-decompose-intervals") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true) + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + +} diff --git a/modules/nf-core/vt/decompose/tests/main.nf.test.snap b/modules/nf-core/vt/decompose/tests/main.nf.test.snap new file mode 100644 index 00000000000..97b3efeb053 --- /dev/null +++ b/modules/nf-core/vt/decompose/tests/main.nf.test.snap @@ -0,0 +1,72 @@ +{ + "test-vt-decompose-intervals": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "decompose.vcf.gz:md5,892b6b5c55c69afd3a96cd9bfd8ab743" + ] + ], + "1": [ + "versions.yml:md5,f10f0ae7e4b74341393c2a9fc87afa87" + ], + "vcf": [ + [ + { + "id": "test", + "single_end": false + }, + "decompose.vcf.gz:md5,892b6b5c55c69afd3a96cd9bfd8ab743" + ] + ], + "versions": [ + "versions.yml:md5,f10f0ae7e4b74341393c2a9fc87afa87" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-22T17:30:33.250927" + }, + "test-vt-decompose": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "decompose.vcf.gz:md5,892b6b5c55c69afd3a96cd9bfd8ab743" + ] + ], + "1": [ + "versions.yml:md5,f10f0ae7e4b74341393c2a9fc87afa87" + ], + "vcf": [ + [ + { + "id": "test", + "single_end": false + }, + "decompose.vcf.gz:md5,892b6b5c55c69afd3a96cd9bfd8ab743" + ] + ], + "versions": [ + "versions.yml:md5,f10f0ae7e4b74341393c2a9fc87afa87" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-22T17:30:27.223776" + } +} \ No newline at end of file diff --git a/modules/nf-core/vt/decompose/tests/nextflow.config b/modules/nf-core/vt/decompose/tests/nextflow.config new file mode 100644 index 00000000000..e15f8113da6 --- /dev/null +++ b/modules/nf-core/vt/decompose/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: VT_DECOMPOSE { + ext.prefix = "decompose" + } +} \ No newline at end of file diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index fb894666bb1..729bebbe59a 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1668,9 +1668,6 @@ vsearch/sintax: vsearch/usearchglobal: - modules/nf-core/vsearch/usearchglobal/** - tests/modules/nf-core/vsearch/usearchglobal/** -vt/decompose: - - modules/nf-core/vt/decompose/** - - tests/modules/nf-core/vt/decompose/** vt/normalize: - modules/nf-core/vt/normalize/** - tests/modules/nf-core/vt/normalize/** diff --git a/tests/modules/nf-core/vt/decompose/main.nf b/tests/modules/nf-core/vt/decompose/main.nf deleted file mode 100644 index eabd1fabf9a..00000000000 --- a/tests/modules/nf-core/vt/decompose/main.nf +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { VT_DECOMPOSE } from '../../../../../modules/nf-core/vt/decompose/main.nf' - -workflow test_vt_decompose { - - input = [ - [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - [] - ] - - VT_DECOMPOSE ( input ) -} - -workflow test_vt_decompose_intervals { - - input = [ - [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true), - file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) - ] - - VT_DECOMPOSE ( input ) -} diff --git a/tests/modules/nf-core/vt/decompose/nextflow.config b/tests/modules/nf-core/vt/decompose/nextflow.config deleted file mode 100644 index 7559a42fbef..00000000000 --- a/tests/modules/nf-core/vt/decompose/nextflow.config +++ /dev/null @@ -1,8 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - - withName: VT_DECOMPOSE { - ext.prefix = "decompose" - } -} \ No newline at end of file diff --git a/tests/modules/nf-core/vt/decompose/test.yml b/tests/modules/nf-core/vt/decompose/test.yml deleted file mode 100644 index 432c3fe7e3d..00000000000 --- a/tests/modules/nf-core/vt/decompose/test.yml +++ /dev/null @@ -1,19 +0,0 @@ -- name: vt decompose test_vt_decompose - command: nextflow run ./tests/modules/nf-core/vt/decompose -entry test_vt_decompose -c ./tests/config/nextflow.config - tags: - - vt - - vt/decompose - files: - - path: output/vt/decompose.vcf.gz - md5sum: 43192115233852f6ec7bdcd262cee5a8 - - path: output/vt/versions.yml - -- name: vt decompose test_vt_decompose_intervals - command: nextflow run ./tests/modules/nf-core/vt/decompose -entry test_vt_decompose_intervals -c ./tests/config/nextflow.config - tags: - - vt - - vt/decompose - files: - - path: output/vt/decompose.vcf.gz - md5sum: 43192115233852f6ec7bdcd262cee5a8 - - path: output/vt/versions.yml