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
11 changes: 6 additions & 5 deletions modules/nf-core/smoothxg/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ process SMOOTHXG {
output:
tuple val(meta), path("*smoothxg.gfa"), emit: gfa
path("*.maf") , optional: true, emit: maf
path "versions.yml" , emit: versions
tuple val("${task.process}"), val('smoothxg'), eval("smoothxg --version 2>&1 | sed 's/^v//; s/-.*//'"), topic: versions, emit: versions_smoothxg

when:
task.ext.when == null || task.ext.when
Expand All @@ -27,10 +27,11 @@ process SMOOTHXG {
--gfa-in=${gfa} \\
--smoothed-out=${prefix}.smoothxg.gfa \\
$args
"""

cat <<-END_VERSIONS > versions.yml
"${task.process}":
smoothxg: \$(smoothxg --version 2>&1 | cut -f 1 -d '-' | cut -f 2 -d 'v')
END_VERSIONS
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.smoothxg.gfa
"""
}
37 changes: 26 additions & 11 deletions modules/nf-core/smoothxg/meta.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: smoothxg
description: Linearize and simplify variation graph in GFA format using blocked partial
order alignment
description: Linearize and simplify variation graph in GFA format using blocked
partial order alignment
keywords:
- gfa
- graph
Expand All @@ -14,7 +14,8 @@ tools:
order alignment.
homepage: https://github.com/pangenome/smoothxg
documentation: https://github.com/pangenome/smoothxg
licence: ["MIT"]
licence:
- "MIT"
identifier: ""
input:
- - meta:
Expand Down Expand Up @@ -44,17 +45,31 @@ output:
maf:
- "*.maf":
type: file
description: write the multiple sequence alignments (MSAs) in MAF format in
this file (optional)
description: write the multiple sequence alignments (MSAs) in MAF format
in this file (optional)
pattern: "*.{maf}"
ontologies: []
versions_smoothxg:
- - ${task.process}:
type: string
description: The name of the process
- smoothxg:
type: string
description: The name of the tool
- "smoothxg --version 2>&1 | sed 's/^v//; s/-.*//'":
type: eval
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
- smoothxg:
type: string
description: The name of the tool
- "smoothxg --version 2>&1 | sed 's/^v//; s/-.*//'":
type: eval
description: The expression to obtain the version of the tool
authors:
- "@heuermh, @subwaystation"
maintainers:
Expand Down
28 changes: 26 additions & 2 deletions modules/nf-core/smoothxg/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
// { assert snapshot(process.out).match() } // SMOOTHXG is never deterministic
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.

This is a bit strange, it says it is not deterministic, but your tests are passing?

{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}

Expand All @@ -47,7 +47,31 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
// { assert snapshot(process.out).match() } // SMOOTHXG is never deterministic
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}

}

test("sarscov2 - illumina - assembly_gfa - stub") {

options "-stub"

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/gfa/assembly.gfa', checkIfExists: true)
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}

Expand Down
73 changes: 63 additions & 10 deletions modules/nf-core/smoothxg/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,91 @@
"sarscov2 - illumina - assembly_gfa": {
"content": [
{
"0": [
"gfa": [
[
{
"id": "test",
"single_end": false
},
"test.smoothxg.gfa:md5,c85140490fb255f8361499c01d0dd15b"
"test.smoothxg.gfa:md5,f0991ef0f6a54dcbae0454c812256664"
]
],
"1": [
"maf": [
"test.maf:md5,a6d82f572a5358926b87c69683d7825e"
],
"2": [
"versions.yml:md5,14c3d1a28b189a6db45facabbb5dc274"
"versions_smoothxg": [
[
"SMOOTHXG",
"smoothxg",
"0.8.0"
]
]
}
],
"timestamp": "2026-04-30T17:40:45.061861",
"meta": {
"nf-test": "0.9.5",
"nextflow": "26.04.0"
}
},
"sarscov2 - illumina - assembly_gfa - stub": {
"content": [
{
"gfa": [
[
{
"id": "test",
"single_end": false
},
"test.smoothxg.gfa:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"maf": [

],
"versions_smoothxg": [
[
"SMOOTHXG",
"smoothxg",
"0.8.0"
]
]
}
],
"timestamp": "2026-04-30T17:41:00.367248",
"meta": {
"nf-test": "0.9.5",
"nextflow": "26.04.0"
}
},
"homo_sapiens - pangenome - pangenome_seqwish_gfa": {
"content": [
{
"gfa": [
[
{
"id": "test",
"single_end": false
},
"test.smoothxg.gfa:md5,c85140490fb255f8361499c01d0dd15b"
"test.smoothxg.gfa:md5,4a3d6a9bcb0bb5dcf10a9ff41fc900e7"
]
],
"maf": [
"test.maf:md5,a6d82f572a5358926b87c69683d7825e"
"test.maf:md5,f974a7502bcf6eb59574832694664df9"
],
"versions": [
"versions.yml:md5,14c3d1a28b189a6db45facabbb5dc274"
"versions_smoothxg": [
[
"SMOOTHXG",
"smoothxg",
"0.8.0"
]
]
}
],
"timestamp": "2024-01-25T16:06:35.857843316"
"timestamp": "2026-04-30T17:40:55.500873",
"meta": {
"nf-test": "0.9.5",
"nextflow": "26.04.0"
}
}
}
Loading