Skip to content

Commit dd7f620

Browse files
nvnieuwkgeorgiakes
authored andcommitted
Syntax updates and topic version for manta modules (nf-core#9556)
* update manta germline * topics convertinversion * topics convertinversion * topics manta/somatic * topics manta/tumoronly
1 parent 5327ad5 commit dd7f620

20 files changed

Lines changed: 297 additions & 154 deletions

File tree

modules/nf-core/manta/convertinversion/environment.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ channels:
44
- conda-forge
55
- bioconda
66
dependencies:
7-
- conda-forge::python=2.7.15
8-
- bioconda::manta=1.6.0
97
- bioconda::htslib=1.16
8+
- bioconda::manta=1.6.0
109
- bioconda::samtools=1.16.1
10+
- conda-forge::python=2.7.15

modules/nf-core/manta/convertinversion/main.nf

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ process MANTA_CONVERTINVERSION {
1515
output:
1616
tuple val(meta), path("*.vcf.gz") , emit: vcf
1717
tuple val(meta), path("*.vcf.gz.tbi"), emit: tbi
18-
path "versions.yml" , emit: versions
18+
tuple val("${task.process}"), val("manta"), eval("configManta.py --version"), topic: versions, emit: versions_manta
19+
tuple val("${task.process}"), val("samtools"), eval("samtools --version | head -1 | sed -e s'/samtools //'"), topic: versions, emit: versions_samtools
1920

2021
when:
2122
task.ext.when == null || task.ext.when
@@ -25,24 +26,12 @@ process MANTA_CONVERTINVERSION {
2526
"""
2627
convertInversion.py \$(which samtools) $fasta $vcf | bgzip --threads $task.cpus > ${prefix}.vcf.gz
2728
tabix ${prefix}.vcf.gz
28-
29-
cat <<-END_VERSIONS > versions.yml
30-
"${task.process}":
31-
manta: \$( configManta.py --version )
32-
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//' )
33-
END_VERSIONS
3429
"""
3530

3631
stub:
3732
def prefix = task.ext.prefix ?: "${meta.id}"
3833
"""
3934
echo "" | gzip > ${prefix}.vcf.gz
4035
touch ${prefix}.vcf.gz.tbi
41-
42-
cat <<-END_VERSIONS > versions.yml
43-
"${task.process}":
44-
manta: \$( configManta.py --version )
45-
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//' )
46-
END_VERSIONS
4736
"""
4837
}

modules/nf-core/manta/convertinversion/meta.yml

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,48 @@ output:
6161
description: TBI file produces by Manta
6262
pattern: "*.vcf.gz.tbi"
6363
ontologies: []
64+
versions_manta:
65+
- - ${task.process}:
66+
type: string
67+
description: The name of the process
68+
- manta:
69+
type: string
70+
description: The name of the tool
71+
- configManta.py --version:
72+
type: eval
73+
description: The expression to obtain the version of the tool
74+
versions_samtools:
75+
- - ${task.process}:
76+
type: string
77+
description: The name of the process
78+
- samtools:
79+
type: string
80+
description: The name of the tool
81+
- samtools --version | head -1 | sed -e s'/samtools //':
82+
type: eval
83+
description: The expression to obtain the version of the tool
84+
85+
topics:
6486
versions:
65-
- versions.yml:
66-
type: file
67-
description: File containing software versions
68-
pattern: "versions.yml"
69-
ontologies:
70-
- edam: http://edamontology.org/format_3750 # YAML
87+
- - ${task.process}:
88+
type: string
89+
description: The name of the process
90+
- manta:
91+
type: string
92+
description: The name of the tool
93+
- configManta.py --version:
94+
type: eval
95+
description: The expression to obtain the version of the tool
96+
- - ${task.process}:
97+
type: string
98+
description: The name of the process
99+
- samtools:
100+
type: string
101+
description: The name of the tool
102+
- samtools --version | head -1 | sed -e s'/samtools //':
103+
type: eval
104+
description: The expression to obtain the version of the tool
105+
71106
authors:
72107
- "@FriederikeHanssen"
73108
maintainers:

modules/nf-core/manta/convertinversion/tests/main.nf.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ nextflow_process {
5757
{ assert snapshot(
5858
process.out.vcf.collect { it.collect { it instanceof Map ? it : path(it).linesGzip[-7..-3] } },
5959
process.out.tbi.collect { it.collect { it instanceof Map ? it : file(it).name } },
60-
process.out.versions
60+
process.out.findAll { key, val -> key.startsWith("versions_") }
6161
).match() }
6262
)
6363
}

modules/nf-core/manta/convertinversion/tests/main.nf.test.snap

Lines changed: 46 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,18 @@
1919
]
2020
],
2121
"2": [
22-
"versions.yml:md5,d9a3c2c54bad36a8310d42eae3d57801"
22+
[
23+
"MANTA_CONVERTINVERSION",
24+
"manta",
25+
"1.6.0"
26+
]
27+
],
28+
"3": [
29+
[
30+
"MANTA_CONVERTINVERSION",
31+
"samtools",
32+
"1.16.1"
33+
]
2334
],
2435
"tbi": [
2536
[
@@ -37,16 +48,27 @@
3748
"test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
3849
]
3950
],
40-
"versions": [
41-
"versions.yml:md5,d9a3c2c54bad36a8310d42eae3d57801"
51+
"versions_manta": [
52+
[
53+
"MANTA_CONVERTINVERSION",
54+
"manta",
55+
"1.6.0"
56+
]
57+
],
58+
"versions_samtools": [
59+
[
60+
"MANTA_CONVERTINVERSION",
61+
"samtools",
62+
"1.16.1"
63+
]
4264
]
4365
}
4466
],
4567
"meta": {
46-
"nf-test": "0.8.4",
47-
"nextflow": "24.03.0"
68+
"nf-test": "0.9.2",
69+
"nextflow": "25.04.6"
4870
},
49-
"timestamp": "2024-05-06T10:26:25.996091364"
71+
"timestamp": "2025-12-11T16:58:38.212888433"
5072
},
5173
"homo_sapiens - vcf, fasta": {
5274
"content": [
@@ -72,14 +94,27 @@
7294
"test.vcf.gz.tbi"
7395
]
7496
],
75-
[
76-
"versions.yml:md5,d9a3c2c54bad36a8310d42eae3d57801"
77-
]
97+
{
98+
"versions_manta": [
99+
[
100+
"MANTA_CONVERTINVERSION",
101+
"manta",
102+
"1.6.0"
103+
]
104+
],
105+
"versions_samtools": [
106+
[
107+
"MANTA_CONVERTINVERSION",
108+
"samtools",
109+
"1.16.1"
110+
]
111+
]
112+
}
78113
],
79114
"meta": {
80115
"nf-test": "0.9.2",
81-
"nextflow": "25.04.7"
116+
"nextflow": "25.04.6"
82117
},
83-
"timestamp": "2025-09-17T09:41:08.582282"
118+
"timestamp": "2025-12-11T17:02:58.806373235"
84119
}
85120
}

