From ebc80018133938eaffcedecdf67c1ecd2ab5d4a1 Mon Sep 17 00:00:00 2001 From: Simon Pearce <24893913+SPPearce@users.noreply.github.com> Date: Tue, 7 Jul 2026 10:26:51 +0000 Subject: [PATCH 1/4] Swap verifybamid to topic --- .../nf-core/verifybamid/verifybamid/main.nf | 25 ++++---- .../nf-core/verifybamid/verifybamid/meta.yml | 60 ++++++++++++------- .../verifybamid/tests/main.nf.test | 2 +- .../verifybamid/tests/main.nf.test.snap | 36 +++++------ 4 files changed, 66 insertions(+), 57 deletions(-) diff --git a/modules/nf-core/verifybamid/verifybamid/main.nf b/modules/nf-core/verifybamid/verifybamid/main.nf index 0b5601ef4b63..b60910ae42f3 100644 --- a/modules/nf-core/verifybamid/verifybamid/main.nf +++ b/modules/nf-core/verifybamid/verifybamid/main.nf @@ -2,6 +2,7 @@ process VERIFYBAMID_VERIFYBAMID { tag "${meta.id}" label "process_single" + // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/verifybamid%3A1.1.3--h5b5514e_6': @@ -12,21 +13,22 @@ process VERIFYBAMID_VERIFYBAMID { path refvcf output: - tuple val(meta), path("*.log") , emit: log - tuple val(meta), path("*.selfSM") , optional:true, emit: selfsm - tuple val(meta), path("*.depthSM") , optional:true, emit: depthsm - tuple val(meta), path("*.selfRG") , optional:true, emit: selfrg - tuple val(meta), path("*.depthRG") , optional:true, emit: depthrg - tuple val(meta), path("*.bestSM") , optional:true, emit: bestsm - tuple val(meta), path("*.bestRG") , optional:true, emit: bestrg - path "versions.yml" , emit: versions + tuple val(meta), path("*.log") , emit: log + tuple val(meta), path("*.selfSM") , emit: selfsm , optional:true + tuple val(meta), path("*.depthSM"), emit: depthsm, optional:true + tuple val(meta), path("*.selfRG") , emit: selfrg , optional:true + tuple val(meta), path("*.depthRG"), emit: depthrg, optional:true + tuple val(meta), path("*.bestSM") , emit: bestsm , optional:true + tuple val(meta), path("*.bestRG") , emit: bestrg , optional:true + tuple val("${task.process}"), val('verifybamid'), eval("echo '1.1.3'"), emit: versions_verifybamid, 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 script: + def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def VERSION = '1.1.3' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. """ verifyBamID \\ @@ -35,10 +37,5 @@ process VERIFYBAMID_VERIFYBAMID { --out ${prefix} \\ ${args} \\ > ${prefix}.log - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - verifybamid: $VERSION - END_VERSIONS """ } diff --git a/modules/nf-core/verifybamid/verifybamid/meta.yml b/modules/nf-core/verifybamid/verifybamid/meta.yml index 3ca3f7e73373..25ea581f4d83 100644 --- a/modules/nf-core/verifybamid/verifybamid/meta.yml +++ b/modules/nf-core/verifybamid/verifybamid/meta.yml @@ -1,7 +1,7 @@ name: "verifybamid_verifybamid" -description: Detecting and estimating inter-sample DNA contamination became a crucial - quality assessment step to ensure high quality sequence reads and reliable downstream - analysis. +description: Detecting and estimating inter-sample DNA contamination became a + crucial quality assessment step to ensure high quality sequence reads and + reliable downstream analysis. keywords: - qc - contamination @@ -15,7 +15,8 @@ tools: documentation: "http://genome.sph.umich.edu/wiki/VerifyBamID" tool_dev_url: "https://github.com/statgen/verifyBamID" doi: "10.1016/j.ajhg.2012.09.004" - licence: ["GPL v3"] + licence: + - "GPL v3" identifier: biotools:verifybamid input: - - meta: @@ -64,8 +65,8 @@ output: e.g. [ id:'test', single_end:false ] - "*.selfSM": type: file - description: Per-sample statistics describing how well the sample matches - to the annotated sample. + description: Per-sample statistics describing how well the sample + matches to the annotated sample. pattern: "*.selfSM" ontologies: [] depthsm: @@ -87,8 +88,9 @@ output: e.g. [ id:'test', single_end:false ] - "*.selfRG": type: file - description: Per-readGroup statistics describing how well each lane matches - to the annotated sample. (available only without --ignoreRG option) + description: Per-readGroup statistics describing how well each lane + matches to the annotated sample. (available only without --ignoreRG + option) pattern: "*.selfRG" ontologies: [] depthrg: @@ -99,8 +101,8 @@ output: e.g. [ id:'test', single_end:false ] - "*.depthRG": type: file - description: The depth distribution of the sequence reads per readGroup. (available - only without --ignoreRG option) + description: The depth distribution of the sequence reads per readGroup. + (available only without --ignoreRG option) pattern: "*.depthRG" ontologies: [] bestsm: @@ -111,8 +113,8 @@ output: e.g. [ id:'test', single_end:false ] - "*.bestSM": type: file - description: Per-sample best-match statistics with best-matching sample among - the genotyped sample (available only with --best option) + description: Per-sample best-match statistics with best-matching sample + among the genotyped sample (available only with --best option) pattern: "*.bestSM" ontologies: [] bestrg: @@ -123,18 +125,34 @@ output: e.g. [ id:'test', single_end:false ] - "*.bestRG": type: file - description: Per-readgroup best-match statistics with best-matching sample - among the genotyped sample (available only with --best and without --ignoreRG - option) + description: Per-readgroup best-match statistics with best-matching + sample among the genotyped sample (available only with --best and + without --ignoreRG option) pattern: "*.bestRG" ontologies: [] + versions_verifybamid: + - - ${task.process}: + type: string + description: The name of the process + - verifybamid: + type: string + description: The name of the tool + - echo '1.1.3': + type: eval + 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 + - verifybamid: + type: string + description: The name of the tool + - echo '1.1.3': + type: eval + description: The expression to obtain the version of the tool + authors: - "@manifestoso" maintainers: diff --git a/modules/nf-core/verifybamid/verifybamid/tests/main.nf.test b/modules/nf-core/verifybamid/verifybamid/tests/main.nf.test index c938ce02d673..ac9b318d67b5 100644 --- a/modules/nf-core/verifybamid/verifybamid/tests/main.nf.test +++ b/modules/nf-core/verifybamid/verifybamid/tests/main.nf.test @@ -35,7 +35,7 @@ nextflow_process { process.out.depthsm, process.out.selfrg, process.out.selfsm, - process.out.versions, + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) } diff --git a/modules/nf-core/verifybamid/verifybamid/tests/main.nf.test.snap b/modules/nf-core/verifybamid/verifybamid/tests/main.nf.test.snap index 6e2fee8cf9ea..9fd44aec8c32 100644 --- a/modules/nf-core/verifybamid/verifybamid/tests/main.nf.test.snap +++ b/modules/nf-core/verifybamid/verifybamid/tests/main.nf.test.snap @@ -3,13 +3,7 @@ "content": [ "test.log", [ - [ - { - "id": "test", - "single_end": false - }, - "test.depthRG:md5,2374504c4138c04f3b29210dcb3da96f" - ] + ], [ [ @@ -21,13 +15,7 @@ ] ], [ - [ - { - "id": "test", - "single_end": false - }, - "test.selfRG:md5,3772283d3eaa88683f562a2157b92d55" - ] + ], [ [ @@ -38,14 +26,20 @@ "test.selfSM:md5,5d2808d70f76e2f753b670fc9b2a6d55" ] ], - [ - "versions.yml:md5,36b44d66ecfdbef7191f47a33f688b7f" - ] + { + "versions_verifybamid": [ + [ + "VERIFYBAMID_VERIFYBAMID", + "verifybamid", + "1.1.3" + ] + ] + } ], + "timestamp": "2026-07-07T10:25:52.833695653", "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" - }, - "timestamp": "2024-08-22T17:54:07.273193" + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } } } \ No newline at end of file From 35f754b7a9cd339b6ec5bea3d5bf81164a935ed6 Mon Sep 17 00:00:00 2001 From: Simon Pearce <24893913+SPPearce@users.noreply.github.com> Date: Thu, 9 Jul 2026 06:42:48 +0000 Subject: [PATCH 2/4] Swap to sanitizeOutput and add stub --- .../verifybamid/tests/main.nf.test | 35 +++-- .../verifybamid/tests/main.nf.test.snap | 121 ++++++++++++++---- 2 files changed, 122 insertions(+), 34 deletions(-) diff --git a/modules/nf-core/verifybamid/verifybamid/tests/main.nf.test b/modules/nf-core/verifybamid/verifybamid/tests/main.nf.test index ac9b318d67b5..46c5751958a0 100644 --- a/modules/nf-core/verifybamid/verifybamid/tests/main.nf.test +++ b/modules/nf-core/verifybamid/verifybamid/tests/main.nf.test @@ -27,18 +27,35 @@ nextflow_process { } then { + assert process.success assertAll( - { assert process.success }, - { assert snapshot( - file(process.out.log[0][1]).name, - process.out.depthrg, - process.out.depthsm, - process.out.selfrg, - process.out.selfsm, - process.out.findAll { key, val -> key.startsWith('versions') } - ).match() } + { assert snapshot(sanitizeOutput(process.out, unstableKeys: ["log"])).match() } ) } } + test("test-verifybamid-verifybamid - stub") { + options "-stub" + when { + process { + """ + input[0] = [ [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true) + ] + input[1] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/vcf/genmod.vcf.gz', checkIfExists: true) + + """ + } + } + + then { + assert process.success + assertAll( + { assert snapshot(sanitizeOutput(process.out)).match() } + ) + } + } + + } diff --git a/modules/nf-core/verifybamid/verifybamid/tests/main.nf.test.snap b/modules/nf-core/verifybamid/verifybamid/tests/main.nf.test.snap index 9fd44aec8c32..d58482183f72 100644 --- a/modules/nf-core/verifybamid/verifybamid/tests/main.nf.test.snap +++ b/modules/nf-core/verifybamid/verifybamid/tests/main.nf.test.snap @@ -1,32 +1,103 @@ { "test-verifybamid-verifybamid": { "content": [ - "test.log", - [ - - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.depthSM:md5,4f5367f2be8567b95b57278b2e7372c3" - ] - ], - [ - - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.selfSM:md5,5d2808d70f76e2f753b670fc9b2a6d55" + { + "bestrg": [ + + ], + "bestsm": [ + + ], + "depthrg": [ + + ], + "depthsm": [ + [ + { + "id": "test", + "single_end": false + }, + "test.depthSM:md5,4f5367f2be8567b95b57278b2e7372c3" + ] + ], + "log": [ + [ + { + "id": "test", + "single_end": false + }, + "test.log" + ] + ], + "selfrg": [ + + ], + "selfsm": [ + [ + { + "id": "test", + "single_end": false + }, + "test.selfSM:md5,5d2808d70f76e2f753b670fc9b2a6d55" + ] + ], + "versions_verifybamid": [ + [ + "VERIFYBAMID_VERIFYBAMID", + "verifybamid", + "1.1.3" + ] ] - ], + } + ], + "timestamp": "2026-07-09T06:33:07.414580836", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, + "test-verifybamid-verifybamid - stub": { + "content": [ { + "bestrg": [ + + ], + "bestsm": [ + + ], + "depthrg": [ + + ], + "depthsm": [ + [ + { + "id": "test", + "single_end": false + }, + "test.depthSM:md5,4f5367f2be8567b95b57278b2e7372c3" + ] + ], + "log": [ + [ + { + "id": "test", + "single_end": false + }, + "test.log:md5,87066d0998cbba1f4ae68cb3004e4d4d" + ] + ], + "selfrg": [ + + ], + "selfsm": [ + [ + { + "id": "test", + "single_end": false + }, + "test.selfSM:md5,5d2808d70f76e2f753b670fc9b2a6d55" + ] + ], "versions_verifybamid": [ [ "VERIFYBAMID_VERIFYBAMID", @@ -36,7 +107,7 @@ ] } ], - "timestamp": "2026-07-07T10:25:52.833695653", + "timestamp": "2026-07-09T06:33:12.761819382", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" From 897d435dcb9dd920212034f269a9f153ff21b4b1 Mon Sep 17 00:00:00 2001 From: Simon Pearce <24893913+SPPearce@users.noreply.github.com> Date: Fri, 10 Jul 2026 05:46:51 +0000 Subject: [PATCH 3/4] Add stub and test --- .../nf-core/verifybamid/verifybamid/main.nf | 11 +++++ .../verifybamid/tests/main.nf.test.snap | 40 +++++++++++++++---- 2 files changed, 43 insertions(+), 8 deletions(-) diff --git a/modules/nf-core/verifybamid/verifybamid/main.nf b/modules/nf-core/verifybamid/verifybamid/main.nf index b60910ae42f3..e8a9ecca63f0 100644 --- a/modules/nf-core/verifybamid/verifybamid/main.nf +++ b/modules/nf-core/verifybamid/verifybamid/main.nf @@ -38,4 +38,15 @@ process VERIFYBAMID_VERIFYBAMID { ${args} \\ > ${prefix}.log """ + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.log + touch ${prefix}.bestSM + touch ${prefix}.bestRG + touch ${prefix}.depthRG + touch ${prefix}.depthSM + touch ${prefix}.selfRG + touch ${prefix}.selfSM + """ } diff --git a/modules/nf-core/verifybamid/verifybamid/tests/main.nf.test.snap b/modules/nf-core/verifybamid/verifybamid/tests/main.nf.test.snap index d58482183f72..20a5e4bd6997 100644 --- a/modules/nf-core/verifybamid/verifybamid/tests/main.nf.test.snap +++ b/modules/nf-core/verifybamid/verifybamid/tests/main.nf.test.snap @@ -60,13 +60,31 @@ "content": [ { "bestrg": [ - + [ + { + "id": "test", + "single_end": false + }, + "test.bestRG:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ], "bestsm": [ - + [ + { + "id": "test", + "single_end": false + }, + "test.bestSM:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ], "depthrg": [ - + [ + { + "id": "test", + "single_end": false + }, + "test.depthRG:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ], "depthsm": [ [ @@ -74,7 +92,7 @@ "id": "test", "single_end": false }, - "test.depthSM:md5,4f5367f2be8567b95b57278b2e7372c3" + "test.depthSM:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "log": [ @@ -83,11 +101,17 @@ "id": "test", "single_end": false }, - "test.log:md5,87066d0998cbba1f4ae68cb3004e4d4d" + "test.log:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "selfrg": [ - + [ + { + "id": "test", + "single_end": false + }, + "test.selfRG:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ], "selfsm": [ [ @@ -95,7 +119,7 @@ "id": "test", "single_end": false }, - "test.selfSM:md5,5d2808d70f76e2f753b670fc9b2a6d55" + "test.selfSM:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "versions_verifybamid": [ @@ -107,7 +131,7 @@ ] } ], - "timestamp": "2026-07-09T06:33:12.761819382", + "timestamp": "2026-07-10T05:46:42.57264799", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" From 6639153428bceb3df836e5a74de5396bfd89b42e Mon Sep 17 00:00:00 2001 From: Simon Pearce <24893913+SPPearce@users.noreply.github.com> Date: Fri, 10 Jul 2026 05:50:54 +0000 Subject: [PATCH 4/4] Remove config --- .../verifybamid/verifybamid/tests/main.nf.test | 1 - .../verifybamid/tests/main.nf.test.snap | 18 +++++++++++++++--- .../verifybamid/tests/nextflow.config | 3 --- 3 files changed, 15 insertions(+), 7 deletions(-) delete mode 100644 modules/nf-core/verifybamid/verifybamid/tests/nextflow.config diff --git a/modules/nf-core/verifybamid/verifybamid/tests/main.nf.test b/modules/nf-core/verifybamid/verifybamid/tests/main.nf.test index 46c5751958a0..327489d45ead 100644 --- a/modules/nf-core/verifybamid/verifybamid/tests/main.nf.test +++ b/modules/nf-core/verifybamid/verifybamid/tests/main.nf.test @@ -4,7 +4,6 @@ nextflow_process { name "Test Process VERIFYBAMID_VERIFYBAMID" script "../main.nf" process "VERIFYBAMID_VERIFYBAMID" - config "./nextflow.config" tag "modules" tag "modules_nfcore" diff --git a/modules/nf-core/verifybamid/verifybamid/tests/main.nf.test.snap b/modules/nf-core/verifybamid/verifybamid/tests/main.nf.test.snap index 20a5e4bd6997..10abff74c1bc 100644 --- a/modules/nf-core/verifybamid/verifybamid/tests/main.nf.test.snap +++ b/modules/nf-core/verifybamid/verifybamid/tests/main.nf.test.snap @@ -9,7 +9,13 @@ ], "depthrg": [ - + [ + { + "id": "test", + "single_end": false + }, + "test.depthRG:md5,2374504c4138c04f3b29210dcb3da96f" + ] ], "depthsm": [ [ @@ -30,7 +36,13 @@ ] ], "selfrg": [ - + [ + { + "id": "test", + "single_end": false + }, + "test.selfRG:md5,3772283d3eaa88683f562a2157b92d55" + ] ], "selfsm": [ [ @@ -50,7 +62,7 @@ ] } ], - "timestamp": "2026-07-09T06:33:07.414580836", + "timestamp": "2026-07-10T05:50:32.045235921", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/nf-core/verifybamid/verifybamid/tests/nextflow.config b/modules/nf-core/verifybamid/verifybamid/tests/nextflow.config deleted file mode 100644 index c2abbe93d68b..000000000000 --- a/modules/nf-core/verifybamid/verifybamid/tests/nextflow.config +++ /dev/null @@ -1,3 +0,0 @@ -process { - ext.args = '--ignoreRG' -}