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
20 changes: 5 additions & 15 deletions modules/nf-core/pneumocat/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ process PNEUMOCAT {
tag "$meta.id"
label 'process_low'

// WARN: Version information not provided by tool on CLI. Please update this string 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/pneumocat:1.2.1--0':
Expand All @@ -14,37 +15,26 @@ process PNEUMOCAT {
output:
tuple val(meta), path("*.xml"), emit: xml
tuple val(meta), path("*.txt"), emit: txt
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('pneumocat'), val("1.2.1"), topic: versions, emit: versions_pneumocat

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

script:
def args = task.ext.args ?: ''
def VERSION = '1.2.1' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
"""
PneumoCaT.py \\
--input_directory ./ \\
$args \\
--threads $task.cpus \\
${args} \\
--threads ${task.cpus} \\
--output_dir .

cat <<-END_VERSIONS > versions.yml
"${task.process}":
pneumocat: $VERSION
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
def VERSION = '1.2.1' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
"""
touch ${prefix}.results.xml
touch ${prefix}.txt

cat <<-END_VERSIONS > versions.yml
"${task.process}":
pneumocat: $VERSION
END_VERSIONS
"""
}
38 changes: 26 additions & 12 deletions modules/nf-core/pneumocat/meta.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json
name: "pneumocat"
description: Determine Streptococcus pneumoniae serotype from Illumina paired-end
reads
description: Determine Streptococcus pneumoniae serotype from Illumina paired-end reads
keywords:
- fastq
- serotype
- Streptococcus pneumoniae
tools:
- "pneumocat":
description: "PneumoCaT (Pneumococcal Capsular Typing) uses a two-step step approach
to assign capsular type to S.pneumoniae genomic data (Illumina)"
description: "PneumoCaT (Pneumococcal Capsular Typing) uses a two-step step approach to assign capsular type to S.pneumoniae genomic data (Illumina)"
homepage: "https://github.com/ukhsa-collaboration/PneumoCaT"
documentation: "https://github.com/ukhsa-collaboration/PneumoCaT"
tool_dev_url: "https://github.com/ukhsa-collaboration/PneumoCaT"
doi: "10.7717/peerj.2477"
licence: ["GPL v3"]
licence:
- "GPL v3"
identifier: ""
input:
- - meta:
Expand Down Expand Up @@ -51,13 +49,29 @@ output:
description: A detailed description of the predicted serotype
pattern: "*.txt"
ontologies: []
versions_pneumocat:
- - ${task.process}:
type: string
description: The name of the process
- pneumocat:
type: string
description: The name of the tool
- 1.2.1:
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
- pneumocat:
type: string
description: The name of the tool
- 1.2.1:
type: string
description: The expression to obtain the version of the tool

authors:
- "@rpetit3"
maintainers:
Expand Down
9 changes: 5 additions & 4 deletions modules/nf-core/pneumocat/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ nextflow_process {
}
process {
"""
input[0] = [[id:'test'],
input[0] = [
[id:'test'],
[
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists:true),
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists:true)
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists:true),
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists:true)
]
]
"""
Expand All @@ -31,7 +32,7 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}
}
Expand Down
33 changes: 9 additions & 24 deletions modules/nf-core/pneumocat/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,21 @@
"test_pneumocat -- stub": {
"content": [
{
"0": [
[
{
"id": "test"
},
"test.results.xml:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
"txt": [
[
{
"id": "test"
},
"test.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"2": [
"versions.yml:md5,d8d36b1fca1892122c5a186c9e8ce9cf"
],
"txt": [
"versions_pneumocat": [
[
{
"id": "test"
},
"test.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
"PNEUMOCAT",
"pneumocat",
"1.2.1"
]
],
"versions": [
"versions.yml:md5,d8d36b1fca1892122c5a186c9e8ce9cf"
],
"xml": [
[
{
Expand All @@ -42,10 +27,10 @@
]
}
],
"timestamp": "2026-08-06T17:25:13.84265496",
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.6"
},
"timestamp": "2025-05-13T14:11:48.37606449"
"nf-test": "0.9.5",
"nextflow": "26.04.6"
}
}
}
Loading