diff --git a/modules/nf-core/verifybamid/verifybamid/main.nf b/modules/nf-core/verifybamid/verifybamid/main.nf index 0b5601ef4b63..e8a9ecca63f0 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,16 @@ process VERIFYBAMID_VERIFYBAMID { --out ${prefix} \\ ${args} \\ > ${prefix}.log - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - verifybamid: $VERSION - END_VERSIONS + """ + 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/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..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" @@ -27,18 +26,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.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 6e2fee8cf9ea..10abff74c1bc 100644 --- a/modules/nf-core/verifybamid/verifybamid/tests/main.nf.test.snap +++ b/modules/nf-core/verifybamid/verifybamid/tests/main.nf.test.snap @@ -1,51 +1,152 @@ { "test-verifybamid-verifybamid": { "content": [ - "test.log", - [ - [ - { - "id": "test", - "single_end": false - }, - "test.depthRG:md5,2374504c4138c04f3b29210dcb3da96f" + { + "bestrg": [ + + ], + "bestsm": [ + + ], + "depthrg": [ + [ + { + "id": "test", + "single_end": false + }, + "test.depthRG:md5,2374504c4138c04f3b29210dcb3da96f" + ] + ], + "depthsm": [ + [ + { + "id": "test", + "single_end": false + }, + "test.depthSM:md5,4f5367f2be8567b95b57278b2e7372c3" + ] + ], + "log": [ + [ + { + "id": "test", + "single_end": false + }, + "test.log" + ] + ], + "selfrg": [ + [ + { + "id": "test", + "single_end": false + }, + "test.selfRG:md5,3772283d3eaa88683f562a2157b92d55" + ] + ], + "selfsm": [ + [ + { + "id": "test", + "single_end": false + }, + "test.selfSM:md5,5d2808d70f76e2f753b670fc9b2a6d55" + ] + ], + "versions_verifybamid": [ + [ + "VERIFYBAMID_VERIFYBAMID", + "verifybamid", + "1.1.3" + ] ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.depthSM:md5,4f5367f2be8567b95b57278b2e7372c3" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.selfRG:md5,3772283d3eaa88683f562a2157b92d55" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.selfSM:md5,5d2808d70f76e2f753b670fc9b2a6d55" + } + ], + "timestamp": "2026-07-10T05:50:32.045235921", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, + "test-verifybamid-verifybamid - stub": { + "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": [ + [ + { + "id": "test", + "single_end": false + }, + "test.depthSM:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log": [ + [ + { + "id": "test", + "single_end": false + }, + "test.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "selfrg": [ + [ + { + "id": "test", + "single_end": false + }, + "test.selfRG:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "selfsm": [ + [ + { + "id": "test", + "single_end": false + }, + "test.selfSM:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions_verifybamid": [ + [ + "VERIFYBAMID_VERIFYBAMID", + "verifybamid", + "1.1.3" + ] ] - ], - [ - "versions.yml:md5,36b44d66ecfdbef7191f47a33f688b7f" - ] + } ], + "timestamp": "2026-07-10T05:46:42.57264799", "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 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' -}