modules/nf-core/manta/germline/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ channels:
44
- conda-forge
55
- bioconda
66
dependencies:
7-
- conda-forge::python=2.7.15
87
- bioconda::manta=1.6.0
8+
- conda-forge::python=2.7.15

modules/nf-core/manta/germline/main.nf

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,21 @@ process MANTA_GERMLINE {
1616
path(config)
1717

1818
output:
19-
tuple val(meta), path("*candidate_small_indels.vcf.gz") , emit: candidate_small_indels_vcf
20-
tuple val(meta), path("*candidate_small_indels.vcf.gz.tbi"), emit: candidate_small_indels_vcf_tbi
21-
tuple val(meta), path("*candidate_sv.vcf.gz") , emit: candidate_sv_vcf
22-
tuple val(meta), path("*candidate_sv.vcf.gz.tbi") , emit: candidate_sv_vcf_tbi
23-
tuple val(meta), path("*diploid_sv.vcf.gz") , emit: diploid_sv_vcf
24-
tuple val(meta), path("*diploid_sv.vcf.gz.tbi") , emit: diploid_sv_vcf_tbi
25-
path "versions.yml" , emit: versions
19+
tuple val(meta), path("*candidate_small_indels.vcf.gz") , emit: candidate_small_indels_vcf
20+
tuple val(meta), path("*candidate_small_indels.vcf.gz.tbi") , emit: candidate_small_indels_vcf_tbi
21+
tuple val(meta), path("*candidate_sv.vcf.gz") , emit: candidate_sv_vcf
22+
tuple val(meta), path("*candidate_sv.vcf.gz.tbi") , emit: candidate_sv_vcf_tbi
23+
tuple val(meta), path("*diploid_sv.vcf.gz") , emit: diploid_sv_vcf
24+
tuple val(meta), path("*diploid_sv.vcf.gz.tbi") , emit: diploid_sv_vcf_tbi
25+
tuple val("${task.process}"), val("manta"), eval("configManta.py --version"), topic: versions, emit: versions_manta
2626

2727
when:
2828
task.ext.when == null || task.ext.when
2929

3030
script:
3131
def args = task.ext.args ?: ''
3232
def prefix = task.ext.prefix ?: "${meta.id}"
33-
def input_files = input.collect{"--bam ${it}"}.join(' ')
33+
def input_files = input.collect{ bam -> "--bam ${bam}"}.join(' ')
3434
def options_manta = target_bed ? "--callRegions $target_bed" : ""
3535
def config_option = config ? "--config ${config}" : ""
3636
"""
@@ -56,11 +56,6 @@ process MANTA_GERMLINE {
5656
${prefix}.diploid_sv.vcf.gz
5757
mv manta/results/variants/diploidSV.vcf.gz.tbi \\
5858
${prefix}.diploid_sv.vcf.gz.tbi
59-
60-
cat <<-END_VERSIONS > versions.yml
61-
"${task.process}":
62-
manta: \$( configManta.py --version )
63-
END_VERSIONS
6459
"""
6560

6661
stub:
@@ -72,10 +67,5 @@ process MANTA_GERMLINE {
7267
touch ${prefix}.candidate_sv.vcf.gz.tbi
7368
echo "" | gzip > ${prefix}.diploid_sv.vcf.gz
7469
touch ${prefix}.diploid_sv.vcf.gz.tbi
75-
76-
cat <<-END_VERSIONS > versions.yml
77-
"${task.process}":
78-
manta: \$( configManta.py --version )
79-
END_VERSIONS
8070
"""
8171
}

modules/nf-core/manta/germline/meta.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,29 @@ output:
137137
description: Index for gzipped VCF file containing variants
138138
pattern: "*.{vcf.gz.tbi}"
139139
ontologies: []
140+
versions_manta:
141+
- - ${task.process}:
142+
type: string
143+
description: The name of the process
144+
- manta:
145+
type: string
146+
description: The name of the tool
147+
- configManta.py --version:
148+
type: eval
149+
description: The expression to obtain the version of the tool
150+
151+
topics:
140152
versions:
141-
- versions.yml:
142-
type: file
143-
description: File containing software versions
144-
pattern: "versions.yml"
145-
ontologies:
146-
- edam: http://edamontology.org/format_3750 # YAML
153+
- - ${task.process}:
154+
type: string
155+
description: The name of the process
156+
- manta:
157+
type: string
158+
description: The name of the tool
159+
- configManta.py --version:
160+
type: eval
161+
description: The expression to obtain the version of the tool
162+
147163
authors:
148164
- "@maxulysse"
149165
- "@ramprasadn"

modules/nf-core/manta/germline/tests/main.nf.test

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ nextflow_process {
4242
path(process.out.candidate_small_indels_vcf.get(0).get(1)).linesGzip.contains("##fileformat=VCFv4.1"),
4343
path(process.out.candidate_sv_vcf.get(0).get(1)).linesGzip.contains("##fileformat=VCFv4.1"),
4444
path(process.out.diploid_sv_vcf.get(0).get(1)).linesGzip.contains("##fileformat=VCFv4.1"),
45-
process.out.versions
45+
process.out.findAll { key, val -> key.startsWith("versions_") }
4646
).match() }
4747
)
4848
}
@@ -81,7 +81,7 @@ nextflow_process {
8181
path(process.out.candidate_small_indels_vcf.get(0).get(1)).linesGzip.contains("##fileformat=VCFv4.1"),
8282
path(process.out.candidate_sv_vcf.get(0).get(1)).linesGzip.contains("##fileformat=VCFv4.1"),
8383
path(process.out.diploid_sv_vcf.get(0).get(1)).linesGzip.contains("##fileformat=VCFv4.1"),
84-
process.out.versions
84+
process.out.findAll { key, val -> key.startsWith("versions_") }
8585
).match() }
8686
)
8787
}
@@ -124,7 +124,7 @@ nextflow_process {
124124
path(process.out.candidate_small_indels_vcf.get(0).get(1)).linesGzip.contains("##fileformat=VCFv4.1"),
125125
path(process.out.candidate_sv_vcf.get(0).get(1)).linesGzip.contains("##fileformat=VCFv4.1"),
126126
path(process.out.diploid_sv_vcf.get(0).get(1)).linesGzip.contains("##fileformat=VCFv4.1"),
127-
process.out.versions
127+
process.out.findAll { key, val -> key.startsWith("versions_") }
128128
).match() }
129129
)
130130
}

0 commit comments

Comments
 (0)