From d13a24d0aa07ddb3604fb707d7abd5300b26d9eb Mon Sep 17 00:00:00 2001 From: DLBPointon Date: Fri, 2 Feb 2024 16:14:05 +0000 Subject: [PATCH 01/15] Adding seqkit concat --- modules/nf-core/seqkit/concat/environment.yml | 9 +++ modules/nf-core/seqkit/concat/main.nf | 47 +++++++++++++ modules/nf-core/seqkit/concat/meta.yml | 54 +++++++++++++++ .../nf-core/seqkit/concat/tests/main.nf.test | 66 +++++++++++++++++++ .../seqkit/concat/tests/main.nf.test.snap | 47 +++++++++++++ .../seqkit/concat/tests/nextflow.config | 5 ++ modules/nf-core/seqkit/concat/tests/tags.yml | 2 + 7 files changed, 230 insertions(+) create mode 100644 modules/nf-core/seqkit/concat/environment.yml create mode 100644 modules/nf-core/seqkit/concat/main.nf create mode 100644 modules/nf-core/seqkit/concat/meta.yml create mode 100644 modules/nf-core/seqkit/concat/tests/main.nf.test create mode 100644 modules/nf-core/seqkit/concat/tests/main.nf.test.snap create mode 100644 modules/nf-core/seqkit/concat/tests/nextflow.config create mode 100644 modules/nf-core/seqkit/concat/tests/tags.yml diff --git a/modules/nf-core/seqkit/concat/environment.yml b/modules/nf-core/seqkit/concat/environment.yml new file mode 100644 index 00000000000..67630143f89 --- /dev/null +++ b/modules/nf-core/seqkit/concat/environment.yml @@ -0,0 +1,9 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +name: "seqkit_concat" +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - "bioconda::seqkit=2.6.1" diff --git a/modules/nf-core/seqkit/concat/main.nf b/modules/nf-core/seqkit/concat/main.nf new file mode 100644 index 00000000000..0579421a58f --- /dev/null +++ b/modules/nf-core/seqkit/concat/main.nf @@ -0,0 +1,47 @@ +process SEQKIT_CONCAT { + tag "$meta.id" + label 'process_low' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/seqkit:2.6.0--h9ee0642_0' : + 'biocontainers/seqkit:2.6.0--h9ee0642_0' }" + + input: + tuple val(meta), path(input, stageAs: 'in/*') + + output: + tuple val(meta), path("*.{fasta,fastq,fa,fq,fas,fna,faa}"), emit: fastx + path "versions.yml", emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: "" + def prefix = task.ext.prefix ?: "${meta.id}" + def file_type = input instanceof List ? input[0].getExtension() : input.getExtension() + """ + seqkit \\ + concat \\ + in/* \\ + $args > ${prefix}.${file_type} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + seqkit: \$( seqkit | sed '3!d; s/Version: //' ) + END_VERSIONS + """ + + stub: + def args = task.ext.args ?: "" + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.fasta + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + seqkit: \$( seqkit version | sed 's/seqkit v//' ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/seqkit/concat/meta.yml b/modules/nf-core/seqkit/concat/meta.yml new file mode 100644 index 00000000000..ca9b7ef12cd --- /dev/null +++ b/modules/nf-core/seqkit/concat/meta.yml @@ -0,0 +1,54 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json +name: "seqkit_concat" +description: Concatenating multiple uncompressed sequence files together +keywords: + - concat + - fasta + - fastq + - merge +tools: + - seqkit: + description: | + Cross-platform and ultrafast toolkit for FASTA/Q file manipulation, written by Wei Shen. + homepage: https://github.com/shenwei356/seqkit + documentation: https://bioinf.shenwei.me/seqkit/ + tool_dev_url: https://github.com/shenwei356/seqkit + doi: 10.1371/journal.pone.0163962 + licence: ['MIT'] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + + - input: + type: file + description: Sequence file in fasta/q format + pattern: "*.{fasta,fastq,fa,fq,fas,fna,faa}" + +## TODO nf-core: Add a description of all of the variables used as output +output: + #Only when we have meta + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + + - fastx: + type: file + description: A concatenated sequence file + pattern: "*.{fasta,fastq,fa,fq,fas,fna,faa}" + + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@DLBPointon" +maintainers: + - "@DLBPointon" diff --git a/modules/nf-core/seqkit/concat/tests/main.nf.test b/modules/nf-core/seqkit/concat/tests/main.nf.test new file mode 100644 index 00000000000..43681c152b0 --- /dev/null +++ b/modules/nf-core/seqkit/concat/tests/main.nf.test @@ -0,0 +1,66 @@ +// TODO nf-core: Once you have added the required tests, please run the following command to build this file: +// nf-core modules test seqkit/concat +nextflow_process { + + name "Test Process SEQKIT_CONCAT" + script "../main.nf" + process "SEQKIT_CONCAT" + config "./nextflow.config" + + tag "modules" + tag "modules_nfcore" + tag "seqkit" + tag "seqkit/concat" + + test("sarscov2 and human primers - fasta") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true), + file(params.test_data['homo_sapiens']['pacbio']['primers'], checkIfExists: true ) + ] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() }, + { assert snapshot(process.out.versions).match("versions")} + ) + } + } + + test("sarscov2 and human primers - fasta - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true), + file(params.test_data['homo_sapiens']['pacbio']['primers'], checkIfExists: true ) + ] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() }, + { assert snapshot(process.out.versions).match("versions")} + ) + } + } +} diff --git a/modules/nf-core/seqkit/concat/tests/main.nf.test.snap b/modules/nf-core/seqkit/concat/tests/main.nf.test.snap new file mode 100644 index 00000000000..64ca6e531c1 --- /dev/null +++ b/modules/nf-core/seqkit/concat/tests/main.nf.test.snap @@ -0,0 +1,47 @@ +{ + "sarscov2 and human primers - fasta": { + "content": [ + [ + "versions.yml:md5,2b8887c6a8c9702b62ca83a2000becd3" + ], + [ + [ + { + "id": "test" + }, + "test.fasta:md5,2ba0ae8ae9c6e1e11d90f7e3a293224b" + ] + ] + ], + "timestamp": "2024-01-30T17:36:40.810917" + }, + "sarscov2 and human primers - fasta - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,2b8887c6a8c9702b62ca83a2000becd3" + ], + "fastx": [ + [ + { + "id": "test" + }, + "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,2b8887c6a8c9702b62ca83a2000becd3" + ] + } + ], + "timestamp": "2024-01-30T17:36:47.426513" + } +} \ No newline at end of file diff --git a/modules/nf-core/seqkit/concat/tests/nextflow.config b/modules/nf-core/seqkit/concat/tests/nextflow.config new file mode 100644 index 00000000000..89d4fe3a412 --- /dev/null +++ b/modules/nf-core/seqkit/concat/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: SEQKIT_CONCAT { + ext.args = "--full" + } +} diff --git a/modules/nf-core/seqkit/concat/tests/tags.yml b/modules/nf-core/seqkit/concat/tests/tags.yml new file mode 100644 index 00000000000..cabcd5cf3dc --- /dev/null +++ b/modules/nf-core/seqkit/concat/tests/tags.yml @@ -0,0 +1,2 @@ +seqkit/concat: + - "modules/nf-core/seqkit/concat/**" From 150e0f9fac15b15f14b0d2c71a259ecacfba324f Mon Sep 17 00:00:00 2001 From: DLBPointon Date: Fri, 2 Feb 2024 16:20:14 +0000 Subject: [PATCH 02/15] Prettier --- modules/nf-core/seqkit/concat/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/seqkit/concat/meta.yml b/modules/nf-core/seqkit/concat/meta.yml index ca9b7ef12cd..2fd9ff24cf1 100644 --- a/modules/nf-core/seqkit/concat/meta.yml +++ b/modules/nf-core/seqkit/concat/meta.yml @@ -15,7 +15,7 @@ tools: documentation: https://bioinf.shenwei.me/seqkit/ tool_dev_url: https://github.com/shenwei356/seqkit doi: 10.1371/journal.pone.0163962 - licence: ['MIT'] + licence: ["MIT"] input: - meta: From 201a30603a93fe454a9689b8ce8331e19054f6aa Mon Sep 17 00:00:00 2001 From: DLBPointon Date: Fri, 2 Feb 2024 16:51:09 +0000 Subject: [PATCH 03/15] Updates --- modules/nf-core/seqkit/concat/main.nf | 8 +-- .../seqkit/concat/tests/main.nf.test.snap | 49 +++++++++++++------ 2 files changed, 38 insertions(+), 19 deletions(-) diff --git a/modules/nf-core/seqkit/concat/main.nf b/modules/nf-core/seqkit/concat/main.nf index 0579421a58f..fe314d077ab 100644 --- a/modules/nf-core/seqkit/concat/main.nf +++ b/modules/nf-core/seqkit/concat/main.nf @@ -4,8 +4,8 @@ process SEQKIT_CONCAT { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/seqkit:2.6.0--h9ee0642_0' : - 'biocontainers/seqkit:2.6.0--h9ee0642_0' }" + 'https://depot.galaxyproject.org/singularity/seqkit:2.6.1--h9ee0642_0': + 'biocontainers/seqkit:2.6.1--h9ee0642_0' }" input: tuple val(meta), path(input, stageAs: 'in/*') @@ -29,7 +29,7 @@ process SEQKIT_CONCAT { cat <<-END_VERSIONS > versions.yml "${task.process}": - seqkit: \$( seqkit | sed '3!d; s/Version: //' ) + seqkit: \$(seqkit version | cut -d' ' -f2) END_VERSIONS """ @@ -41,7 +41,7 @@ process SEQKIT_CONCAT { cat <<-END_VERSIONS > versions.yml "${task.process}": - seqkit: \$( seqkit version | sed 's/seqkit v//' ) + seqkit: \$(seqkit version | cut -d' ' -f2) END_VERSIONS """ } diff --git a/modules/nf-core/seqkit/concat/tests/main.nf.test.snap b/modules/nf-core/seqkit/concat/tests/main.nf.test.snap index 64ca6e531c1..77e51b719a3 100644 --- a/modules/nf-core/seqkit/concat/tests/main.nf.test.snap +++ b/modules/nf-core/seqkit/concat/tests/main.nf.test.snap @@ -1,19 +1,30 @@ { "sarscov2 and human primers - fasta": { "content": [ - [ - "versions.yml:md5,2b8887c6a8c9702b62ca83a2000becd3" - ], - [ - [ - { - "id": "test" - }, - "test.fasta:md5,2ba0ae8ae9c6e1e11d90f7e3a293224b" - ] - ] + { + "0": [ + { + "id": "test" + }, + "test.fasta:md5,2ba0ae8ae9c6e1e11d90f7e3a293224b" + + ], + "1": [ + "versions.yml:md5,faf4b57fe96a4761d9656382c1d37c60" + ], + "fastx": [ + { + "id": "test" + }, + "test.fasta:md5,2ba0ae8ae9c6e1e11d90f7e3a293224b" + + ], + "versions": [ + "versions.yml:md5,faf4b57fe96a4761d9656382c1d37c60" + ], + } ], - "timestamp": "2024-01-30T17:36:40.810917" + "timestamp": "2024-02-02T16:36:50.693372" }, "sarscov2 and human primers - fasta - stub": { "content": [ @@ -27,7 +38,7 @@ ] ], "1": [ - "versions.yml:md5,2b8887c6a8c9702b62ca83a2000becd3" + "versions.yml:md5,faf4b57fe96a4761d9656382c1d37c60" ], "fastx": [ [ @@ -38,10 +49,18 @@ ] ], "versions": [ - "versions.yml:md5,2b8887c6a8c9702b62ca83a2000becd3" + "versions.yml:md5,faf4b57fe96a4761d9656382c1d37c60" ] } ], - "timestamp": "2024-01-30T17:36:47.426513" + "timestamp": "2024-02-02T16:36:56.948626" + }, + "versions": { + "content": [ + [ + + ] + ], + "timestamp": "2024-02-02T16:36:50.712815" } } \ No newline at end of file From cf23803fd8d2ea6fdfe2c7ad876089df7ecee68c Mon Sep 17 00:00:00 2001 From: DLBPointon Date: Fri, 2 Feb 2024 16:56:02 +0000 Subject: [PATCH 04/15] Update format --- modules/nf-core/seqkit/concat/tests/main.nf.test.snap | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/nf-core/seqkit/concat/tests/main.nf.test.snap b/modules/nf-core/seqkit/concat/tests/main.nf.test.snap index 77e51b719a3..02ad06ea2fc 100644 --- a/modules/nf-core/seqkit/concat/tests/main.nf.test.snap +++ b/modules/nf-core/seqkit/concat/tests/main.nf.test.snap @@ -3,21 +3,23 @@ "content": [ { "0": [ + [ { "id": "test" }, - "test.fasta:md5,2ba0ae8ae9c6e1e11d90f7e3a293224b" - + "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ], "1": [ "versions.yml:md5,faf4b57fe96a4761d9656382c1d37c60" ], "fastx": [ + [ { "id": "test" }, - "test.fasta:md5,2ba0ae8ae9c6e1e11d90f7e3a293224b" - + "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ], "versions": [ "versions.yml:md5,faf4b57fe96a4761d9656382c1d37c60" From 84609536132a203e8d6d49220dea6af1f464a2b1 Mon Sep 17 00:00:00 2001 From: DLBPointon Date: Mon, 5 Feb 2024 09:50:11 +0000 Subject: [PATCH 05/15] Correct md5sum --- modules/nf-core/seqkit/concat/tests/main.nf.test.snap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/nf-core/seqkit/concat/tests/main.nf.test.snap b/modules/nf-core/seqkit/concat/tests/main.nf.test.snap index 02ad06ea2fc..79ae0305c0b 100644 --- a/modules/nf-core/seqkit/concat/tests/main.nf.test.snap +++ b/modules/nf-core/seqkit/concat/tests/main.nf.test.snap @@ -51,7 +51,7 @@ ] ], "versions": [ - "versions.yml:md5,faf4b57fe96a4761d9656382c1d37c60" + "versions.yml:md5,1c21bd6352b40121fca8a8ea6c4996aa" ] } ], @@ -60,7 +60,7 @@ "versions": { "content": [ [ - + "versions.yml:md5,1c21bd6352b40121fca8a8ea6c4996aa" ] ], "timestamp": "2024-02-02T16:36:50.712815" From 5d607e6da287e26a20a2f3c2e1a6d173aadd3a58 Mon Sep 17 00:00:00 2001 From: DLBPointon Date: Tue, 6 Feb 2024 12:48:55 +0000 Subject: [PATCH 06/15] Updated to 2.7.0, further attempts to get it working --- modules/nf-core/seqkit/concat/environment.yml | 2 +- modules/nf-core/seqkit/concat/main.nf | 8 ++++---- .../nf-core/seqkit/concat/tests/main.nf.test | 7 +++---- .../seqkit/concat/tests/main.nf.test.snap | 19 ++++++++++--------- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/modules/nf-core/seqkit/concat/environment.yml b/modules/nf-core/seqkit/concat/environment.yml index 67630143f89..67f003dc24c 100644 --- a/modules/nf-core/seqkit/concat/environment.yml +++ b/modules/nf-core/seqkit/concat/environment.yml @@ -6,4 +6,4 @@ channels: - bioconda - defaults dependencies: - - "bioconda::seqkit=2.6.1" + - "bioconda::seqkit=2.7.0" diff --git a/modules/nf-core/seqkit/concat/main.nf b/modules/nf-core/seqkit/concat/main.nf index fe314d077ab..1c2a27694db 100644 --- a/modules/nf-core/seqkit/concat/main.nf +++ b/modules/nf-core/seqkit/concat/main.nf @@ -4,8 +4,8 @@ process SEQKIT_CONCAT { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/seqkit:2.6.1--h9ee0642_0': - 'biocontainers/seqkit:2.6.1--h9ee0642_0' }" + 'https://depot.galaxyproject.org/singularity/seqkit:2.7.0--h9ee0642_0': + 'biocontainers/seqkit:2.7.0--h9ee0642_0' }" input: tuple val(meta), path(input, stageAs: 'in/*') @@ -24,8 +24,8 @@ process SEQKIT_CONCAT { """ seqkit \\ concat \\ - in/* \\ - $args > ${prefix}.${file_type} + $args \\ + in/* > ${prefix}.${file_type} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/seqkit/concat/tests/main.nf.test b/modules/nf-core/seqkit/concat/tests/main.nf.test index 43681c152b0..70f4efcffde 100644 --- a/modules/nf-core/seqkit/concat/tests/main.nf.test +++ b/modules/nf-core/seqkit/concat/tests/main.nf.test @@ -13,16 +13,15 @@ nextflow_process { tag "seqkit/concat" test("sarscov2 and human primers - fasta") { - when { process { """ input[0] = [ [ id:'test' ], // meta map - [ + [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true), file(params.test_data['homo_sapiens']['pacbio']['primers'], checkIfExists: true ) - ] + ] ] """ } @@ -39,7 +38,7 @@ nextflow_process { test("sarscov2 and human primers - fasta - stub") { - options "-stub" + options '-stub' when { process { diff --git a/modules/nf-core/seqkit/concat/tests/main.nf.test.snap b/modules/nf-core/seqkit/concat/tests/main.nf.test.snap index 79ae0305c0b..1a704c35d0d 100644 --- a/modules/nf-core/seqkit/concat/tests/main.nf.test.snap +++ b/modules/nf-core/seqkit/concat/tests/main.nf.test.snap @@ -7,26 +7,27 @@ { "id": "test" }, - "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.fasta:md5,cb0fcf021793378e3b44e45b855e9488" ] + ], "1": [ - "versions.yml:md5,faf4b57fe96a4761d9656382c1d37c60" + "versions.yml:md5,ab83026872e602f48838e90b954f0c12" ], "fastx": [ [ { "id": "test" }, - "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.fasta:md5,cb0fcf021793378e3b44e45b855e9488" ] ], "versions": [ - "versions.yml:md5,faf4b57fe96a4761d9656382c1d37c60" + "versions.yml:md5,ab83026872e602f48838e90b954f0c12" ], } ], - "timestamp": "2024-02-02T16:36:50.693372" + "timestamp": "2024-02-06T12:28:45.133125" }, "sarscov2 and human primers - fasta - stub": { "content": [ @@ -51,18 +52,18 @@ ] ], "versions": [ - "versions.yml:md5,1c21bd6352b40121fca8a8ea6c4996aa" + "versions.yml:md5,faf4b57fe96a4761d9656382c1d37c60" ] } ], - "timestamp": "2024-02-02T16:36:56.948626" + "timestamp": "2024-02-06T12:29:11.61356" }, "versions": { "content": [ [ - "versions.yml:md5,1c21bd6352b40121fca8a8ea6c4996aa" + "versions.yml:md5,ab83026872e602f48838e90b954f0c12" ] ], - "timestamp": "2024-02-02T16:36:50.712815" + "timestamp": "2024-02-06T12:28:45.152951" } } \ No newline at end of file From 405208e6bce393ce8e58b84366325ba62c99d8ad Mon Sep 17 00:00:00 2001 From: DLBPointon Date: Tue, 6 Feb 2024 13:18:02 +0000 Subject: [PATCH 07/15] Corrected tests --- .../nf-core/seqkit/concat/tests/main.nf.test | 7 ++- .../seqkit/concat/tests/main.nf.test.snap | 61 +------------------ 2 files changed, 6 insertions(+), 62 deletions(-) diff --git a/modules/nf-core/seqkit/concat/tests/main.nf.test b/modules/nf-core/seqkit/concat/tests/main.nf.test index 70f4efcffde..a6a1967281d 100644 --- a/modules/nf-core/seqkit/concat/tests/main.nf.test +++ b/modules/nf-core/seqkit/concat/tests/main.nf.test @@ -30,9 +30,13 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() }, { assert snapshot(process.out.versions).match("versions")} ) + with(process.out.fastx) { + // Including headers from both input files + assert path(get(0).get(1)).readLines().any { it.contains('>NEB_Clontech_3p') } + assert path(get(0).get(1)).readLines().any { it.contains('>MT192765.1 Severe acute respiratory syndrome coronavirus 2 isolate SARS-CoV-2/human/USA/PC00101P/2020, complete genome') } + } } } @@ -57,7 +61,6 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() }, { assert snapshot(process.out.versions).match("versions")} ) } diff --git a/modules/nf-core/seqkit/concat/tests/main.nf.test.snap b/modules/nf-core/seqkit/concat/tests/main.nf.test.snap index 1a704c35d0d..9f74b1cabf2 100644 --- a/modules/nf-core/seqkit/concat/tests/main.nf.test.snap +++ b/modules/nf-core/seqkit/concat/tests/main.nf.test.snap @@ -1,69 +1,10 @@ { - "sarscov2 and human primers - fasta": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.fasta:md5,cb0fcf021793378e3b44e45b855e9488" - ] - - ], - "1": [ - "versions.yml:md5,ab83026872e602f48838e90b954f0c12" - ], - "fastx": [ - [ - { - "id": "test" - }, - "test.fasta:md5,cb0fcf021793378e3b44e45b855e9488" - ] - ], - "versions": [ - "versions.yml:md5,ab83026872e602f48838e90b954f0c12" - ], - } - ], - "timestamp": "2024-02-06T12:28:45.133125" - }, - "sarscov2 and human primers - fasta - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - "versions.yml:md5,faf4b57fe96a4761d9656382c1d37c60" - ], - "fastx": [ - [ - { - "id": "test" - }, - "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,faf4b57fe96a4761d9656382c1d37c60" - ] - } - ], - "timestamp": "2024-02-06T12:29:11.61356" - }, "versions": { "content": [ [ "versions.yml:md5,ab83026872e602f48838e90b954f0c12" ] ], - "timestamp": "2024-02-06T12:28:45.152951" + "timestamp": "2024-02-06T13:17:10.416922" } } \ No newline at end of file From 36e22b7c7ed2a409e06fc99f87022146bd7eb499 Mon Sep 17 00:00:00 2001 From: DLBPointon Date: Tue, 6 Feb 2024 13:26:16 +0000 Subject: [PATCH 08/15] Corrected tests --- modules/nf-core/seqkit/concat/tests/main.nf.test.snap | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 modules/nf-core/seqkit/concat/tests/main.nf.test.snap diff --git a/modules/nf-core/seqkit/concat/tests/main.nf.test.snap b/modules/nf-core/seqkit/concat/tests/main.nf.test.snap deleted file mode 100644 index 9f74b1cabf2..00000000000 --- a/modules/nf-core/seqkit/concat/tests/main.nf.test.snap +++ /dev/null @@ -1,10 +0,0 @@ -{ - "versions": { - "content": [ - [ - "versions.yml:md5,ab83026872e602f48838e90b954f0c12" - ] - ], - "timestamp": "2024-02-06T13:17:10.416922" - } -} \ No newline at end of file From 444f08fd52886452d04e2d95c078b734ae3e579f Mon Sep 17 00:00:00 2001 From: DLBPointon Date: Tue, 6 Feb 2024 13:30:31 +0000 Subject: [PATCH 09/15] Corrected tests --- modules/nf-core/seqkit/concat/tests/main.nf.test.snap | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 modules/nf-core/seqkit/concat/tests/main.nf.test.snap diff --git a/modules/nf-core/seqkit/concat/tests/main.nf.test.snap b/modules/nf-core/seqkit/concat/tests/main.nf.test.snap new file mode 100644 index 00000000000..d42eae5a65b --- /dev/null +++ b/modules/nf-core/seqkit/concat/tests/main.nf.test.snap @@ -0,0 +1,10 @@ +{ + "versions": { + "content": [ + [ + "versions.yml:md5,ab83026872e602f48838e90b954f0c12" + ] + ], + "timestamp": "2024-02-06T13:28:32.07487" + } +} \ No newline at end of file From 470993bd3d40d0f13dfa0ab117fb15a40022c9b9 Mon Sep 17 00:00:00 2001 From: Damon-Lee Pointon <51855558+DLBPointon@users.noreply.github.com> Date: Tue, 6 Feb 2024 14:05:49 +0000 Subject: [PATCH 10/15] Update modules/nf-core/seqkit/concat/tests/main.nf.test Co-authored-by: Maxime U Garcia --- modules/nf-core/seqkit/concat/tests/main.nf.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/seqkit/concat/tests/main.nf.test b/modules/nf-core/seqkit/concat/tests/main.nf.test index a6a1967281d..34a98d13e04 100644 --- a/modules/nf-core/seqkit/concat/tests/main.nf.test +++ b/modules/nf-core/seqkit/concat/tests/main.nf.test @@ -61,7 +61,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.versions).match("versions")} + { assert snapshot(process.out.versions).match("versions_stub")} ) } } From 4b2b744d45fe789cb8f626cb755184467460f8e9 Mon Sep 17 00:00:00 2001 From: Michael L Heuer Date: Wed, 7 Feb 2024 09:29:44 -0600 Subject: [PATCH 11/15] Update modules/nf-core/seqkit/concat/tests/main.nf.test Co-authored-by: Sateesh_Peri <33637490+sateeshperi@users.noreply.github.com> --- modules/nf-core/seqkit/concat/tests/main.nf.test | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/nf-core/seqkit/concat/tests/main.nf.test b/modules/nf-core/seqkit/concat/tests/main.nf.test index 34a98d13e04..eb461e5890d 100644 --- a/modules/nf-core/seqkit/concat/tests/main.nf.test +++ b/modules/nf-core/seqkit/concat/tests/main.nf.test @@ -1,5 +1,3 @@ -// TODO nf-core: Once you have added the required tests, please run the following command to build this file: -// nf-core modules test seqkit/concat nextflow_process { name "Test Process SEQKIT_CONCAT" From 66cad083675ed4eda93c64fe5c2634576d3afb09 Mon Sep 17 00:00:00 2001 From: Damon-Lee Pointon <51855558+DLBPointon@users.noreply.github.com> Date: Wed, 7 Feb 2024 16:05:44 +0000 Subject: [PATCH 12/15] Update modules/nf-core/seqkit/concat/tests/main.nf.test Co-authored-by: Sateesh_Peri <33637490+sateeshperi@users.noreply.github.com> --- modules/nf-core/seqkit/concat/tests/main.nf.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/seqkit/concat/tests/main.nf.test b/modules/nf-core/seqkit/concat/tests/main.nf.test index eb461e5890d..6460224aeed 100644 --- a/modules/nf-core/seqkit/concat/tests/main.nf.test +++ b/modules/nf-core/seqkit/concat/tests/main.nf.test @@ -28,7 +28,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.versions).match("versions")} + { assert snapshot(process.out.versions).match()} ) with(process.out.fastx) { // Including headers from both input files From e43c62aab1a33f125b00e635e2d765ef9b7069d4 Mon Sep 17 00:00:00 2001 From: Damon-Lee Pointon <51855558+DLBPointon@users.noreply.github.com> Date: Wed, 7 Feb 2024 16:05:50 +0000 Subject: [PATCH 13/15] Update modules/nf-core/seqkit/concat/tests/main.nf.test Co-authored-by: Sateesh_Peri <33637490+sateeshperi@users.noreply.github.com> --- modules/nf-core/seqkit/concat/tests/main.nf.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/seqkit/concat/tests/main.nf.test b/modules/nf-core/seqkit/concat/tests/main.nf.test index 6460224aeed..89440947a41 100644 --- a/modules/nf-core/seqkit/concat/tests/main.nf.test +++ b/modules/nf-core/seqkit/concat/tests/main.nf.test @@ -59,7 +59,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.versions).match("versions_stub")} + { assert snapshot(process.out.versions).match()} ) } } From 378224be46820aa0b6e31dfab3862d6fb9d95a96 Mon Sep 17 00:00:00 2001 From: DLBPointon Date: Wed, 7 Feb 2024 16:52:46 +0000 Subject: [PATCH 14/15] Updating Snapshot --- .../nf-core/seqkit/concat/tests/main.nf.test.snap | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/nf-core/seqkit/concat/tests/main.nf.test.snap b/modules/nf-core/seqkit/concat/tests/main.nf.test.snap index d42eae5a65b..d4be00e5b0d 100644 --- a/modules/nf-core/seqkit/concat/tests/main.nf.test.snap +++ b/modules/nf-core/seqkit/concat/tests/main.nf.test.snap @@ -1,10 +1,18 @@ { - "versions": { + "sarscov2 and human primers - fasta": { "content": [ [ "versions.yml:md5,ab83026872e602f48838e90b954f0c12" ] ], - "timestamp": "2024-02-06T13:28:32.07487" + "timestamp": "2024-02-07T16:51:29.211368" + }, + "sarscov2 and human primers - fasta - stub": { + "content": [ + [ + "versions.yml:md5,ab83026872e602f48838e90b954f0c12" + ] + ], + "timestamp": "2024-02-07T16:51:37.962459" } } \ No newline at end of file From 5c27dfbe0462c06de4e7c3c7a942c31b287b7d04 Mon Sep 17 00:00:00 2001 From: Damon-Lee Pointon <51855558+DLBPointon@users.noreply.github.com> Date: Fri, 9 Feb 2024 12:35:06 +0000 Subject: [PATCH 15/15] Update main.nf Remove unnecessary args assignment for stub --- modules/nf-core/seqkit/concat/main.nf | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/nf-core/seqkit/concat/main.nf b/modules/nf-core/seqkit/concat/main.nf index 1c2a27694db..534db39c76a 100644 --- a/modules/nf-core/seqkit/concat/main.nf +++ b/modules/nf-core/seqkit/concat/main.nf @@ -34,7 +34,6 @@ process SEQKIT_CONCAT { """ stub: - def args = task.ext.args ?: "" def prefix = task.ext.prefix ?: "${meta.id}" """ touch ${prefix}.fasta