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
2 changes: 1 addition & 1 deletion modules/nf-core/freyja/update/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ process FREYJA_UPDATE {

output:
path "${db_name}/*barcodes.*" , emit: barcodes
path "${db_name}/*lineages.yml" , emit: lineages_topology
path "${db_name}/*lineages.yml" , emit: lineages_topology, optional: true
path "${db_name}/*pathogen_config.yml" , emit: config
path "${db_name}/*curated_lineages.json" , emit: lineages_meta, optional: true
tuple val("${task.process}"), val('freyja'), eval("freyja --version | sed 's/.* //'"), topic: versions, emit: versions_freyja
Expand Down
28 changes: 28 additions & 0 deletions modules/nf-core/freyja/update/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,34 @@ nextflow_process {
}
}

test("RSVa - value db name - no lineages_topology ") {

when {
params {
freyja_update_args = "--pathogen RSVa"
}

process {
"""
input[0] = "test_db"
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert path(process.out.config.get(0)).text.contains("RSVa") },
{ assert process.out.lineages_topology == [] },
{ assert snapshot(
file(process.out.barcodes.get(0)).name,
process.out.findAll { key, val -> key.startsWith("versions") }
).match()
}
)
}
}

test("SARS-cov-2 - value db name - stub ") {
options "-stub"

Expand Down
31 changes: 25 additions & 6 deletions modules/nf-core/freyja/update/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
]
}
],
"timestamp": "2026-02-19T09:58:44.069216",
"meta": {
"nf-test": "0.9.3",
"nextflow": "25.10.3"
},
"timestamp": "2026-02-19T09:58:44.069216"
}
},
"sarscov2 - value db name ": {
"content": [
Expand All @@ -44,11 +44,30 @@
]
}
],
"timestamp": "2026-02-19T09:58:31.628204",
"meta": {
"nf-test": "0.9.3",
"nextflow": "25.10.3"
},
"timestamp": "2026-02-19T09:58:31.628204"
}
},
"RSVa - value db name - no lineages_topology ": {
"content": [
"RSVa_barcodes.csv",
{
"versions_freyja": [
[
"FREYJA_UPDATE",
"freyja",
"2.0.3"
]
]
}
],
"timestamp": "2026-04-03T23:23:55.517856659",
"meta": {
"nf-test": "0.9.5",
"nextflow": "25.10.4"
}
},
"MPX - value db name ": {
"content": [
Expand All @@ -64,10 +83,10 @@
]
}
],
"timestamp": "2026-02-19T09:49:00.685131",
"meta": {
"nf-test": "0.9.3",
"nextflow": "25.10.3"
},
"timestamp": "2026-02-19T09:49:00.685131"
}
}
}
Loading