From 7613d3fc06bd399a7c373820769c517c8f357398 Mon Sep 17 00:00:00 2001 From: Simon Pearce <24893913+SPPearce@users.noreply.github.com> Date: Wed, 8 Jul 2026 05:30:28 +0000 Subject: [PATCH 1/3] Swap poolsnp to topics --- modules/nf-core/poolsnp/main.nf | 14 +------ modules/nf-core/poolsnp/meta.yml | 48 ++++++++++++++-------- modules/nf-core/poolsnp/tests/main.nf.test | 8 ++-- 3 files changed, 37 insertions(+), 33 deletions(-) diff --git a/modules/nf-core/poolsnp/main.nf b/modules/nf-core/poolsnp/main.nf index 3fec0e3ecc20..8fac46d2a121 100644 --- a/modules/nf-core/poolsnp/main.nf +++ b/modules/nf-core/poolsnp/main.nf @@ -16,7 +16,7 @@ process POOLSNP { tuple val(meta), path("*.vcf.gz") , emit: vcf tuple val(meta), path("*cov-*.txt"), emit: max_cov , optional: true tuple val(meta), path("*BS.txt.gz"), emit: bad_sites, optional: true - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('poolsnp'), val('1.0.1'), emit: versions_poolsnp, topic: versions // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. when: task.ext.when == null || task.ext.when @@ -24,7 +24,6 @@ process POOLSNP { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def VERSION = '1.0.1' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. assert (!max_cov && max_cov_file) || (max_cov && !max_cov_file) """ @@ -36,16 +35,10 @@ process POOLSNP { jobs=${task.cpus} \\ max-cov=${max_cov ? "${max_cov}" : "\$PWD/${max_cov_file}"} \\ $args - - cat <<-END_VERSIONS > versions.yml - ${task.process}: - poolsnp: "${VERSION}" - END_VERSIONS """ stub: def prefix = task.ext.prefix ?: "${meta.id}" - def VERSION = '1.0.1' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. """ echo "##fileformat=VCFv4.2" > ${prefix}.vcf @@ -53,10 +46,5 @@ process POOLSNP { gzip ${prefix}.vcf ${max_cov ? "touch ${prefix}_cov-${max_cov}.txt" : ""} echo "" | gzip > ${prefix}_BS.txt.gz - - cat <<-END_VERSIONS > versions.yml - ${task.process}: - poolsnp: "${VERSION}" - END_VERSIONS """ } diff --git a/modules/nf-core/poolsnp/meta.yml b/modules/nf-core/poolsnp/meta.yml index e8d1c93007c4..1919782f63ac 100644 --- a/modules/nf-core/poolsnp/meta.yml +++ b/modules/nf-core/poolsnp/meta.yml @@ -1,7 +1,6 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json name: "poolsnp" -description: PoolSNP is a heuristic SNP caller, which uses an MPILEUP file and a reference - genome in FASTA format as inputs. +description: PoolSNP is a heuristic SNP caller, which uses an MPILEUP file and a + reference genome in FASTA format as inputs. keywords: - poolseq - mpileup @@ -12,7 +11,8 @@ tools: a reference genome in FASTA format as inputs." homepage: "https://github.com/capoony/PoolSNP" documentation: "https://github.com/capoony/PoolSNP/blob/master/README.md" - licence: ["Apache-2.0"] + licence: + - "Apache-2.0" args_id: "$args" identifier: "" @@ -77,8 +77,8 @@ output: e.g. `[ id:'sample1', single_end:false ]` - "*.vcf.gz": type: file - description: Gzipped VCF file containing allele counts and frequencies for - every position and library + description: Gzipped VCF file containing allele counts and frequencies + for every position and library pattern: "*.vcf.gz" ontologies: - edam: http://edamontology.org/format_3989 # GZIP format @@ -90,8 +90,8 @@ output: e.g. `[ id:'sample1', single_end:false ]` - "*cov-*.txt": type: file - description: File containing the maximum coverage thresholds for all chromosomal - arms and libraries + description: File containing the maximum coverage thresholds for all + chromosomal arms and libraries pattern: "*cov-*.txt" ontologies: [] bad_sites: @@ -102,19 +102,35 @@ output: e.g. `[ id:'sample1', single_end:false ]` - "*BS.txt.gz": type: file - description: File containing a list of sites (variable and invariable) that - did not pass the SNP calling criteria + description: File containing a list of sites (variable and invariable) + that did not pass the SNP calling criteria pattern: "*BS.txt.gz" optional: true ontologies: - edam: http://edamontology.org/format_3989 # GZIP format + versions_poolsnp: + - - ${task.process}: + type: string + description: The name of the process + - poolsnp: + type: string + description: The name of the tool + - 1.0.1: + type: string + description: The expression to obtain the version of the tool + +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The name of the process + - poolsnp: + type: string + description: The name of the tool + - 1.0.1: + type: string + description: The expression to obtain the version of the tool + authors: - "@abhilesh" maintainers: diff --git a/modules/nf-core/poolsnp/tests/main.nf.test b/modules/nf-core/poolsnp/tests/main.nf.test index 866bd10000b5..8bc5ce2bab4f 100644 --- a/modules/nf-core/poolsnp/tests/main.nf.test +++ b/modules/nf-core/poolsnp/tests/main.nf.test @@ -54,7 +54,7 @@ nextflow_process { assertAll( { assert process.success }, { assert snapshot( - process.out.versions, + process.out.findAll { key, val -> key.startsWith("versions")}, path(process.out.vcf[0][1]).vcf.variantsMD5, process.out.max_cov ).match() @@ -85,7 +85,7 @@ nextflow_process { assertAll( { assert process.success }, { assert snapshot( - process.out.versions, + process.out.findAll { key, val -> key.startsWith("versions")}, path(process.out.vcf[0][1]).vcf.variantsMD5 ).match() } @@ -118,7 +118,7 @@ nextflow_process { assertAll( { assert process.success }, { assert snapshot( - process.out.versions, + process.out.findAll { key, val -> key.startsWith("versions")}, path(process.out.vcf[0][1]).vcf.variantsMD5, process.out.max_cov ).match() @@ -151,7 +151,7 @@ nextflow_process { assertAll( { assert process.success }, { assert snapshot( - process.out.versions, + process.out.findAll { key, val -> key.startsWith("versions")}, path(process.out.vcf[0][1]).vcf.variantsMD5 ).match() } From 9d182d661f2c80d56c5a88b7ddfd8f132f570a0d Mon Sep 17 00:00:00 2001 From: Simon Pearce <24893913+SPPearce@users.noreply.github.com> Date: Wed, 8 Jul 2026 05:33:11 +0000 Subject: [PATCH 2/3] Update tests --- .../nf-core/poolsnp/tests/main.nf.test.snap | 80 ++++++++++++------- 1 file changed, 52 insertions(+), 28 deletions(-) diff --git a/modules/nf-core/poolsnp/tests/main.nf.test.snap b/modules/nf-core/poolsnp/tests/main.nf.test.snap index 98a44255939b..f4ac0ebbd5af 100644 --- a/modules/nf-core/poolsnp/tests/main.nf.test.snap +++ b/modules/nf-core/poolsnp/tests/main.nf.test.snap @@ -1,9 +1,15 @@ { "sarscov2 - mpileup - max_cov - stub": { "content": [ - [ - "versions.yml:md5,2bc174a10a560499c04e6b35ce86fed0" - ], + { + "versions_poolsnp": [ + [ + "POOLSNP", + "poolsnp", + "1.0.1" + ] + ] + }, "d41d8cd98f00b204e9800998ecf8427e", [ [ @@ -14,30 +20,42 @@ ] ] ], + "timestamp": "2026-07-08T05:32:01.870716039", "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.6" - }, - "timestamp": "2025-05-12T17:14:40.699184098" + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } }, "sarscov2 - mpileup - max_cov_file - stub": { "content": [ - [ - "versions.yml:md5,2bc174a10a560499c04e6b35ce86fed0" - ], + { + "versions_poolsnp": [ + [ + "POOLSNP", + "poolsnp", + "1.0.1" + ] + ] + }, "d41d8cd98f00b204e9800998ecf8427e" ], + "timestamp": "2026-07-08T05:32:09.197318051", "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" - }, - "timestamp": "2024-08-16T15:56:12.188459" + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } }, "sarscov2 - mpileup - max_cov": { "content": [ - [ - "versions.yml:md5,2bc174a10a560499c04e6b35ce86fed0" - ], + { + "versions_poolsnp": [ + [ + "POOLSNP", + "poolsnp", + "1.0.1" + ] + ] + }, "46e2d27f13d700dbdb061091308f1555", [ [ @@ -48,23 +66,29 @@ ] ] ], + "timestamp": "2026-07-08T05:31:46.580358285", "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.6" - }, - "timestamp": "2025-05-12T17:14:11.680742" + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } }, "sarscov2 - mpileup - max_cov_file": { "content": [ - [ - "versions.yml:md5,2bc174a10a560499c04e6b35ce86fed0" - ], + { + "versions_poolsnp": [ + [ + "POOLSNP", + "poolsnp", + "1.0.1" + ] + ] + }, "46e2d27f13d700dbdb061091308f1555" ], + "timestamp": "2026-07-08T05:31:54.373674382", "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" - }, - "timestamp": "2024-08-16T15:31:24.140061" + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } } } \ No newline at end of file From d69a6bf2a638f2180ce6cfc84b59c541782d1b9a Mon Sep 17 00:00:00 2001 From: Simon Pearce <24893913+SPPearce@users.noreply.github.com> Date: Fri, 10 Jul 2026 05:55:55 +0000 Subject: [PATCH 3/3] max_cov not stable on conda --- modules/nf-core/poolsnp/tests/main.nf.test | 19 ++-- .../nf-core/poolsnp/tests/main.nf.test.snap | 87 +++++++++++++++---- 2 files changed, 77 insertions(+), 29 deletions(-) diff --git a/modules/nf-core/poolsnp/tests/main.nf.test b/modules/nf-core/poolsnp/tests/main.nf.test index 8bc5ce2bab4f..dd54d0d03c2c 100644 --- a/modules/nf-core/poolsnp/tests/main.nf.test +++ b/modules/nf-core/poolsnp/tests/main.nf.test @@ -51,12 +51,11 @@ nextflow_process { } then { + assert process.success assertAll( - { assert process.success }, { assert snapshot( - process.out.findAll { key, val -> key.startsWith("versions")}, path(process.out.vcf[0][1]).vcf.variantsMD5, - process.out.max_cov + sanitizeOutput(process.out, unstableKeys: ['max_cov', 'vcf']) ).match() } ) @@ -82,11 +81,11 @@ nextflow_process { } then { + assert process.success assertAll( - { assert process.success }, { assert snapshot( - process.out.findAll { key, val -> key.startsWith("versions")}, - path(process.out.vcf[0][1]).vcf.variantsMD5 + path(process.out.vcf[0][1]).vcf.variantsMD5, + sanitizeOutput(process.out, unstableKeys: ['max_cov', 'vcf']) ).match() } ) @@ -148,13 +147,9 @@ nextflow_process { } then { + assert process.success assertAll( - { assert process.success }, - { assert snapshot( - process.out.findAll { key, val -> key.startsWith("versions")}, - path(process.out.vcf[0][1]).vcf.variantsMD5 - ).match() - } + { assert snapshot(sanitizeOutput(process.out)).match()} ) } } diff --git a/modules/nf-core/poolsnp/tests/main.nf.test.snap b/modules/nf-core/poolsnp/tests/main.nf.test.snap index f4ac0ebbd5af..7ea18ec373cb 100644 --- a/modules/nf-core/poolsnp/tests/main.nf.test.snap +++ b/modules/nf-core/poolsnp/tests/main.nf.test.snap @@ -29,6 +29,25 @@ "sarscov2 - mpileup - max_cov_file - stub": { "content": [ { + "bad_sites": [ + [ + { + "id": "test" + }, + "test_BS.txt.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "max_cov": [ + + ], + "vcf": [ + [ + { + "id": "test" + }, + "test.vcf.gz:md5,4a36fe59dc6865cd5ee9e7ecd936106e" + ] + ], "versions_poolsnp": [ [ "POOLSNP", @@ -36,10 +55,9 @@ "1.0.1" ] ] - }, - "d41d8cd98f00b204e9800998ecf8427e" + } ], - "timestamp": "2026-07-08T05:32:09.197318051", + "timestamp": "2026-07-10T05:55:27.287972382", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -47,7 +65,32 @@ }, "sarscov2 - mpileup - max_cov": { "content": [ + "46e2d27f13d700dbdb061091308f1555", { + "bad_sites": [ + [ + { + "id": "test" + }, + "test_BS.txt.gz:md5,41251fba6925d7428836739822168bd1" + ] + ], + "max_cov": [ + [ + { + "id": "test" + }, + "test-cov-0.7.txt" + ] + ], + "vcf": [ + [ + { + "id": "test" + }, + "test.vcf.gz" + ] + ], "versions_poolsnp": [ [ "POOLSNP", @@ -55,18 +98,9 @@ "1.0.1" ] ] - }, - "46e2d27f13d700dbdb061091308f1555", - [ - [ - { - "id": "test" - }, - "test-cov-0.7.txt:md5,ccbb119522c09daa976a9015ba999329" - ] - ] + } ], - "timestamp": "2026-07-08T05:31:46.580358285", + "timestamp": "2026-07-10T05:55:07.885346374", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -74,7 +108,27 @@ }, "sarscov2 - mpileup - max_cov_file": { "content": [ + "46e2d27f13d700dbdb061091308f1555", { + "bad_sites": [ + [ + { + "id": "test" + }, + "test_BS.txt.gz:md5,41251fba6925d7428836739822168bd1" + ] + ], + "max_cov": [ + + ], + "vcf": [ + [ + { + "id": "test" + }, + "test.vcf.gz" + ] + ], "versions_poolsnp": [ [ "POOLSNP", @@ -82,10 +136,9 @@ "1.0.1" ] ] - }, - "46e2d27f13d700dbdb061091308f1555" + } ], - "timestamp": "2026-07-08T05:31:54.373674382", + "timestamp": "2026-07-10T05:55:14.671243804", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0"