From d5967d6f3d90e066156148983e630a6eee991eac Mon Sep 17 00:00:00 2001 From: Ruth Date: Thu, 23 May 2024 13:36:18 +0100 Subject: [PATCH 1/8] bcftools isec input can be bcf or bcf.gz as well as vcf.gz --- modules/nf-core/bcftools/isec/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/bcftools/isec/main.nf b/modules/nf-core/bcftools/isec/main.nf index edce074fc97..24b931014bf 100644 --- a/modules/nf-core/bcftools/isec/main.nf +++ b/modules/nf-core/bcftools/isec/main.nf @@ -24,7 +24,7 @@ process BCFTOOLS_ISEC { bcftools isec \\ $args \\ -p $prefix \\ - *.vcf.gz + ${vcfs} cat <<-END_VERSIONS > versions.yml "${task.process}": bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//') From 29c3b48a9c7f3187239102b4fa041c4d042aa7df Mon Sep 17 00:00:00 2001 From: Simon Pearce <24893913+SPPearce@users.noreply.github.com> Date: Tue, 2 Jul 2024 17:40:57 +0000 Subject: [PATCH 2/8] Add stub and stub test --- modules/nf-core/bcftools/isec/main.nf | 18 ++++++++++ .../nf-core/bcftools/isec/tests/main.nf.test | 33 +++++++++++++++++-- 2 files changed, 48 insertions(+), 3 deletions(-) diff --git a/modules/nf-core/bcftools/isec/main.nf b/modules/nf-core/bcftools/isec/main.nf index 24b931014bf..8fa9d08c5e3 100644 --- a/modules/nf-core/bcftools/isec/main.nf +++ b/modules/nf-core/bcftools/isec/main.nf @@ -30,4 +30,22 @@ process BCFTOOLS_ISEC { bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//') END_VERSIONS """ + + stub: + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + """ + mkdir ${prefix} + touch ${prefix}/README.txt + touch ${prefix}/sites.txt + touch ${prefix}/0000.vcf.gz + touch ${prefix}/0000.vcf.gz.tbi + touch ${prefix}/0001.vcf.gz + touch ${prefix}/0001.vcf.gz.tbi + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/nf-core/bcftools/isec/tests/main.nf.test b/modules/nf-core/bcftools/isec/tests/main.nf.test index 89d5335c0b3..255b2f8fd6b 100644 --- a/modules/nf-core/bcftools/isec/tests/main.nf.test +++ b/modules/nf-core/bcftools/isec/tests/main.nf.test @@ -16,12 +16,12 @@ nextflow_process { when { process { """ - input[0] = [ + input[0] = [ [ id:'test' ], // meta map - [ + [ file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), file(params.test_data['sarscov2']['illumina']['test2_vcf_gz'], checkIfExists: true)], - [ + [ file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true), file(params.test_data['sarscov2']['illumina']['test2_vcf_gz_tbi'], checkIfExists: true)] ] @@ -41,4 +41,31 @@ nextflow_process { } + test("sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]]") { + options "-stub" + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test2_vcf_gz'], checkIfExists: true)], + [ + file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test2_vcf_gz_tbi'], checkIfExists: true)] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + } From b0b0471e84226e88f84c06cb19a06a36798e48e8 Mon Sep 17 00:00:00 2001 From: Simon Pearce <24893913+SPPearce@users.noreply.github.com> Date: Tue, 2 Jul 2024 18:06:24 +0000 Subject: [PATCH 3/8] Update tests --- modules/nf-core/bcftools/isec/main.nf | 4 +- .../nf-core/bcftools/isec/tests/main.nf.test | 29 ++--- .../bcftools/isec/tests/main.nf.test.snap | 105 +++++++++++++++--- 3 files changed, 105 insertions(+), 33 deletions(-) diff --git a/modules/nf-core/bcftools/isec/main.nf b/modules/nf-core/bcftools/isec/main.nf index 8fa9d08c5e3..724bf3af636 100644 --- a/modules/nf-core/bcftools/isec/main.nf +++ b/modules/nf-core/bcftools/isec/main.nf @@ -38,9 +38,9 @@ process BCFTOOLS_ISEC { mkdir ${prefix} touch ${prefix}/README.txt touch ${prefix}/sites.txt - touch ${prefix}/0000.vcf.gz + echo "" | gzip > ${prefix}/0000.vcf.gz touch ${prefix}/0000.vcf.gz.tbi - touch ${prefix}/0001.vcf.gz + echo "" | gzip > ${prefix}/0001.vcf.gz touch ${prefix}/0001.vcf.gz.tbi cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/bcftools/isec/tests/main.nf.test b/modules/nf-core/bcftools/isec/tests/main.nf.test index 255b2f8fd6b..f936d8fb127 100644 --- a/modules/nf-core/bcftools/isec/tests/main.nf.test +++ b/modules/nf-core/bcftools/isec/tests/main.nf.test @@ -11,7 +11,7 @@ nextflow_process { config "./nextflow.config" - test("sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]]") { + test("sarscov2 - [[vcf1.gz, vcf2.gz], [tbi1, tbi2]]") { when { process { @@ -19,11 +19,13 @@ nextflow_process { input[0] = [ [ id:'test' ], // meta map [ - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test2_vcf_gz'], checkIfExists: true)], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz', checkIfExists: true) + ], [ - file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test2_vcf_gz_tbi'], checkIfExists: true)] + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true) + ] ] """ } @@ -32,16 +34,13 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot( - process.out.results, - process.out.versions - ).match() } + { assert snapshot(process.out).match() } ) } } - test("sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]]") { + test("sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - test") { options "-stub" when { process { @@ -49,11 +48,13 @@ nextflow_process { input[0] = [ [ id:'test' ], // meta map [ - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test2_vcf_gz'], checkIfExists: true)], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz', checkIfExists: true) + ], [ - file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test2_vcf_gz_tbi'], checkIfExists: true)] + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true) + ] ] """ } diff --git a/modules/nf-core/bcftools/isec/tests/main.nf.test.snap b/modules/nf-core/bcftools/isec/tests/main.nf.test.snap index 919809b0c68..002bd505a64 100644 --- a/modules/nf-core/bcftools/isec/tests/main.nf.test.snap +++ b/modules/nf-core/bcftools/isec/tests/main.nf.test.snap @@ -1,25 +1,96 @@ { - "sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]]": { + "sarscov2 - [[vcf1.gz, vcf2.gz], [tbi1, tbi2]]": { "content": [ - [ - [ - { - "id": "test" - }, + { + "0": [ [ - "0000.vcf.gz:md5,a1e45fe6d2b386fc2611766e5d2937ee", - "0000.vcf.gz.tbi:md5,7f005943c935f2b55ba3f9d4802aa09f", - "0001.vcf.gz:md5,5937e33da388e9f6992ea0b44c5c2629", - "0001.vcf.gz.tbi:md5,2cdcee9edc71f6d84325d34d78d445cc", - "README.txt:md5,10fc33b66522645600d44afbd41fb792", - "sites.txt:md5,1cea3fbde7f6d3c97f3d39036f9690df" + { + "id": "test" + }, + [ + "0000.vcf.gz:md5,8e722884ffb75155212a3fc053918766", + "0000.vcf.gz.tbi:md5,7f005943c935f2b55ba3f9d4802aa09f", + "0001.vcf.gz:md5,b39a72f91458b94b346dd73690207649", + "0001.vcf.gz.tbi:md5,2cdcee9edc71f6d84325d34d78d445cc", + "README.txt:md5,10fc33b66522645600d44afbd41fb792", + "sites.txt:md5,1cea3fbde7f6d3c97f3d39036f9690df" + ] ] + ], + "1": [ + "versions.yml:md5,c9e98dd502f38110979feabbee9937df" + ], + "results": [ + [ + { + "id": "test" + }, + [ + "0000.vcf.gz:md5,8e722884ffb75155212a3fc053918766", + "0000.vcf.gz.tbi:md5,7f005943c935f2b55ba3f9d4802aa09f", + "0001.vcf.gz:md5,b39a72f91458b94b346dd73690207649", + "0001.vcf.gz.tbi:md5,2cdcee9edc71f6d84325d34d78d445cc", + "README.txt:md5,10fc33b66522645600d44afbd41fb792", + "sites.txt:md5,1cea3fbde7f6d3c97f3d39036f9690df" + ] + ] + ], + "versions": [ + "versions.yml:md5,c9e98dd502f38110979feabbee9937df" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-02T17:55:55.440643877" + }, + "sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - test": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "0000.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "0000.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e", + "0001.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "0001.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e", + "README.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "sites.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "1": [ + "versions.yml:md5,c9e98dd502f38110979feabbee9937df" + ], + "results": [ + [ + { + "id": "test" + }, + [ + "0000.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "0000.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e", + "0001.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "0001.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e", + "README.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "sites.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "versions": [ + "versions.yml:md5,c9e98dd502f38110979feabbee9937df" ] - ], - [ - "versions.yml:md5,c9e98dd502f38110979feabbee9937df" - ] + } ], - "timestamp": "2023-11-29T14:00:22.623656731" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-02T18:02:45.942307488" } } \ No newline at end of file From 6985c77090c675e0dfcd3313a89bd3eec5a7a528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Theresa=20St=C3=B6riko?= Date: Wed, 3 Jul 2024 09:42:31 +0000 Subject: [PATCH 4/8] Update meta.yml --- modules/nf-core/bcftools/isec/meta.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/nf-core/bcftools/isec/meta.yml b/modules/nf-core/bcftools/isec/meta.yml index 94f4256afbb..5d31568f6d7 100644 --- a/modules/nf-core/bcftools/isec/meta.yml +++ b/modules/nf-core/bcftools/isec/meta.yml @@ -6,6 +6,7 @@ keywords: - union - complement - VCF + - BCF tools: - isec: description: | @@ -23,13 +24,13 @@ input: - vcfs: type: list description: | - List containing 2 or more vcf files - e.g. [ 'file1.vcf', 'file2.vcf' ] + List containing 2 or more bgzipped vcf/bcf files + e.g. [ 'file1.vcf.gz', 'file2.vcf.gz' ] - tbis: type: list description: | - List containing the tbi index files corresponding to the vcfs input files - e.g. [ 'file1.vcf.tbi', 'file2.vcf.tbi' ] + List containing the tbi index files corresponding to the bcf/vcf input files + e.g. [ 'file1.vcf.gz.tbi', 'file2.vcf.gz.tbi' ] output: - meta: type: map From e7d522297be6d480622efb67f758855964a181e2 Mon Sep 17 00:00:00 2001 From: Simon Pearce <24893913+SPPearce@users.noreply.github.com> Date: Wed, 3 Jul 2024 09:49:14 +0000 Subject: [PATCH 5/8] Add stub to name of stub test --- .../nf-core/bcftools/isec/tests/main.nf.test | 2 +- .../bcftools/isec/tests/main.nf.test.snap | 22 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/nf-core/bcftools/isec/tests/main.nf.test b/modules/nf-core/bcftools/isec/tests/main.nf.test index 64da261c165..9cdc974acf4 100644 --- a/modules/nf-core/bcftools/isec/tests/main.nf.test +++ b/modules/nf-core/bcftools/isec/tests/main.nf.test @@ -40,7 +40,7 @@ nextflow_process { } - test("sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - test") { + test("sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - stub") { options "-stub" when { process { diff --git a/modules/nf-core/bcftools/isec/tests/main.nf.test.snap b/modules/nf-core/bcftools/isec/tests/main.nf.test.snap index 002bd505a64..a972b696af3 100644 --- a/modules/nf-core/bcftools/isec/tests/main.nf.test.snap +++ b/modules/nf-core/bcftools/isec/tests/main.nf.test.snap @@ -9,16 +9,16 @@ }, [ "0000.vcf.gz:md5,8e722884ffb75155212a3fc053918766", - "0000.vcf.gz.tbi:md5,7f005943c935f2b55ba3f9d4802aa09f", + "0000.vcf.gz.tbi:md5,1a1edb22d2a33f9673449827e1cd38e8", "0001.vcf.gz:md5,b39a72f91458b94b346dd73690207649", - "0001.vcf.gz.tbi:md5,2cdcee9edc71f6d84325d34d78d445cc", + "0001.vcf.gz.tbi:md5,3ac0168e5088c861a2b5bcf723155688", "README.txt:md5,10fc33b66522645600d44afbd41fb792", "sites.txt:md5,1cea3fbde7f6d3c97f3d39036f9690df" ] ] ], "1": [ - "versions.yml:md5,c9e98dd502f38110979feabbee9937df" + "versions.yml:md5,c5b5a1204cf56fec79d17e1913eaca27" ], "results": [ [ @@ -27,16 +27,16 @@ }, [ "0000.vcf.gz:md5,8e722884ffb75155212a3fc053918766", - "0000.vcf.gz.tbi:md5,7f005943c935f2b55ba3f9d4802aa09f", + "0000.vcf.gz.tbi:md5,1a1edb22d2a33f9673449827e1cd38e8", "0001.vcf.gz:md5,b39a72f91458b94b346dd73690207649", - "0001.vcf.gz.tbi:md5,2cdcee9edc71f6d84325d34d78d445cc", + "0001.vcf.gz.tbi:md5,3ac0168e5088c861a2b5bcf723155688", "README.txt:md5,10fc33b66522645600d44afbd41fb792", "sites.txt:md5,1cea3fbde7f6d3c97f3d39036f9690df" ] ] ], "versions": [ - "versions.yml:md5,c9e98dd502f38110979feabbee9937df" + "versions.yml:md5,c5b5a1204cf56fec79d17e1913eaca27" ] } ], @@ -44,9 +44,9 @@ "nf-test": "0.8.4", "nextflow": "24.04.2" }, - "timestamp": "2024-07-02T17:55:55.440643877" + "timestamp": "2024-07-03T09:39:57.504878272" }, - "sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - test": { + "sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - stub": { "content": [ { "0": [ @@ -65,7 +65,7 @@ ] ], "1": [ - "versions.yml:md5,c9e98dd502f38110979feabbee9937df" + "versions.yml:md5,c5b5a1204cf56fec79d17e1913eaca27" ], "results": [ [ @@ -83,7 +83,7 @@ ] ], "versions": [ - "versions.yml:md5,c9e98dd502f38110979feabbee9937df" + "versions.yml:md5,c5b5a1204cf56fec79d17e1913eaca27" ] } ], @@ -91,6 +91,6 @@ "nf-test": "0.8.4", "nextflow": "24.04.2" }, - "timestamp": "2024-07-02T18:02:45.942307488" + "timestamp": "2024-07-03T09:45:52.881120953" } } \ No newline at end of file From f3f35ede2f0cbaa779b94bd4ada7b9dc62e6e471 Mon Sep 17 00:00:00 2001 From: Simon Pearce <24893913+SPPearce@users.noreply.github.com> Date: Wed, 3 Jul 2024 09:50:38 +0000 Subject: [PATCH 6/8] Update meta --- modules/nf-core/bcftools/isec/meta.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/nf-core/bcftools/isec/meta.yml b/modules/nf-core/bcftools/isec/meta.yml index 5d31568f6d7..7da88e19b7b 100644 --- a/modules/nf-core/bcftools/isec/meta.yml +++ b/modules/nf-core/bcftools/isec/meta.yml @@ -24,13 +24,13 @@ input: - vcfs: type: list description: | - List containing 2 or more bgzipped vcf/bcf files - e.g. [ 'file1.vcf.gz', 'file2.vcf.gz' ] + List containing 2 or more vcf/bcf files. These must be compressed and have an associated index. + e.g. [ 'file1.vcf.gz', 'file2.vcf' ] - tbis: type: list description: | - List containing the tbi index files corresponding to the bcf/vcf input files - e.g. [ 'file1.vcf.gz.tbi', 'file2.vcf.gz.tbi' ] + List containing the tbi index files corresponding to the vcf/bcf input files + e.g. [ 'file1.vcf.tbi', 'file2.vcf.tbi' ] output: - meta: type: map From d15592c4fffb28448de2d96bc0d2f09119b7b730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Theresa=20St=C3=B6riko?= Date: Wed, 3 Jul 2024 16:06:51 +0000 Subject: [PATCH 7/8] Update tests Changes: - exclude .tbi files from snapshot due to failing conda tests - update main.nf.test.snap - specificy path type of the output --- modules/nf-core/bcftools/isec/main.nf | 4 +- .../nf-core/bcftools/isec/tests/main.nf.test | 11 +++- .../bcftools/isec/tests/main.nf.test.snap | 54 ++++++------------- 3 files changed, 27 insertions(+), 42 deletions(-) diff --git a/modules/nf-core/bcftools/isec/main.nf b/modules/nf-core/bcftools/isec/main.nf index b8a65db468d..80d18721b72 100644 --- a/modules/nf-core/bcftools/isec/main.nf +++ b/modules/nf-core/bcftools/isec/main.nf @@ -11,8 +11,8 @@ process BCFTOOLS_ISEC { tuple val(meta), path(vcfs), path(tbis) output: - tuple val(meta), path("${prefix}"), emit: results - path "versions.yml" , emit: versions + tuple val(meta), path("${prefix}", type: "dir"), emit: results + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when diff --git a/modules/nf-core/bcftools/isec/tests/main.nf.test b/modules/nf-core/bcftools/isec/tests/main.nf.test index 9cdc974acf4..c4923940d0f 100644 --- a/modules/nf-core/bcftools/isec/tests/main.nf.test +++ b/modules/nf-core/bcftools/isec/tests/main.nf.test @@ -32,9 +32,18 @@ nextflow_process { } then { + def results_dir = new File(process.out.results[0][1]) + def results_list = [] + results_dir.eachFileRecurse { file -> results_list << file.getName() } assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot( + results_list, + path("${process.out.results[0][1]}").list().findAll { + it.getFileName().toString() != "0000.vcf.gz.tbi" && it.getFileName().toString() != "0001.vcf.gz.tbi" + } + ).match() + } ) } diff --git a/modules/nf-core/bcftools/isec/tests/main.nf.test.snap b/modules/nf-core/bcftools/isec/tests/main.nf.test.snap index a972b696af3..eb9f72c041c 100644 --- a/modules/nf-core/bcftools/isec/tests/main.nf.test.snap +++ b/modules/nf-core/bcftools/isec/tests/main.nf.test.snap @@ -1,50 +1,26 @@ { "sarscov2 - [[vcf1.gz, vcf2.gz], [tbi1, tbi2]]": { "content": [ - { - "0": [ - [ - { - "id": "test" - }, - [ - "0000.vcf.gz:md5,8e722884ffb75155212a3fc053918766", - "0000.vcf.gz.tbi:md5,1a1edb22d2a33f9673449827e1cd38e8", - "0001.vcf.gz:md5,b39a72f91458b94b346dd73690207649", - "0001.vcf.gz.tbi:md5,3ac0168e5088c861a2b5bcf723155688", - "README.txt:md5,10fc33b66522645600d44afbd41fb792", - "sites.txt:md5,1cea3fbde7f6d3c97f3d39036f9690df" - ] - ] - ], - "1": [ - "versions.yml:md5,c5b5a1204cf56fec79d17e1913eaca27" - ], - "results": [ - [ - { - "id": "test" - }, - [ - "0000.vcf.gz:md5,8e722884ffb75155212a3fc053918766", - "0000.vcf.gz.tbi:md5,1a1edb22d2a33f9673449827e1cd38e8", - "0001.vcf.gz:md5,b39a72f91458b94b346dd73690207649", - "0001.vcf.gz.tbi:md5,3ac0168e5088c861a2b5bcf723155688", - "README.txt:md5,10fc33b66522645600d44afbd41fb792", - "sites.txt:md5,1cea3fbde7f6d3c97f3d39036f9690df" - ] - ] - ], - "versions": [ - "versions.yml:md5,c5b5a1204cf56fec79d17e1913eaca27" - ] - } + [ + "README.txt", + "0000.vcf.gz", + "0001.vcf.gz", + "sites.txt", + "0000.vcf.gz.tbi", + "0001.vcf.gz.tbi" + ], + [ + "0000.vcf.gz:md5,8e722884ffb75155212a3fc053918766", + "0001.vcf.gz:md5,b39a72f91458b94b346dd73690207649", + "README.txt:md5,10fc33b66522645600d44afbd41fb792", + "sites.txt:md5,1cea3fbde7f6d3c97f3d39036f9690df" + ] ], "meta": { "nf-test": "0.8.4", "nextflow": "24.04.2" }, - "timestamp": "2024-07-03T09:39:57.504878272" + "timestamp": "2024-07-03T15:30:13.99495369" }, "sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - stub": { "content": [ From 74e97d0687adce38bceb70732595f834d4d63b27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Theresa=20St=C3=B6riko?= Date: Wed, 3 Jul 2024 16:37:49 +0000 Subject: [PATCH 8/8] Update tests again Changes: - include versions - sort file name list for consistent order - update snapshot --- modules/nf-core/bcftools/isec/tests/main.nf.test | 3 ++- .../nf-core/bcftools/isec/tests/main.nf.test.snap | 13 ++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/nf-core/bcftools/isec/tests/main.nf.test b/modules/nf-core/bcftools/isec/tests/main.nf.test index c4923940d0f..ca8fc6e32eb 100644 --- a/modules/nf-core/bcftools/isec/tests/main.nf.test +++ b/modules/nf-core/bcftools/isec/tests/main.nf.test @@ -38,7 +38,8 @@ nextflow_process { assertAll( { assert process.success }, { assert snapshot( - results_list, + process.out.versions, + results_list.sort(), path("${process.out.results[0][1]}").list().findAll { it.getFileName().toString() != "0000.vcf.gz.tbi" && it.getFileName().toString() != "0001.vcf.gz.tbi" } diff --git a/modules/nf-core/bcftools/isec/tests/main.nf.test.snap b/modules/nf-core/bcftools/isec/tests/main.nf.test.snap index eb9f72c041c..817ca2dc9ab 100644 --- a/modules/nf-core/bcftools/isec/tests/main.nf.test.snap +++ b/modules/nf-core/bcftools/isec/tests/main.nf.test.snap @@ -2,12 +2,15 @@ "sarscov2 - [[vcf1.gz, vcf2.gz], [tbi1, tbi2]]": { "content": [ [ - "README.txt", + "versions.yml:md5,c5b5a1204cf56fec79d17e1913eaca27" + ], + [ "0000.vcf.gz", - "0001.vcf.gz", - "sites.txt", "0000.vcf.gz.tbi", - "0001.vcf.gz.tbi" + "0001.vcf.gz", + "0001.vcf.gz.tbi", + "README.txt", + "sites.txt" ], [ "0000.vcf.gz:md5,8e722884ffb75155212a3fc053918766", @@ -20,7 +23,7 @@ "nf-test": "0.8.4", "nextflow": "24.04.2" }, - "timestamp": "2024-07-03T15:30:13.99495369" + "timestamp": "2024-07-03T16:32:18.167072863" }, "sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - stub": { "content": [