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
16 changes: 2 additions & 14 deletions modules/nf-core/vcflib/vcfbreakmulti/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ process VCFLIB_VCFBREAKMULTI {

output:
tuple val(meta), path("*.vcf.gz"), emit: vcf
path "versions.yml" , emit: versions
tuple val("${task.process}"), val('vcflib'), val("1.0.14"), topic: versions, emit: versions_vcflib
// WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.

when:
task.ext.when == null || task.ext.when
Expand All @@ -21,7 +22,6 @@ process VCFLIB_VCFBREAKMULTI {
def args = task.ext.args ?: ''
def args2 = task.ext.args2 ?: ''
def prefix = task.ext.prefix ?: "${meta.id}.breakmulti"
def VERSION = '1.0.14' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.

if ( "$vcf" == "${prefix}.vcf.gz" ) {
error "Input and output names are the same, set prefix in module configuration to disambiguate!"
Expand All @@ -32,27 +32,15 @@ process VCFLIB_VCFBREAKMULTI {
$vcf \\
$args \\
| bgzip -c $args2 > ${prefix}.vcf.gz

cat <<-END_VERSIONS > versions.yml
"${task.process}":
vcflib: $VERSION
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}.breakmulti"
def VERSION = '1.0.14' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.

if ( "$vcf" == "${prefix}.vcf.gz" ) {
error "Input and output names are the same, set prefix in module configuration to disambiguate!"
}

"""
echo | gzip > ${prefix}.vcf.gz

cat <<-END_VERSIONS > versions.yml
"${task.process}":
vcflib: $VERSION
END_VERSIONS
"""
}
26 changes: 20 additions & 6 deletions modules/nf-core/vcflib/vcfbreakmulti/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,27 @@ output:
pattern: "*.vcf.gz"
ontologies:
- edam: http://edamontology.org/format_3989 # GZIP format
versions_vcflib:
- - ${task.process}:
type: string
description: The name of the process
- vcflib:
type: string
description: The name of the tool
- 1.0.14:
type: string
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
- vcflib:
type: string
description: The name of the tool
- 1.0.14:
type: string
description: The expression to obtain the version of the tool
authors:
- "@lucpen"
maintainers:
Expand Down
8 changes: 2 additions & 6 deletions modules/nf-core/vcflib/vcfbreakmulti/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ nextflow_process {
{ assert process.success },
{ assert snapshot(
path(process.out.vcf[0][1]).vcf.variantsMD5,
process.out.versions,
path(process.out.versions[0]).yaml
process.out.findAll { key, val -> key.startsWith("versions")}
).match()}
)
}
Expand All @@ -53,10 +52,7 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(
process.out,
path(process.out.versions[0]).yaml
).match() }
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}
}
Expand Down
47 changes: 18 additions & 29 deletions modules/nf-core/vcflib/vcfbreakmulti/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,46 @@
"test-vcflib-vcfbreakmulti-stub": {
"content": [
{
"0": [
"vcf": [
[
{
"id": "test"
},
"test.breakmulti.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
]
],
"1": [
"versions.yml:md5,6317972d701e04a973fd45e62ae316f1"
],
"vcf": [
"versions_vcflib": [
[
{
"id": "test"
},
"test.breakmulti.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
"VCFLIB_VCFBREAKMULTI",
"vcflib",
"1.0.14"
]
],
"versions": [
"versions.yml:md5,6317972d701e04a973fd45e62ae316f1"
]
},
{
"VCFLIB_VCFBREAKMULTI": {
"vcflib": "1.0.14"
}
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "25.04.4"
"nf-test": "0.9.3",
"nextflow": "25.10.4"
},
"timestamp": "2025-06-27T12:49:33.906407037"
"timestamp": "2026-03-02T22:37:29.367431883"
},
"test-vcflib-vcfbreakmulti": {
"content": [
"bc7bf3ee9e8430e064c539eb81e59bf9",
[
"versions.yml:md5,6317972d701e04a973fd45e62ae316f1"
],
{
"VCFLIB_VCFBREAKMULTI": {
"vcflib": "1.0.14"
}
"versions_vcflib": [
[
"VCFLIB_VCFBREAKMULTI",
"vcflib",
"1.0.14"
]
]
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "25.04.4"
"nf-test": "0.9.3",
"nextflow": "25.10.4"
},
"timestamp": "2025-06-27T12:49:28.02222234"
"timestamp": "2026-03-02T22:37:23.408482505"
}
}
19 changes: 4 additions & 15 deletions modules/nf-core/vcflib/vcffilter/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ process VCFLIB_VCFFILTER {

output:
tuple val(meta), path("*.vcf.gz"), emit: vcf
path "versions.yml", emit: versions
tuple val("${task.process}"), val('vcflib'), val("1.0.14"), topic: versions, emit: versions_vcflib
// WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.

when:
task.ext.when == null || task.ext.when
Expand All @@ -21,8 +22,7 @@ process VCFLIB_VCFFILTER {
def args = task.ext.args ?: ''
def args2 = task.ext.args2 ?: ''
def prefix = task.ext.prefix ?: "${meta.id}.filter"
// WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
def VERSION = '1.0.14'

if (!(args.contains("-f") || args.contains("--info-filter") || args.contains("-g") || args.contains("--genotype-filter"))) {
error("VCFLIB_VCFFILTER requires either the -f/--info-filter or -g/--genotype-filter arguments to be supplied using ext.args.")
}
Expand All @@ -34,26 +34,15 @@ process VCFLIB_VCFFILTER {
${args} \\
${vcf} \\
| bgzip -c ${args2} > ${prefix}.vcf.gz

cat <<-END_VERSIONS > versions.yml
"${task.process}":
vcflib: ${VERSION}
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}.filter"
// WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
def VERSION = '1.0.14'

if ("${vcf}" == "${prefix}.vcf.gz") {
error("Input and output names are the same, set prefix in module configuration to disambiguate!")
}
"""
echo | gzip > ${prefix}.vcf.gz

cat <<-END_VERSIONS > versions.yml
"${task.process}":
vcflib: ${VERSION}
END_VERSIONS
"""
}
29 changes: 22 additions & 7 deletions modules/nf-core/vcflib/vcffilter/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ tools:
documentation: "https://github.com/vcflib/vcflib"
tool_dev_url: "https://github.com/vcflib/vcflib"
doi: "10.1371/journal.pcbi.1009123"
licence: ["MIT"]
licence:
- "MIT"
identifier: biotools:vcflib
input:
- - meta:
Expand Down Expand Up @@ -42,13 +43,27 @@ output:
description: Filtered VCF file
pattern: "*.{vcf.gz}"
ontologies: []
versions_vcflib:
- - ${task.process}:
type: string
description: The name of the process
- vcflib:
type: string
description: The name of the tool
- 1.0.14:
type: string
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
- vcflib:
type: string
description: The name of the tool
- 1.0.14:
type: string
description: The expression to obtain the version of the tool
authors:
- "@zachary-foster"
maintainers:
Expand Down
8 changes: 2 additions & 6 deletions modules/nf-core/vcflib/vcffilter/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ nextflow_process {
{ assert process.success },
{ assert snapshot(
path(process.out.vcf[0][1]).vcf.variantsMD5,
process.out.versions,
path(process.out.versions[0]).yaml
process.out.findAll { key, val -> key.startsWith("versions")}
).match()}
)
}
Expand Down Expand Up @@ -62,10 +61,7 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(
process.out,
path(process.out.versions[0]).yaml
).match() }
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}
}
Expand Down
47 changes: 18 additions & 29 deletions modules/nf-core/vcflib/vcffilter/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,46 @@
"test-vcflib-vcffilter": {
"content": [
"86a26a6b691c05bc7f6e74772b44543d",
[
"versions.yml:md5,36cc801e2395c2d163bbd6b0d256e9aa"
],
{
"VCFLIB_VCFFILTER": {
"vcflib": "1.0.14"
}
"versions_vcflib": [
[
"VCFLIB_VCFFILTER",
"vcflib",
"1.0.14"
]
]
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "25.04.4"
"nf-test": "0.9.3",
"nextflow": "25.10.4"
},
"timestamp": "2025-06-27T12:49:41.69648886"
"timestamp": "2026-03-02T22:37:35.664688194"
},
"test-vcflib-vcffilter-stub": {
"content": [
{
"0": [
"vcf": [
[
{
"id": "test"
},
"test.filter.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
]
],
"1": [
"versions.yml:md5,36cc801e2395c2d163bbd6b0d256e9aa"
],
"vcf": [
"versions_vcflib": [
[
{
"id": "test"
},
"test.filter.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
"VCFLIB_VCFFILTER",
"vcflib",
"1.0.14"
]
],
"versions": [
"versions.yml:md5,36cc801e2395c2d163bbd6b0d256e9aa"
]
},
{
"VCFLIB_VCFFILTER": {
"vcflib": "1.0.14"
}
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "25.04.4"
"nf-test": "0.9.3",
"nextflow": "25.10.4"
},
"timestamp": "2025-06-27T13:07:05.523192366"
"timestamp": "2026-03-02T22:37:41.913217791"
}
}
Loading