From 54f7cdeaf405ff5cc4ef03faa64d77871623d9fa Mon Sep 17 00:00:00 2001 From: vagkaratzas Date: Tue, 21 Apr 2026 12:47:41 +0100 Subject: [PATCH 1/3] bots add new module for svdss/index --- modules/nf-core/svdss/index/environment.yml | 8 +++ modules/nf-core/svdss/index/main.nf | 36 ++++++++++ modules/nf-core/svdss/index/meta.yml | 69 +++++++++++++++++++ .../nf-core/svdss/index/tests/main.nf.test | 58 ++++++++++++++++ .../svdss/index/tests/main.nf.test.snap | 54 +++++++++++++++ 5 files changed, 225 insertions(+) create mode 100644 modules/nf-core/svdss/index/environment.yml create mode 100644 modules/nf-core/svdss/index/main.nf create mode 100644 modules/nf-core/svdss/index/meta.yml create mode 100644 modules/nf-core/svdss/index/tests/main.nf.test create mode 100644 modules/nf-core/svdss/index/tests/main.nf.test.snap diff --git a/modules/nf-core/svdss/index/environment.yml b/modules/nf-core/svdss/index/environment.yml new file mode 100644 index 00000000000..ffc2399773d --- /dev/null +++ b/modules/nf-core/svdss/index/environment.yml @@ -0,0 +1,8 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - conda-forge + - bioconda +dependencies: + # renovate: datasource=conda depName=bioconda/svdss + - bioconda::svdss=2.1.1 diff --git a/modules/nf-core/svdss/index/main.nf b/modules/nf-core/svdss/index/main.nf new file mode 100644 index 00000000000..3335c04765e --- /dev/null +++ b/modules/nf-core/svdss/index/main.nf @@ -0,0 +1,36 @@ +process SVDSS_INDEX { + tag "$meta.id" + label 'process_medium' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/svdss:2.1.1--he17396a_0' : + 'biocontainers/svdss:2.1.1--he17396a_0' }" + + input: + tuple val(meta), path(fasta) + + output: + tuple val(meta), path("${prefix}.fmd"), emit: fmd + tuple val("${task.process}"), val('svdss'), eval("SVDSS --version 2>&1 | sed 's/SVDSS, //'"), emit: versions_svdss, topic: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + """ + SVDSS index \\ + -t ${task.cpus} \\ + -d ${fasta} \\ + ${args} \\ + > ${prefix}.fmd + """ + + stub: + prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.fmd + """ +} diff --git a/modules/nf-core/svdss/index/meta.yml b/modules/nf-core/svdss/index/meta.yml new file mode 100644 index 00000000000..ff2c1f7c2e5 --- /dev/null +++ b/modules/nf-core/svdss/index/meta.yml @@ -0,0 +1,69 @@ +name: svdss_index +description: Index a reference genome FASTA file using SVDSS, producing an FMD index for use with SVDSS smooth and search subcommands +keywords: + - structural variants + - sv calling + - indexing + - reference genome + - fm-index +tools: + - svdss: + description: | + SVDSS is a tool for structural variant discovery from short-read sequencing data. + It implements an FM-index-based approach to efficiently detect SVs against a reference genome. + homepage: https://github.com/Parsoa/SVDSS + documentation: https://github.com/Parsoa/SVDSS + tool_dev_url: https://github.com/Parsoa/SVDSS + doi: "10.1038/s41592-022-01674-1" + licence: + - "MIT" + identifier: "" +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1' ]` + - fasta: + type: file + description: Reference genome in FASTA format + pattern: "*.{fasta,fa,fna}" + ontologies: + - edam: http://edamontology.org/format_1929 # FASTA +output: + fmd: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1' ]` + - ${prefix}.fmd: + type: file + description: FMD index file produced by SVDSS index, used as input for SVDSS smooth and search + pattern: "*.fmd" + ontologies: [] + versions_svdss: + - - ${task.process}: + type: string + description: The name of the process + - svdss: + type: string + description: The name of the tool + - SVDSS --version 2>&1 | sed 's/SVDSS, //': + type: eval + description: The expression to obtain the version of the tool +topics: + versions: + - - ${task.process}: + type: string + description: The name of the process + - svdss: + type: string + description: The name of the tool + - SVDSS --version 2>&1 | sed 's/SVDSS, //': + type: eval + description: The expression to obtain the version of the tool +authors: + - "@vagkaratzas" +maintainers: + - "@vagkaratzas" diff --git a/modules/nf-core/svdss/index/tests/main.nf.test b/modules/nf-core/svdss/index/tests/main.nf.test new file mode 100644 index 00000000000..52a098db4f8 --- /dev/null +++ b/modules/nf-core/svdss/index/tests/main.nf.test @@ -0,0 +1,58 @@ +nextflow_process { + + name "Test Process SVDSS_INDEX" + script "../main.nf" + process "SVDSS_INDEX" + + tag "modules" + tag "modules_nfcore" + tag "svdss" + tag "svdss/index" + + test("sarscov2 - genome fasta - fmd") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(sanitizeOutput(process.out)).match() } + ) + } + + } + + test("sarscov2 - genome fasta - fmd - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(sanitizeOutput(process.out)).match() } + ) + } + + } + +} diff --git a/modules/nf-core/svdss/index/tests/main.nf.test.snap b/modules/nf-core/svdss/index/tests/main.nf.test.snap new file mode 100644 index 00000000000..d1e9488ede9 --- /dev/null +++ b/modules/nf-core/svdss/index/tests/main.nf.test.snap @@ -0,0 +1,54 @@ +{ + "sarscov2 - genome fasta - fmd - stub": { + "content": [ + { + "fmd": [ + [ + { + "id": "test" + }, + "test.fmd:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions_svdss": [ + [ + "SVDSS_INDEX", + "svdss", + "v2.1.1" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.4" + }, + "timestamp": "2026-04-21T12:39:28.541847717" + }, + "sarscov2 - genome fasta - fmd": { + "content": [ + { + "fmd": [ + [ + { + "id": "test" + }, + "test.fmd:md5,e07e753be2f2b6e6354963a1b44a0256" + ] + ], + "versions_svdss": [ + [ + "SVDSS_INDEX", + "svdss", + "v2.1.1" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.4" + }, + "timestamp": "2026-04-21T12:39:18.42633646" + } +} \ No newline at end of file From 3453b30d7d6a1196a1b2cbcf6e6b8910a1552281 Mon Sep 17 00:00:00 2001 From: vagkaratzas Date: Thu, 23 Apr 2026 11:16:02 +0100 Subject: [PATCH 2/3] added quay.io --- modules/nf-core/svdss/index/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/svdss/index/main.nf b/modules/nf-core/svdss/index/main.nf index 3335c04765e..03ff89780b4 100644 --- a/modules/nf-core/svdss/index/main.nf +++ b/modules/nf-core/svdss/index/main.nf @@ -5,7 +5,7 @@ process SVDSS_INDEX { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/svdss:2.1.1--he17396a_0' : - 'biocontainers/svdss:2.1.1--he17396a_0' }" + 'quay.io/biocontainers/svdss:2.1.1--he17396a_0' }" input: tuple val(meta), path(fasta) From 350e66390e89b6c663d9c9c5f20c2fd4a4a63d11 Mon Sep 17 00:00:00 2001 From: vagkaratzas Date: Thu, 23 Apr 2026 19:38:41 +0100 Subject: [PATCH 3/3] accept both fmd and fmr outputs with new input extension value --- modules/nf-core/svdss/index/main.nf | 19 +++++++--- modules/nf-core/svdss/index/meta.yml | 27 +++++++++---- .../nf-core/svdss/index/tests/main.nf.test | 32 +++++++++++++++- .../svdss/index/tests/main.nf.test.snap | 38 ++++++++++++++++--- 4 files changed, 95 insertions(+), 21 deletions(-) diff --git a/modules/nf-core/svdss/index/main.nf b/modules/nf-core/svdss/index/main.nf index 03ff89780b4..5a756077906 100644 --- a/modules/nf-core/svdss/index/main.nf +++ b/modules/nf-core/svdss/index/main.nf @@ -8,11 +8,12 @@ process SVDSS_INDEX { 'quay.io/biocontainers/svdss:2.1.1--he17396a_0' }" input: - tuple val(meta), path(fasta) + tuple val(meta), path(fasta), path(existing_index) + val output_format output: - tuple val(meta), path("${prefix}.fmd"), emit: fmd - tuple val("${task.process}"), val('svdss'), eval("SVDSS --version 2>&1 | sed 's/SVDSS, //'"), emit: versions_svdss, topic: versions + tuple val(meta), path("${prefix}.${output_format}"), emit: index + tuple val("${task.process}"), val('svdss'), eval("SVDSS --version 2>&1 | sed 's/SVDSS, v//'"), emit: versions_svdss, topic: versions when: task.ext.when == null || task.ext.when @@ -20,17 +21,23 @@ process SVDSS_INDEX { script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" + def format_flag = output_format == 'fmd' ? '-d' : '-b' + def existing_index_arg = existing_index ? "-i ${existing_index}" : '' """ SVDSS index \\ -t ${task.cpus} \\ - -d ${fasta} \\ + ${existing_index_arg} \\ + ${format_flag} ${fasta} \\ ${args} \\ - > ${prefix}.fmd + > ${prefix}.${output_format} """ stub: + def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" """ - touch ${prefix}.fmd + echo ${args} + + touch ${prefix}.${output_format} """ } diff --git a/modules/nf-core/svdss/index/meta.yml b/modules/nf-core/svdss/index/meta.yml index ff2c1f7c2e5..e2d7be13a0a 100644 --- a/modules/nf-core/svdss/index/meta.yml +++ b/modules/nf-core/svdss/index/meta.yml @@ -1,5 +1,5 @@ name: svdss_index -description: Index a reference genome FASTA file using SVDSS, producing an FMD index for use with SVDSS smooth and search subcommands +description: Index a reference genome FASTA file using SVDSS (via ropebwt3), producing either an FMD or FMR index for use with SVDSS smooth and search subcommands keywords: - structural variants - sv calling @@ -30,17 +30,30 @@ input: pattern: "*.{fasta,fa,fna}" ontologies: - edam: http://edamontology.org/format_1929 # FASTA + - existing_index: + type: file + description: | + Optional path to an existing index file to read and extend (passed via -i). + Set to [] when not used. + pattern: "*.{fmd,fmr}" + ontologies: [] + - output_format: + type: string + description: | + Output index format. Use 'fmd' for the fermi-delta format (adds -d flag) + or 'fmr' for the ropebwt format (adds -b flag). + pattern: "fmd|fmr" output: - fmd: + index: - - meta: type: map description: | Groovy Map containing sample information e.g. `[ id:'sample1' ]` - - ${prefix}.fmd: + - ${prefix}.${output_format}: type: file - description: FMD index file produced by SVDSS index, used as input for SVDSS smooth and search - pattern: "*.fmd" + description: FM-index file produced by SVDSS index, used as input for SVDSS smooth and search + pattern: "*.{fmd,fmr}" ontologies: [] versions_svdss: - - ${task.process}: @@ -49,7 +62,7 @@ output: - svdss: type: string description: The name of the tool - - SVDSS --version 2>&1 | sed 's/SVDSS, //': + - SVDSS --version 2>&1 | sed 's/SVDSS, v//': type: eval description: The expression to obtain the version of the tool topics: @@ -60,7 +73,7 @@ topics: - svdss: type: string description: The name of the tool - - SVDSS --version 2>&1 | sed 's/SVDSS, //': + - SVDSS --version 2>&1 | sed 's/SVDSS, v//': type: eval description: The expression to obtain the version of the tool authors: diff --git a/modules/nf-core/svdss/index/tests/main.nf.test b/modules/nf-core/svdss/index/tests/main.nf.test index 52a098db4f8..d53df76bf78 100644 --- a/modules/nf-core/svdss/index/tests/main.nf.test +++ b/modules/nf-core/svdss/index/tests/main.nf.test @@ -16,8 +16,34 @@ nextflow_process { """ input[0] = [ [ id:'test' ], - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + [] ] + input[1] = 'fmd' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(sanitizeOutput(process.out)).match() } + ) + } + + } + + test("sarscov2 - genome fasta - fmr") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + [] + ] + input[1] = 'fmr' """ } } @@ -40,8 +66,10 @@ nextflow_process { """ input[0] = [ [ id:'test' ], - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + [] ] + input[1] = 'fmd' """ } } diff --git a/modules/nf-core/svdss/index/tests/main.nf.test.snap b/modules/nf-core/svdss/index/tests/main.nf.test.snap index d1e9488ede9..b4e50647113 100644 --- a/modules/nf-core/svdss/index/tests/main.nf.test.snap +++ b/modules/nf-core/svdss/index/tests/main.nf.test.snap @@ -2,7 +2,7 @@ "sarscov2 - genome fasta - fmd - stub": { "content": [ { - "fmd": [ + "index": [ [ { "id": "test" @@ -14,7 +14,7 @@ [ "SVDSS_INDEX", "svdss", - "v2.1.1" + "2.1.1" ] ] } @@ -23,12 +23,12 @@ "nf-test": "0.9.3", "nextflow": "25.10.4" }, - "timestamp": "2026-04-21T12:39:28.541847717" + "timestamp": "2026-04-23T19:29:18.443950745" }, "sarscov2 - genome fasta - fmd": { "content": [ { - "fmd": [ + "index": [ [ { "id": "test" @@ -40,7 +40,7 @@ [ "SVDSS_INDEX", "svdss", - "v2.1.1" + "2.1.1" ] ] } @@ -49,6 +49,32 @@ "nf-test": "0.9.3", "nextflow": "25.10.4" }, - "timestamp": "2026-04-21T12:39:18.42633646" + "timestamp": "2026-04-23T19:29:07.682526462" + }, + "sarscov2 - genome fasta - fmr": { + "content": [ + { + "index": [ + [ + { + "id": "test" + }, + "test.fmr:md5,45ecc6cf667105098c01cc32ec255561" + ] + ], + "versions_svdss": [ + [ + "SVDSS_INDEX", + "svdss", + "2.1.1" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.4" + }, + "timestamp": "2026-04-23T19:29:12.935284928" } } \ No newline at end of file