Skip to content

Commit 04b7fe0

Browse files
authored
Merge branch 'master' into stub-topics-smoothxg
2 parents 83160c2 + 1b946a8 commit 04b7fe0

53 files changed

Lines changed: 1881 additions & 355 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

modules/nf-core/annotsv/annotsv/main.nf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ process ANNOTSV_ANNOTSV {
1818
tuple val(meta5), path(gene_transcripts)
1919

2020
output:
21-
tuple val(meta), path("*.tsv") , emit: tsv
22-
tuple val(meta), path("*.unannotated.tsv"), emit: unannotated_tsv, optional: true
21+
tuple val(meta), path("${prefix}.tsv") , emit: tsv
22+
tuple val(meta), path("${prefix}.unannotated.tsv"), emit: unannotated_tsv, optional: true
2323
tuple val(meta), path("*.vcf") , emit: vcf , optional: true
2424
tuple val("${task.process}"), val('annotsv'), eval("AnnotSV --version | sed 's/AnnotSV //'"), emit: versions_annotsv, topic: versions
2525

@@ -28,7 +28,7 @@ process ANNOTSV_ANNOTSV {
2828

2929
script:
3030
def args = task.ext.args ?: ''
31-
def prefix = task.ext.prefix ?: "${meta.id}"
31+
prefix = task.ext.prefix ?: "${meta.id}"
3232

3333
def cand_genes = candidate_genes ? "-candidateGenesFile ${candidate_genes}" : ""
3434
def small_variants = candidate_small_variants ? "-candidateSnvIndelFiles ${candidate_small_variants}" : ""
@@ -51,7 +51,7 @@ process ANNOTSV_ANNOTSV {
5151

5252
stub:
5353
def args = task.ext.args ?: ''
54-
def prefix = task.ext.prefix ?: "${meta.id}"
54+
prefix = task.ext.prefix ?: "${meta.id}"
5555

5656
def create_vcf = args.contains("-vcf 1") ? "touch ${prefix}.vcf" : ""
5757

modules/nf-core/annotsv/annotsv/meta.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json
12
name: "annotsv_annotsv"
23
description: Annotation and Ranking of Structural Variation
34
keywords:
@@ -91,7 +92,7 @@ output:
9192
description: |
9293
Groovy Map containing sample information
9394
e.g. [ id:'test', single_end:false ]
94-
- "*.tsv":
95+
- "${prefix}.tsv":
9596
type: file
9697
description: A TSV file containing the annotated variants
9798
pattern: "*.tsv"
@@ -103,7 +104,7 @@ output:
103104
description: |
104105
Groovy Map containing sample information
105106
e.g. [ id:'test', single_end:false ]
106-
- "*.unannotated.tsv":
107+
- "${prefix}.unannotated.tsv":
107108
type: file
108109
description: OPTIONAL - TSV file containing the unannotated variants
109110
pattern: "*.unannotated.tsv"

modules/nf-core/annotsv/annotsv/tests/main.nf.test.snap

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@
77
{
88
"id": "test"
99
},
10-
[
11-
"test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e",
12-
"test.unannotated.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
13-
]
10+
"test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
1411
]
1512
],
1613
"unannotated_tsv": [
@@ -38,10 +35,10 @@
3835
]
3936
}
4037
],
41-
"timestamp": "2026-03-11T16:06:19.47501651",
38+
"timestamp": "2026-05-01T10:39:49.368087494",
4239
"meta": {
43-
"nf-test": "0.9.4",
44-
"nextflow": "25.10.4"
40+
"nf-test": "0.9.5",
41+
"nextflow": "26.03.2"
4542
}
4643
}
4744
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
3+
channels:
4+
- conda-forge
5+
- bioconda
6+
dependencies:
7+
- "bioconda::bio2zarr=0.1.8"
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
process BIO2ZARR_VCF2ZARRCONVERT {
2+
tag "$meta.id"
3+
label 'process_low'
4+
5+
conda "${moduleDir}/environment.yml"
6+
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
7+
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/77/7713d869c8c8259c10701c95fc105bad8bcfbd6735de6941a47c9e6e26e9bb2f/data':
8+
'community.wave.seqera.io/library/bio2zarr:0.1.8--c2c92dd3f64fb0f9' }"
9+
10+
input:
11+
tuple val(meta), path(vcf)
12+
13+
output:
14+
tuple val(meta), path("*.vcz"), emit: vcz
15+
tuple val("${task.process}"), val('vcf2zarr'), eval('vcf2zarr --version |& sed -n "s/.* //p"'), topic: versions , emit: versions_vcf2zarr
16+
17+
when:
18+
task.ext.when == null || task.ext.when
19+
20+
script:
21+
def args = task.ext.args ?: ''
22+
def prefix = task.ext.prefix ?: "${meta.id}"
23+
"""
24+
vcf2zarr \\
25+
convert \\
26+
${args} \\
27+
--worker-processes ${task.cpus} \\
28+
${vcf} \\
29+
${prefix}.vcz
30+
"""
31+
32+
stub:
33+
def args = task.ext.args ?: ''
34+
def prefix = task.ext.prefix ?: "${meta.id}"
35+
"""
36+
echo ${args}
37+
38+
mkdir ${prefix}.vcz
39+
"""
40+
}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: "bio2zarr_vcf2zarrconvert"
2+
description: Convert VCF data to the VCF Zarr specification reliably, in parallel or distributed over a cluster.
3+
keywords:
4+
- vcf
5+
- zarr
6+
- convert
7+
- genomics
8+
tools:
9+
- "vcf2zarr":
10+
description: "Convert bioinformatics data to Zarr"
11+
homepage: "https://sgkit-dev.github.io/bio2zarr/vcf2zarr/overview.html"
12+
documentation: "https://sgkit-dev.github.io/bio2zarr/"
13+
tool_dev_url: "https://github.com/sgkit-dev/bio2zarr"
14+
doi: "10.1101/2024.06.11.598241"
15+
licence:
16+
- "Apache-2.0"
17+
identifier: biotools:bio2zarr
18+
input:
19+
- - meta:
20+
type: map
21+
description: |
22+
Groovy Map containing sample information
23+
e.g. `[ id:'sample1' ]`
24+
- vcf:
25+
type: file
26+
description: Input VCF/BCF file to convert
27+
pattern: "*.{vcf,vcf.gz,bcf,bcf.gz}"
28+
ontologies:
29+
- edam: "http://edamontology.org/format_3016" # VCF
30+
- edam: "http://edamontology.org/format_3020" # BCF
31+
output:
32+
vcz:
33+
- - meta:
34+
type: map
35+
description: |
36+
Groovy Map containing sample information
37+
e.g. `[ id:'sample1' ]`
38+
- "*.vcz":
39+
type: directory
40+
description: Output VCF Zarr store directory
41+
pattern: "*.vcz"
42+
ontologies: []
43+
versions_vcf2zarr:
44+
- - ${task.process}:
45+
type: string
46+
description: The name of the process
47+
- vcf2zarr:
48+
type: string
49+
description: The name of the tool
50+
- vcf2zarr --version |& sed -n "s/.* //p":
51+
type: eval
52+
description: The expression to obtain the version of the tool
53+
topics:
54+
versions:
55+
- - ${task.process}:
56+
type: string
57+
description: The name of the process
58+
- vcf2zarr:
59+
type: string
60+
description: The name of the tool
61+
- vcf2zarr --version |& sed -n "s/.* //p":
62+
type: eval
63+
description: The expression to obtain the version of the tool
64+
authors:
65+
- "@camlloyd"
66+
maintainers:
67+
- "@camlloyd"
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
nextflow_process {
2+
3+
name "Test Process BIO2ZARR_VCF2ZARRCONVERT"
4+
script "../main.nf"
5+
process "BIO2ZARR_VCF2ZARRCONVERT"
6+
7+
tag "modules"
8+
tag "modules_nfcore"
9+
tag "bio2zarr"
10+
tag "bio2zarr/vcf2zarrconvert"
11+
12+
test("sarscov2 - vcf.gz - vcz") {
13+
14+
when {
15+
process {
16+
"""
17+
input[0] = [
18+
[ id:'test' ],
19+
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true)
20+
]
21+
"""
22+
}
23+
}
24+
25+
then {
26+
assertAll(
27+
{ assert process.success },
28+
{ assert snapshot(sanitizeOutput(process.out)).match() }
29+
)
30+
}
31+
32+
}
33+
34+
test("sarscov2 - vcf.gz - vcz - stub") {
35+
36+
options "-stub"
37+
38+
when {
39+
process {
40+
"""
41+
input[0] = [
42+
[ id:'test' ],
43+
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true)
44+
]
45+
"""
46+
}
47+
}
48+
49+
then {
50+
assertAll(
51+
{ assert process.success },
52+
{ assert snapshot(sanitizeOutput(process.out)).match() }
53+
)
54+
}
55+
56+
}
57+
58+
}

0 commit comments

Comments
 (0)