diff --git a/modules/nf-core/freyja/update/main.nf b/modules/nf-core/freyja/update/main.nf index bcd0f4eeedba..4ea62f4ff83a 100644 --- a/modules/nf-core/freyja/update/main.nf +++ b/modules/nf-core/freyja/update/main.nf @@ -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 diff --git a/modules/nf-core/freyja/update/tests/main.nf.test b/modules/nf-core/freyja/update/tests/main.nf.test index 9eccce3cb74b..a2e8a1ed8380 100644 --- a/modules/nf-core/freyja/update/tests/main.nf.test +++ b/modules/nf-core/freyja/update/tests/main.nf.test @@ -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" diff --git a/modules/nf-core/freyja/update/tests/main.nf.test.snap b/modules/nf-core/freyja/update/tests/main.nf.test.snap index 3046fc23f75e..2e47a433dafa 100644 --- a/modules/nf-core/freyja/update/tests/main.nf.test.snap +++ b/modules/nf-core/freyja/update/tests/main.nf.test.snap @@ -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": [ @@ -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": [ @@ -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" + } } } \ No newline at end of file