From 946169db67b4cacbc048f57c13d8b7735e1acf4a Mon Sep 17 00:00:00 2001 From: "Harrison H. Vaughn Reed" Date: Thu, 30 Apr 2026 10:53:18 -0400 Subject: [PATCH 1/3] Migrate islandpath to topic: versions tuple --- modules/nf-core/islandpath/main.nf | 19 ++++---- modules/nf-core/islandpath/meta.yml | 35 ++++++++++---- modules/nf-core/islandpath/tests/main.nf.test | 46 ++++++++++++++++-- .../islandpath/tests/main.nf.test.snap | 47 ++++++++++++++++--- 4 files changed, 120 insertions(+), 27 deletions(-) diff --git a/modules/nf-core/islandpath/main.nf b/modules/nf-core/islandpath/main.nf index b3fdcd9c1c57..da5b36a82621 100644 --- a/modules/nf-core/islandpath/main.nf +++ b/modules/nf-core/islandpath/main.nf @@ -13,25 +13,28 @@ process ISLANDPATH { output: tuple val(meta), path("*.gff") , emit: gff path "Dimob.log" , emit: log - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('islandpath'), val('1.0.6'), topic: versions, emit: versions_islandpath when: task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" + args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. - def VERSION = '1.0.6' + VERSION = '1.0.6' """ islandpath \\ $genome \\ ${prefix}.gff \\ $args - cat <<-END_VERSIONS > versions.yml - "${task.process}": - islandpath: $VERSION - END_VERSIONS + """ + + stub: + prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.gff + touch Dimob.log """ } diff --git a/modules/nf-core/islandpath/meta.yml b/modules/nf-core/islandpath/meta.yml index 089d76931dc1..fe7da8fb3cfa 100644 --- a/modules/nf-core/islandpath/meta.yml +++ b/modules/nf-core/islandpath/meta.yml @@ -14,7 +14,8 @@ tools: documentation: https://github.com/brinkmanlab/islandpath#readme tool_dev_url: https://github.com/brinkmanlab/islandpath doi: "10.1093/bioinformatics/bty095" - licence: ["GPL v3"] + licence: + - "GPL v3" identifier: biotools:islandpath input: - - meta: @@ -32,12 +33,14 @@ output: gff: - - meta: type: file - description: GFF file listing the predicted genomic islands and their coordinates + description: GFF file listing the predicted genomic islands and their + coordinates pattern: "*.gff" ontologies: [] - "*.gff": type: file - description: GFF file listing the predicted genomic islands and their coordinates + description: GFF file listing the predicted genomic islands and their + coordinates pattern: "*.gff" ontologies: [] log: @@ -46,13 +49,27 @@ output: description: Log file of the islandpath run pattern: "*.log" ontologies: [] + versions_islandpath: + - - ${task.process}: + type: string + description: The name of the process + - islandpath: + type: string + description: The name of the tool + - '"1.0.6"': + 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 + - islandpath: + type: string + description: The name of the tool + - '"1.0.6"': + type: string + description: The expression to obtain the version of the tool authors: - "@jvfe" maintainers: diff --git a/modules/nf-core/islandpath/tests/main.nf.test b/modules/nf-core/islandpath/tests/main.nf.test index b25433e4f023..b19766f9d012 100644 --- a/modules/nf-core/islandpath/tests/main.nf.test +++ b/modules/nf-core/islandpath/tests/main.nf.test @@ -37,9 +37,49 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.gff[0]).match() }, - { assert snapshot(process.out.versions).match("version") }, - { assert path(process.out[1][0]).text.contains("Running IslandPath-DIMOB") } + { assert snapshot( + process.out.gff[0], + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() }, + { assert path(process.out.log[0]).text.contains("Running IslandPath-DIMOB") } + ) + } + + } + + test("bacteroides_fragilis - gbff - stub") { + + options "-stub" + + setup { + run("GUNZIP") { + script "../../gunzip/main.nf" + process { + """ + input[0] = Channel.fromList([ + tuple([ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/genome/genome.gbff.gz', checkIfExists: true)), + ]) + """ + } + } + } + + when { + process { + """ + input[0] = GUNZIP.out.gunzip + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.gff[0], + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() } ) } diff --git a/modules/nf-core/islandpath/tests/main.nf.test.snap b/modules/nf-core/islandpath/tests/main.nf.test.snap index 61c287633359..584d178d386a 100644 --- a/modules/nf-core/islandpath/tests/main.nf.test.snap +++ b/modules/nf-core/islandpath/tests/main.nf.test.snap @@ -1,4 +1,28 @@ { + "bacteroides_fragilis - gbff - stub": { + "content": [ + [ + { + "id": "test" + }, + "test.gff:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + { + "versions_islandpath": [ + [ + "ISLANDPATH", + "islandpath", + "1.0.6" + ] + ] + } + ], + "timestamp": "2026-04-30T10:52:01.549459", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, "bacteroides_fragilis - gbff": { "content": [ [ @@ -6,13 +30,22 @@ "id": "test" }, "test.gff:md5,d4719f73e9af606346fade238aa191fa" - ] + ], + { + "versions_islandpath": [ + [ + "ISLANDPATH", + "islandpath", + "1.0.6" + ] + ] + } ], + "timestamp": "2026-04-30T10:52:53.39151", "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-03-20T09:50:55.704306082" + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } }, "version": { "content": [ @@ -20,10 +53,10 @@ "versions.yml:md5,abe6848c95b81992712dafd663a94c81" ] ], + "timestamp": "2024-03-20T10:46:30.654025238", "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" - }, - "timestamp": "2024-03-20T10:46:30.654025238" + } } } \ No newline at end of file From ea3dc9a5fe160b707df59a8c14b5cd537eb11b6a Mon Sep 17 00:00:00 2001 From: "Harrison H. Vaughn Reed" Date: Mon, 4 May 2026 01:19:21 -0400 Subject: [PATCH 2/3] Restore def keywords in Groovy script blocks to maintain upstream parity --- modules/nf-core/islandpath/main.nf | 8 ++++---- modules/nf-core/islandpath/meta.yml | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/modules/nf-core/islandpath/main.nf b/modules/nf-core/islandpath/main.nf index da5b36a82621..a4513ebb5358 100644 --- a/modules/nf-core/islandpath/main.nf +++ b/modules/nf-core/islandpath/main.nf @@ -19,10 +19,10 @@ process ISLANDPATH { task.ext.when == null || task.ext.when script: - args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. - VERSION = '1.0.6' + def VERSION = '1.0.6' """ islandpath \\ $genome \\ @@ -32,7 +32,7 @@ process ISLANDPATH { """ stub: - prefix = task.ext.prefix ?: "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ touch ${prefix}.gff touch Dimob.log diff --git a/modules/nf-core/islandpath/meta.yml b/modules/nf-core/islandpath/meta.yml index fe7da8fb3cfa..8dc99c43c358 100644 --- a/modules/nf-core/islandpath/meta.yml +++ b/modules/nf-core/islandpath/meta.yml @@ -59,6 +59,9 @@ output: - '"1.0.6"': type: string description: The expression to obtain the version of the tool + 1.0.6: + type: string + description: The expression to obtain the version of the tool topics: versions: - - ${task.process}: @@ -70,6 +73,9 @@ topics: - '"1.0.6"': type: string description: The expression to obtain the version of the tool + 1.0.6: + type: string + description: The expression to obtain the version of the tool authors: - "@jvfe" maintainers: From afa4a3ba490fcaac8248bf79ff112a3b7b8652a5 Mon Sep 17 00:00:00 2001 From: "Harrison H. Vaughn Reed" Date: Mon, 4 May 2026 02:32:33 -0400 Subject: [PATCH 3/3] chore: move version warning to output block --- modules/nf-core/islandpath/main.nf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/nf-core/islandpath/main.nf b/modules/nf-core/islandpath/main.nf index a4513ebb5358..b8f2702c5b8a 100644 --- a/modules/nf-core/islandpath/main.nf +++ b/modules/nf-core/islandpath/main.nf @@ -13,6 +13,7 @@ process ISLANDPATH { output: tuple val(meta), path("*.gff") , emit: gff path "Dimob.log" , emit: log + // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. tuple val("${task.process}"), val('islandpath'), val('1.0.6'), topic: versions, emit: versions_islandpath when: @@ -21,8 +22,6 @@ process ISLANDPATH { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. - def VERSION = '1.0.6' """ islandpath \\ $genome \\