Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions modules/nf-core/islandpath/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,27 @@ 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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I think this is best above, on the line above the conda instruction.

tuple val("${task.process}"), val('islandpath'), val('1.0.6'), topic: versions, emit: versions_islandpath
Comment thread
SPPearce marked this conversation as resolved.

when:
task.ext.when == null || task.ext.when

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
"""
}
41 changes: 32 additions & 9 deletions modules/nf-core/islandpath/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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
Comment on lines +59 to +64
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These don't need to be duplicated.

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:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here.

type: string
description: The expression to obtain the version of the tool
authors:
- "@jvfe"
maintainers:
Expand Down
46 changes: 43 additions & 3 deletions modules/nf-core/islandpath/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -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() }
)
}

Expand Down
47 changes: 40 additions & 7 deletions modules/nf-core/islandpath/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -1,29 +1,62 @@
{
"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": [
[
{
"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": [
[
"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"
}
}
}
Loading