diff --git a/modules/nf-core/salsa2/main.nf b/modules/nf-core/salsa2/main.nf index d435d342ebeb..9a2ed3ec7008 100644 --- a/modules/nf-core/salsa2/main.nf +++ b/modules/nf-core/salsa2/main.nf @@ -19,7 +19,7 @@ process SALSA2 { tuple val(meta), path("*_scaffolds_FINAL.fasta") , emit: fasta tuple val(meta), path("*_scaffolds_FINAL.agp") , emit: agp tuple val(meta), path("*/*scaffolds_FINAL.original-coordinates.agp"), emit: agp_original_coordinates, optional: true - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('salsa2'), eval("echo 2.3"), topic: versions, emit: versions_salsa2 when: task.ext.when == null || task.ext.when @@ -30,7 +30,6 @@ process SALSA2 { def gfa_opt = gfa ? "--gfa $gfa" : "" def dup_opt = dup ? "--dup $dup" : "" def filter = filter_bed ? "--filter $filter_bed" : "" - def VERSION = '2.3' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. """ run_pipeline.py \\ $args \\ @@ -43,10 +42,12 @@ process SALSA2 { mv */scaffolds_FINAL.fasta ${prefix}_scaffolds_FINAL.fasta mv */scaffolds_FINAL.agp ${prefix}_scaffolds_FINAL.agp + """ - cat <<-END_VERSIONS > versions.yml - "${task.process}": - SALSA2: $VERSION - END_VERSIONS + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}_scaffolds_FINAL.fasta + touch ${prefix}_scaffolds_FINAL.agp """ } diff --git a/modules/nf-core/salsa2/meta.yml b/modules/nf-core/salsa2/meta.yml index 82e733d61247..c48c245b8eb6 100644 --- a/modules/nf-core/salsa2/meta.yml +++ b/modules/nf-core/salsa2/meta.yml @@ -14,7 +14,8 @@ tools: documentation: "https://github.com/marbl/SALSA" tool_dev_url: "https://github.com/marbl/SALSA" doi: "10.1186/s12864-017-3879-z" - licence: ["MIT"] + licence: + - "MIT" identifier: "" input: - - meta: @@ -29,7 +30,8 @@ input: ontologies: [] - index: type: file - description: Fasta index file of assembly containing the length of contigs. + description: Fasta index file of assembly containing the length of + contigs. pattern: "*.{fa.fai, fasta.fai}" ontologies: [] - bed: @@ -70,8 +72,8 @@ output: e.g. [ id:'test', single_end:false ] - "*_scaffolds_FINAL.agp": type: file - description: AGP style output for the scaffolds describing the assignment, - orientation and ordering of contigs along the scaffolds + description: AGP style output for the scaffolds describing the + assignment, orientation and ordering of contigs along the scaffolds pattern: "*_scaffolds_FINAL.agp" ontologies: [] agp_original_coordinates: @@ -82,17 +84,32 @@ output: e.g. [ id:'test', single_end:false ] - "*/*scaffolds_FINAL.original-coordinates.agp": type: file - description: Secondary output AGP file with names and coordinates matching - the original input assembly (optional) + description: Secondary output AGP file with names and coordinates + matching the original input assembly (optional) pattern: "*scaffolds_FINAL.original-coordinates.agp" ontologies: [] + + versions_salsa2: + - - ${task.process}: + type: string + description: The name of the process + - salsa2: + type: string + description: The name of the tool + - echo 2.3: + 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 + - salsa2: + type: string + description: The name of the tool + - echo 2.3: + type: eval + description: The expression to obtain the version of the tool authors: - "@scorreard" maintainers: diff --git a/modules/nf-core/salsa2/tests/main.nf.test b/modules/nf-core/salsa2/tests/main.nf.test index 6897f2314302..7ad4cf50fdea 100644 --- a/modules/nf-core/salsa2/tests/main.nf.test +++ b/modules/nf-core/salsa2/tests/main.nf.test @@ -30,9 +30,37 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out.fasta).match("fasta") }, - { assert snapshot(process.out.agp).match("agp") }, - { assert snapshot(process.out.versions).match("versions") } + { assert snapshot(sanitizeOutput(process.out)).match() } + ) + } + } + + test("Single-Read - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end: false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) + ] + input[1] = [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true) + ] + input[2] = [] + input[3] = [] + input[4] = [] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(sanitizeOutput(process.out)).match() } ) } } diff --git a/modules/nf-core/salsa2/tests/main.nf.test.snap b/modules/nf-core/salsa2/tests/main.nf.test.snap index 94456c4c8ebb..fc8d3f317206 100644 --- a/modules/nf-core/salsa2/tests/main.nf.test.snap +++ b/modules/nf-core/salsa2/tests/main.nf.test.snap @@ -1,38 +1,80 @@ { - "versions": { + "Single-Read - stub": { "content": [ - [ - "versions.yml:md5,5985e59c635903ae7725afa4f5368de7" - ] - ], - "timestamp": "2024-05-22T19:35:47.254995" - }, - "agp": { - "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - "test_scaffolds_FINAL.agp:md5,03fe8c559b80730aab465697a6b0e01c" + { + "agp": [ + [ + { + "id": "test", + "single_end": false + }, + "test_scaffolds_FINAL.agp:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "agp_original_coordinates": [ + + ], + "fasta": [ + [ + { + "id": "test", + "single_end": false + }, + "test_scaffolds_FINAL.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions_salsa2": [ + [ + "SALSA2", + "salsa2", + "2.3" + ] ] - ] + } ], - "timestamp": "2024-05-22T19:34:18.646515" + "timestamp": "2026-04-30T17:20:13.326132", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } }, - "fasta": { + "Single-Read": { "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - "test_scaffolds_FINAL.fasta:md5,32c805e9e447ad47d6437e10f91bd5bf" + { + "agp": [ + [ + { + "id": "test", + "single_end": false + }, + "test_scaffolds_FINAL.agp:md5,03fe8c559b80730aab465697a6b0e01c" + ] + ], + "agp_original_coordinates": [ + + ], + "fasta": [ + [ + { + "id": "test", + "single_end": false + }, + "test_scaffolds_FINAL.fasta:md5,32c805e9e447ad47d6437e10f91bd5bf" + ] + ], + "versions_salsa2": [ + [ + "SALSA2", + "salsa2", + "2.3" + ] ] - ] + } ], - "timestamp": "2024-05-22T19:35:47.240011" + "timestamp": "2026-04-30T17:19:21.703989", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } } } \ No newline at end of file