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
7 changes: 7 additions & 0 deletions modules/nf-core/octopusv/correct/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
channels:
- conda-forge
- bioconda
dependencies:
- "bioconda::octopusv=0.3.2"
40 changes: 40 additions & 0 deletions modules/nf-core/octopusv/correct/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
process OCTOPUSV_CORRECT {
tag "$meta.id"
label 'process_single'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/octopusv:0.3.2--pyhdfd78af_0' :
'quay.io/biocontainers/octopusv:0.3.2--pyhdfd78af_0' }"

input:
tuple val(meta), path(vcf)

output:
tuple val(meta), path("*.svcf"), emit: svcf
tuple val("${task.process}"), val('octopusv'), eval("octopusv --version"), emit: versions_octopusv, topic: versions

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"

"""
octopusv correct \\
-i ${vcf} \\
-o ${prefix}.svcf \\
$args
"""

stub:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"

"""
echo $args

touch ${prefix}.svcf
"""
}
67 changes: 67 additions & 0 deletions modules/nf-core/octopusv/correct/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json
name: "octopusv_correct"
description: "Standardize a caller VCF into OctopuSV SVCF format."
keywords:
- structural
- variant
- sv
- svcf
- normalize
tools:
- "octopusv":
description: "End-to-end structural variant post-processing: standardize, merge, compare, and export SVs."
homepage: "https://github.com/ylab-hi/OctopuSV"
documentation: "https://github.com/ylab-hi/OctopuSV"
tool_dev_url: "https://github.com/ylab-hi/OctopuSV"
doi: "10.1093/bioinformatics/btaf599"
licence: ["MIT"]
identifier: ""
input:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1' ]`
- vcf:
type: file
description: Structural variant calls in VCF format
pattern: "*.{vcf,vcf.gz}"
ontologies:
- edam: "http://edamontology.org/format_3016" # VCF
output:
svcf:
- - meta:
type: map
description: |
Groovy Map containing sample information
- "*.svcf":
type: file
description: Standardized SVCF file
pattern: "*.svcf"
ontologies:
- edam: "https://github.com/ylab-hi/OctopuSV/blob/main/docs/SVCF_specifications.md" # SVCF
versions_octopusv:
- - ${task.process}:
type: string
description: The name of the process
- octopusv:
type: string
description: The name of the tool
- octopusv --version:
type: eval
description: The expression to obtain the version of the tool
topics:
versions:
- - ${task.process}:
type: string
description: The name of the process
- octopusv:
type: string
description: The name of the tool
- octopusv --version:
type: eval
description: The expression to obtain the version of the tool
authors:
- "@manascripts"
maintainers:
- "@manascripts"
61 changes: 61 additions & 0 deletions modules/nf-core/octopusv/correct/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
nextflow_process {

name "Test Process OCTOPUSV_CORRECT"
script "../main.nf"
process "OCTOPUSV_CORRECT"

tag "modules"
tag "modules_nfcore"
tag "octopusv"
tag "octopusv/correct"

test("homo_sapiens - vcf") {

when {
process {
"""
input[0] = [
[ id:'test' ],
file(params.modules_testdata_base_path + '.../data/genomics/homo_sapiens/illumina/vcf/gridss.somatic.vcf', checkIfExists: true)
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
file(process.out.svcf.get(0).get(1)).name,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe something like https://github.com/seppinho/nft-vcf#summary could give a better snapshot here?

process.out.findAll { key, val -> key.startsWith('versions') }
).match() }
)
}

}

test("homo_sapiens - vcf - stub") {

options "-stub"

when {
process {
"""
input[0] = [
[ id:'test' ],
file(params.modules_testdata_base_path + '.../data/genomics/homo_sapiens/illumina/vcf/gridss.somatic.vcf', checkIfExists: true)
]
"""
}
}

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

}

}
Loading