8000 update vcfanno output by nvnieuwk · Pull Request #7353 · nf-core/modules · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

update vcfanno output #7353

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 23, 2025
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
2 changes: 2 additions & 0 deletions modules/nf-core/vcfanno/environment.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
channels:
- conda-forge
- bioconda

dependencies:
- bioconda::htslib=1.21
- bioconda::vcfanno=0.3.5
22 changes: 14 additions & 8 deletions modules/nf-core/vcfanno/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ process VCFANNO {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/vcfanno:0.3.5--h9ee0642_0':
'biocontainers/vcfanno:0.3.5--h9ee0642_0' }"
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/d6/d6a1af15acc0fbec648812e07ccb4c1c39a926f3a98031a50f51c5b859e543e1/data':
'community.wave.seqera.io/library/htslib_vcfanno:398cde9953538855' }"

input:
tuple val(meta), path(vcf), path(tbi), path(specific_resources)
Expand All @@ -14,15 +14,18 @@ process VCFANNO {
path resources

output:
tuple val(meta), path("*.vcf") , emit: vcf
path "versions.yml" , emit: versions
tuple val(meta), path("*.vcf.gz") , emit: vcf
tuple val(meta), path("*.vcf.gz.tbi") , emit: tbi
path "versions.yml" , emit: versions

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

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def args = task.ext.args ?: ''
def args2 = task.ext.args2 ?: ''
def args3 = task.ext.args3 ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def lua_cmd = lua ? "--lua ${lua}" : ""
"""
vcfanno \\
Expand All @@ -31,7 +34,9 @@ process VCFANNO {
${lua_cmd} \\
${toml} \\
${vcf} \\
> ${prefix}.vcf
| bgzip ${args2} --threads ${task.cpus} \\
> ${prefix}.vcf.gz \\
&& tabix ${args3} ${prefix}.vcf.gz
8000

cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand All @@ -42,7 +47,8 @@ process VCFANNO {
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.vcf
touch ${prefix}.vcf.gz
touch ${prefix}.vcf.gz.tbi

cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
26 changes: 22 additions & 4 deletions modules/nf-core/vcfanno/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,26 @@ output:
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- "*.vcf":
type: file
description: Annotated VCF file
pattern: "*.vcf"
pattern: "*.vcf.gz"
- "*.vcf.gz":
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
pattern: "*.vcf.gz"
- tbi:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
pattern: "*.vcf.gz.tbi"
- "*.vcf.gz.tbi":
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
pattern: "*.vcf.gz.tbi"
- versions:
- versions.yml:
type: file
Expand All @@ -65,6 +81,8 @@ output:
authors:
- "@projectoriented"
- "@matthdsm"
- "@nvnieuwk"
maintainers:
- "@projectoriented"
- "@matthdsm"
- "@nvnieuwk"
64 changes: 56 additions & 8 deletions modules/nf-core/vcfanno/tests/main.nf.test.snap
10000
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
{
"sarscov2 - [vcf(gz), tbi, vcf], [], toml, [vcf, tbi] - stub": {
"content": [
"test_compressed.vcf",
"test_compressed.vcf.gz",
[
"versions.yml:md5,5ff0991b612706ce15d82eb1564513b0"
]
],
"timestamp": "2023-12-06T12:18:25.69588598"
"meta": {
"nf-test": "0.9.1",
"nextflow": "24.10.3"
},
"timestamp": "2025-01-23T14:03:21.974046858"
},
"sarscov2 - [vcf(gz), tbi, vcf], [], toml, [vcf, tbi]": {
"content": [
Expand All @@ -17,27 +21,49 @@
"id": "test_compressed",
"single_end": false
},
"test_compressed.vcf:md5,d3cf5a6eaf6cca5b957833a313c5fbf4"
"test_compressed.vcf.gz:md5,d3cf5a6eaf6cca5b957833a313c5fbf4"
]
],
"1": [
[
{
"id": "test_compressed",
"single_end": false
},
"test_compressed.vcf.gz.tbi:md5,67a4272d5897fea5cc395dc87afc3629"
]
],
"2": [
"versions.yml:md5,5ff0991b612706ce15d82eb1564513b0"
],
"tbi": [
[
{
"id": "test_compressed",
"single_end": false
},
"test_compressed.vcf.gz.tbi:md5,67a4272d5897fea5cc395dc87afc3629"
]
],
"vcf": [
[
{
"id": "test_compressed",
"single_end": false
},
"test_compressed.vcf:md5,d3cf5a6eaf6cca5b957833a313c5fbf4"
"test_compressed.vcf.gz:md5,d3cf5a6eaf6cca5b957833a313c5fbf4"
]
],
"versions": [
"versions.yml:md5,5ff0991b612706ce15d82eb1564513b0"
]
}
],
"timestamp": "2023-12-06T12:21:13.209704154"
"meta": {
"nf-test": "0.9.1",
"nextflow": "24.10.3"
},
"timestamp": "2025-01-23T14:04:38.599392384"
},
"sarscov2 - [vcf, [], vcf], [], toml, [vcf, tbi]": {
"content": [
Expand All @@ -48,26 +74,48 @@
"id": "test_uncompressed",
"single_end": false
},
"test_uncompressed.vcf:md5,d3cf5a6eaf6cca5b957833a313c5fbf4"
"test_uncompressed.vcf.gz:md5,d3cf5a6eaf6cca5b957833a313c5fbf4"
]
],
"1": [
[
{
"id": "test_uncompressed",
"single_end": false
},
"test_uncompressed.vcf.gz.tbi:md5,67a4272d5897fea5cc395dc87afc3629"
]
],
"2": [
"versions.yml:md5,5ff0991b612706ce15d82eb1564513b0"
],
"tbi": [
[
{
"id": "test_uncompressed",
"single_end": false
},
"test_uncompressed.vcf.gz.tbi:md5,67a4272d5897fea5cc395dc87afc3629"
]
],
"vcf": [
[
{
"id": "test_uncompressed",
"single_end": false
},
"test_uncompressed.vcf:md5,d3cf5a6eaf6cca5b957833a313c5fbf4"
"test_uncompressed.vcf.gz:md5,d3cf5a6eaf6cca5b957833a313c5fbf4"
]
],
"versions": [
"versions.yml:md5,5ff0991b612706ce15d82eb1564513b0"
]
}
],
"timestamp": "2023-12-06T12:21:19.255212216"
"meta": {
"nf-test": "0.9.1",
"nextflow": "24.10.3"
},
"timestamp": "2025-01-23T14:04:48.104846161"
}
}
Loading
0