diff --git a/modules/nf-core/islandpath/main.nf b/modules/nf-core/islandpath/main.nf index b3fdcd9c1c57..b8f2702c5b8a 100644 --- a/modules/nf-core/islandpath/main.nf +++ b/modules/nf-core/islandpath/main.nf @@ -13,7 +13,8 @@ process ISLANDPATH { output: tuple val(meta), path("*.gff") , emit: gff path "Dimob.log" , emit: log - path "versions.yml" , emit: versions + // 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: task.ext.when == null || task.ext.when @@ -21,17 +22,18 @@ 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 \\ ${prefix}.gff \\ $args - cat <<-END_VERSIONS > versions.yml - "${task.process}": - islandpath: $VERSION - END_VERSIONS + """ + + stub: + 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 089d76931dc1..8dc99c43c358 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,33 @@ 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 + 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 + 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