Skip to content
Merged
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
13 changes: 7 additions & 6 deletions modules/nf-core/ssuissero/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ process SSUISSERO {

output:
tuple val(meta), path("*.tsv"), emit: tsv
path "versions.yml" , emit: versions
// WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions.
tuple val("${task.process}"), val('ssuissero'), val('1.0.1'), emit: versions_ssuissero, topic: versions

when:
task.ext.when == null || task.ext.when
Expand All @@ -22,7 +23,6 @@ process SSUISSERO {
def prefix = task.ext.prefix ?: "${meta.id}"
def is_compressed = fasta.getName().endsWith(".gz") ? true : false
def fasta_name = fasta.getName().replace(".gz", "")
def VERSION = '1.0.1' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
"""
if [ "$is_compressed" == "true" ]; then
gzip -c -d $fasta > $fasta_name
Expand All @@ -34,10 +34,11 @@ process SSUISSERO {
-s $prefix \\
-x fasta \\
-t $task.cpus
"""

cat <<-END_VERSIONS > versions.yml
"${task.process}":
ssuissero: $VERSION
END_VERSIONS
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.tsv
"""
}
31 changes: 23 additions & 8 deletions modules/nf-core/ssuissero/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ tools:
homepage: https://github.com/jimmyliu1326/SsuisSero
documentation: https://github.com/jimmyliu1326/SsuisSero
tool_dev_url: https://github.com/jimmyliu1326/SsuisSero
licence: ["MIT"]
licence:
- "MIT"
identifier: ""
input:
- - meta:
Expand All @@ -35,14 +36,28 @@ output:
description: Tab-delimited serotype prediction
pattern: "*.{tsv}"
ontologies:
- edam: http://edamontology.org/format_3475 # TSV
- edam: http://edamontology.org/format_3475
versions_ssuissero:
- - ${task.process}:
type: string
description: The name of the process
- ssuissero:
type: string
description: The name of the tool
- 1.0.1:
type: string
description: 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
- ssuissero:
type: string
description: The name of the tool
- 1.0.1:
type: string
description: The version of the tool
authors:
- "@rpetit3"
maintainers:
Expand Down
32 changes: 28 additions & 4 deletions modules/nf-core/ssuissero/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ nextflow_process {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/prokaryotes/haemophilus_influenzae/genome/genome.fna.gz', checkIfExists: true)
]
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/prokaryotes/haemophilus_influenzae/genome/genome.fna.gz', checkIfExists: true)
]

"""
}
Expand All @@ -26,7 +26,31 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}
}

test("test-ssuissero - stub") {

options "-stub"

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/prokaryotes/haemophilus_influenzae/genome/genome.fna.gz', checkIfExists: true)
]

"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}
}
Expand Down
43 changes: 31 additions & 12 deletions modules/nf-core/ssuissero/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -1,19 +1,34 @@
{
"test-ssuissero": {
"test-ssuissero - stub": {
"content": [
{
"0": [
"tsv": [
[
{
"id": "test",
"single_end": false
},
"test_serotyping_res.tsv:md5,559dd2ca386eeb58f3975e3204ce9d43"
"test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
"versions.yml:md5,1343a6174c619ccf3c2469b19ab0a757"
],
"versions_ssuissero": [
[
"SSUISSERO",
"ssuissero",
"1.0.1"
]
]
}
],
"timestamp": "2026-04-29T16:20:03.264528",
"meta": {
"nf-test": "0.9.5",
"nextflow": "25.10.4"
}
},
"test-ssuissero": {
"content": [
{
"tsv": [
[
{
Expand All @@ -23,15 +38,19 @@
"test_serotyping_res.tsv:md5,559dd2ca386eeb58f3975e3204ce9d43"
]
],
"versions": [
"versions.yml:md5,1343a6174c619ccf3c2469b19ab0a757"
"versions_ssuissero": [
[
"SSUISSERO",
"ssuissero",
"1.0.1"
]
]
}
],
"timestamp": "2026-04-29T16:19:56.700719",
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-27T12:14:54.198227"
"nf-test": "0.9.5",
"nextflow": "25.10.4"
}
}
}
Loading