Skip to content
Merged
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/echtvar/encode/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::echtvar=0.2.4"
41 changes: 41 additions & 0 deletions modules/nf-core/echtvar/encode/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
process ECHTVAR_ENCODE {
tag "$meta.id"
label 'process_single'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ?
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/87/87b75cb9e32b89261e8cbdca40b219a5d58fc78ebf92d5ca97c7ca23da1b9517/data':
'community.wave.seqera.io/library/echtvar:0.2.4--e59eba33636e3aab' }"

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

output:
tuple val(meta), path("*.zip"), emit: db
Comment thread
Felix-Kummer marked this conversation as resolved.
tuple val("${task.process}"), val('echtvar'), eval("echtvar --version | sed 's/echtvar //g'"), emit: versions_echtvar, topic: versions

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

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
echtvar \\
Comment thread
Felix-Kummer marked this conversation as resolved.
encode \\
$args \\
${prefix}.zip \\
${json_filters} \\
$vcf
"""

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

touch ${prefix}.zip
"""
}
79 changes: 79 additions & 0 deletions modules/nf-core/echtvar/encode/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: "echtvar_encode"
description: Make (encode) a new echtvar file from decomposed vcf
keywords:
Comment thread
Felix-Kummer marked this conversation as resolved.
- vcf
- echtvar
- encode
- annotation
- allele-frequency
tools:
- "echtvar":
description: "Using all the bits for echt rapid variant annotation and filtering."
homepage: "https://github.com/brentp/echtvar/blob/v0.2.2/README.md"
documentation: "https://github.com/brentp/echtvar/blob/v0.2.2/README.md"
tool_dev_url: "https://github.com/brentp/echtvar"
doi: "10.1093/nar/gkac931"
licence:
- "MIT"
identifier: biotools:echtvar
input:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1' ]`
- vcf:
type: file
description: VCF file
pattern: "*.vcf"
ontologies:
- edam: "http://edamontology.org/format_3016"
- - meta2:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1' ]`
- json_filters:
type: file
description: JSON file containing the configuration for the encoding process (which columns are pulled from the input VCF and how they are stored)
pattern: "*.json"
ontologies:
- edam: "http://edamontology.org/format_3464"
output:
db:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1' ]`
- "*.zip":
type: file
description: Encoded ECHTVAR file
pattern: "*.zip"
ontologies:
- edam: "http://edamontology.org/format_3987"
versions_echtvar:
- - "${task.process}":
type: string
description: The name of the process
- "echtvar":
type: string
description: The name of the tool
- "echtvar --version | sed 's/echtvar //g'":
type: eval
description: The expression to obtain the version of the tool
topics:
versions:
- - "${task.process}":
type: string
description: The name of the process
- "echtvar":
type: string
description: The name of the tool
- "echtvar --version | sed 's/echtvar //g'":
type: eval
description: The expression to obtain the version of the tool
authors:
- "@sofiademmou"
maintainers:
- "@sofiademmou"
93 changes: 93 additions & 0 deletions modules/nf-core/echtvar/encode/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "echtvar"
tag "echtvar/encode"
tag "bcftools/norm"

config "./nextflow.config"

setup {
run("BCFTOOLS_NORM") {
script "../../../bcftools/norm/main.nf"
process {
"""
input[0] = [
[ id:'test' ], // meta map
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf', checkIfExists: true),
[]
]
input[1] = [
[ id:'genome' ], // meta map
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.gz', checkIfExists: true)
]
"""
}
}
}

test("homo_sapiens - vcf") {

when {
process {
"""
// Create dummy json config file for testing
def json_config = file("${moduleDir}/tests/config.json")
json_config.text = '[{"field": "DP", "alias": "gnomad_dp"}]'

input[0] = BCFTOOLS_NORM.out.vcf

input[1] = [
[ id:'test_db' ],
file(json_config)
]
"""
}
}

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

test("homo_sapiens - vcf - stub") {

options "-stub"

when {
process {
"""
// Create dummy json config file for testing
def json_config = file("${moduleDir}/tests/config.json")
json_config.text = '[{"field": "DP", "alias": "gnomad_dp"}]'

input[0] = BCFTOOLS_NORM.out.vcf

input[1] = [
[ id:'test_db' ],
file(json_config)
]
"""
}
}

then {
assert process.success
assertAll(
{ assert snapshot(
sanitizeOutput(process.out)
).match() }
)
}
}
}
54 changes: 54 additions & 0 deletions modules/nf-core/echtvar/encode/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"homo_sapiens - vcf": {
"content": [
{
"db": [
[
{
"id": "test"
},
"test.zip:md5,0c0f642e4c77b2ae78484c915fbe47a1"
]
],
"versions_echtvar": [
[
"ECHTVAR_ENCODE",
"echtvar",
"0.2.4"
]
]
}
],
"timestamp": "2026-06-18T14:42:59.497378002",
"meta": {
"nf-test": "0.9.5",
"nextflow": "26.03.4"
}
},
"homo_sapiens - vcf - stub": {
"content": [
{
"db": [
[
{
"id": "test"
},
"test.zip:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions_echtvar": [
[
"ECHTVAR_ENCODE",
"echtvar",
"0.2.4"
]
]
}
],
"timestamp": "2026-06-18T14:43:04.351665131",
"meta": {
"nf-test": "0.9.5",
"nextflow": "26.03.4"
}
}
}
5 changes: 5 additions & 0 deletions modules/nf-core/echtvar/encode/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
process {
withName: "BCFTOOLS_NORM" {
ext.args = ' -m - -w 10000 -O b '
}
}
Loading