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
8 changes: 8 additions & 0 deletions modules/nf-core/svdss/index/environment.yml
Original file line number Diff line number Diff line change
@@ -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
43 changes: 43 additions & 0 deletions modules/nf-core/svdss/index/main.nf
Comment thread
vagkaratzas marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
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' :
'quay.io/biocontainers/svdss:2.1.1--he17396a_0' }"

input:
tuple val(meta), path(fasta), path(existing_index)
val output_format

output:
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

script:
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
Comment thread
vagkaratzas marked this conversation as resolved.
def format_flag = output_format == 'fmd' ? '-d' : '-b'
def existing_index_arg = existing_index ? "-i ${existing_index}" : ''
"""
SVDSS index \\
-t ${task.cpus} \\
${existing_index_arg} \\
${format_flag} ${fasta} \\
${args} \\
> ${prefix}.${output_format}
"""

stub:
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
Comment thread
vagkaratzas marked this conversation as resolved.
"""
echo ${args}

touch ${prefix}.${output_format}
"""
}
82 changes: 82 additions & 0 deletions modules/nf-core/svdss/index/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: svdss_index
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
- 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
- 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:
index:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1' ]`
- ${prefix}.${output_format}:
type: file
description: FM-index file produced by SVDSS index, used as input for SVDSS smooth and search
pattern: "*.{fmd,fmr}"
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, v//':
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, v//':
type: eval
description: The expression to obtain the version of the tool
authors:
- "@vagkaratzas"
maintainers:
- "@vagkaratzas"
86 changes: 86 additions & 0 deletions modules/nf-core/svdss/index/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
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),
[]
]
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'
"""
}
}

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),
[]
]
input[1] = 'fmd'
"""
}
}

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

}

}
80 changes: 80 additions & 0 deletions modules/nf-core/svdss/index/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"sarscov2 - genome fasta - fmd - stub": {
"content": [
{
"index": [
[
{
"id": "test"
},
"test.fmd:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions_svdss": [
[
"SVDSS_INDEX",
"svdss",
"2.1.1"
]
]
}
],
"meta": {
"nf-test": "0.9.3",
"nextflow": "25.10.4"
},
"timestamp": "2026-04-23T19:29:18.443950745"
},
"sarscov2 - genome fasta - fmd": {
"content": [
{
"index": [
[
{
"id": "test"
},
"test.fmd:md5,e07e753be2f2b6e6354963a1b44a0256"
]
],
"versions_svdss": [
[
"SVDSS_INDEX",
"svdss",
"2.1.1"
]
]
}
],
"meta": {
"nf-test": "0.9.3",
"nextflow": "25.10.4"
},
"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"
}
}
Loading