Skip to content

Commit 6e6274f

Browse files
authored
Swap lofreq to topics (#11978)
* Swap lofreq to topics * Fix version extraction * Also fix nonpareil * Unstable vcf
1 parent d6379de commit 6e6274f

30 files changed

Lines changed: 485 additions & 422 deletions

modules/nf-core/lofreq/alnqual/main.nf

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ process LOFREQ_ALNQUAL {
1313

1414
output:
1515
tuple val(meta), path("*.bam"), emit: bam
16-
path "versions.yml" , emit: versions
16+
tuple val("${task.process}"), val('lofreq'), eval("lofreq version | sed -n '1s/^.* //p'"), emit: versions_lofreq, topic: versions
1717

1818
when:
1919
task.ext.when == null || task.ext.when
@@ -30,23 +30,11 @@ process LOFREQ_ALNQUAL {
3030
-b \\
3131
$bam \\
3232
$fasta > ${prefix}.bam
33-
34-
cat <<-END_VERSIONS > versions.yml
35-
"${task.process}":
36-
lofreq: \$(echo \$(lofreq version 2>&1) | sed 's/^version: //; s/ *commit.*\$//')
37-
samtools: \$( samtools --version |& sed '1!d ; s/samtools //' )
38-
END_VERSIONS
3933
"""
4034

4135
stub:
4236
def prefix = task.ext.prefix ?: "${meta.id}"
4337
"""
4438
touch ${prefix}.bam
45-
46-
cat <<-END_VERSIONS > versions.yml
47-
"${task.process}":
48-
lofreq: \$(echo \$(lofreq version 2>&1) | sed 's/^version: //; s/ *commit.*\$//')
49-
samtools: \$( samtools --version |& sed '1!d ; s/samtools //' )
50-
END_VERSIONS
5139
"""
5240
}

modules/nf-core/lofreq/alnqual/meta.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,27 @@ output:
4242
description: BAM/CRAM/SAM file with base and indel alignment qualities
4343
pattern: "*.{bam,cram,sam}"
4444
ontologies: []
45+
versions_lofreq:
46+
- - ${task.process}:
47+
type: string
48+
description: Process which generated the version
49+
- lofreq:
50+
type: string
51+
description: Tool name
52+
- "lofreq version | sed -n '1s/^.* //p'":
53+
type: eval
54+
description: The expression to obtain the version of the tool
55+
topics:
4556
versions:
46-
- versions.yml:
47-
type: file
48-
description: File containing software versions
49-
pattern: "versions.yml"
50-
ontologies:
51-
- edam: http://edamontology.org/format_3750 # YAML
57+
- - ${task.process}:
58+
type: string
59+
description: Process which generated the version
60+
- lofreq:
61+
type: string
62+
description: Tool name
63+
- "lofreq version | sed -n '1s/^.* //p'":
64+
type: eval
65+
description: The expression to obtain the version of the tool
5266
authors:
5367
- "@MarieLataretu"
5468
maintainers:

modules/nf-core/lofreq/alnqual/tests/main.nf.test

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,12 @@ nextflow_process {
2626
}
2727

2828
then {
29+
assert process.success
2930
assertAll(
30-
{ assert process.success },
31-
{
32-
def bam = file(process.out.bam.get(0).get(1))
33-
assert bam.exists()
34-
},
35-
{ assert path(process.out.versions.get(0)).md5 == "d4c8b0faafccaeb9c47b25f73168f33c" }
31+
{ assert snapshot(
32+
bam(process.out.bam.get(0).get(1)).getReadsMD5(),
33+
sanitizeOutput(process.out, unstableKeys: ["bam"])
34+
).match() }
3635
)
3736
}
3837
}
@@ -56,13 +55,9 @@ nextflow_process {
5655
}
5756

5857
then {
58+
assert process.success
5959
assertAll(
60-
{ assert process.success },
61-
{
62-
def bam = file(process.out.bam.get(0).get(1))
63-
assert bam.exists()
64-
},
65-
{ assert path(process.out.versions.get(0)).md5 == "d4c8b0faafccaeb9c47b25f73168f33c" }
60+
{ assert snapshot(sanitizeOutput(process.out)).match() }
6661
)
6762
}
6863

modules/nf-core/lofreq/alnqual/tests/main.nf.test.snap

Lines changed: 20 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"sarscov2 - bam - stub": {
33
"content": [
44
{
5-
"0": [
5+
"bam": [
66
[
77
{
88
"id": "test",
@@ -11,62 +11,47 @@
1111
"test.bam:md5,d41d8cd98f00b204e9800998ecf8427e"
1212
]
1313
],
14-
"1": [
15-
"versions.yml:md5,d4c8b0faafccaeb9c47b25f73168f33c"
16-
],
17-
"bam": [
14+
"versions_lofreq": [
1815
[
19-
{
20-
"id": "test",
21-
"single_end": false
22-
},
23-
"test.bam:md5,d41d8cd98f00b204e9800998ecf8427e"
16+
"LOFREQ_ALNQUAL",
17+
"lofreq",
18+
"2.1.5"
2419
]
25-
],
26-
"versions": [
27-
"versions.yml:md5,d4c8b0faafccaeb9c47b25f73168f33c"
2820
]
2921
}
3022
],
23+
"timestamp": "2026-06-11T10:40:24.580268115",
3124
"meta": {
32-
"nf-test": "0.8.4",
33-
"nextflow": "23.04.1"
34-
},
35-
"timestamp": "2024-03-22T18:37:37.159511921"
25+
"nf-test": "0.9.5",
26+
"nextflow": "26.04.0"
27+
}
3628
},
3729
"sarscov2 - bam": {
3830
"content": [
31+
"762e859a3d0ed1553655cde77665c940",
3932
{
40-
"0": [
33+
"bam": [
4134
[
4235
{
4336
"id": "test",
4437
"single_end": false
4538
},
46-
"test.bam:md5,b2eb4141d22d19a58fcde122d425aaf4"
39+
"test.bam"
4740
]
4841
],
49-
"1": [
50-
"versions.yml:md5,d4c8b0faafccaeb9c47b25f73168f33c"
51-
],
52-
"bam": [
42+
"versions_lofreq": [
5343
[
54-
{
55-
"id": "test",
56-
"single_end": false
57-
},
58-
"test.bam:md5,b2eb4141d22d19a58fcde122d425aaf4"
44+
"LOFREQ_ALNQUAL",
45+
"lofreq",
46+
"2.1.5"
5947
]
60-
],
61-
"versions": [
62-
"versions.yml:md5,d4c8b0faafccaeb9c47b25f73168f33c"
6348
]
6449
}
6550
],
51+
"timestamp": "2026-06-11T10:40:18.235012368",
6652
"meta": {
67-
"nf-test": "0.8.4",
68-
"nextflow": "23.04.1"
69-
},
70-
"timestamp": "2024-03-22T18:44:09.287393991"
53+
"nf-test": "0.9.5",
54+
"nextflow": "26.04.0"
55+
}
7156
}
7257
}

modules/nf-core/lofreq/call/main.nf

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ process LOFREQ_CALL {
1313

1414
output:
1515
tuple val(meta), path("*.vcf.gz"), emit: vcf
16-
path "versions.yml" , emit: versions
16+
tuple val("${task.process}"), val('lofreq'), eval("lofreq version | sed -n '1s/^.* //p'"), emit: versions_lofreq, topic: versions
1717

1818
when:
1919
task.ext.when == null || task.ext.when
@@ -30,21 +30,11 @@ process LOFREQ_CALL {
3030
-f $fasta \\
3131
-o ${prefix}.vcf.gz \\
3232
$bam
33-
34-
cat <<-END_VERSIONS > versions.yml
35-
"${task.process}":
36-
lofreq: \$(echo \$(lofreq version 2>&1) | sed 's/^version: //; s/ *commit.*\$//')
37-
END_VERSIONS
3833
"""
3934

4035
stub:
4136
def prefix = task.ext.prefix ?: "${meta.id}"
4237
"""
43-
echo | gzip > ${prefix}.vcf.gz
44-
45-
cat <<-END_VERSIONS > versions.yml
46-
"${task.process}":
47-
lofreq: \$(echo \$(lofreq version 2>&1) | sed 's/^version: //; s/ *commit.*\$//')
48-
END_VERSIONS
38+
echo "" | gzip > ${prefix}.vcf.gz
4939
"""
5040
}

modules/nf-core/lofreq/call/meta.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,27 @@ output:
4646
description: VCF output file
4747
pattern: "*.{vcf}"
4848
ontologies: []
49+
versions_lofreq:
50+
- - ${task.process}:
51+
type: string
52+
description: Process which generated the version
53+
- lofreq:
54+
type: string
55+
description: Tool name
56+
- "lofreq version | sed -n '1s/^.* //p'":
57+
type: eval
58+
description: The expression to obtain the version of the tool
59+
topics:
4960
versions:
50-
- versions.yml:
51-
type: file
52-
description: File containing software versions
53-
pattern: "versions.yml"
54-
ontologies:
55-
- edam: http://edamontology.org/format_3750 # YAML
61+
- - ${task.process}:
62+
type: string
63+
description: Process which generated the version
64+
- lofreq:
65+
type: string
66+
description: Tool name
67+
- "lofreq version | sed -n '1s/^.* //p'":
68+
type: eval
69+
description: The expression to obtain the version of the tool
5670
authors:
5771
- "@bjohnnyd"
5872
maintainers:

modules/nf-core/lofreq/call/tests/main.nf.test

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ nextflow_process {
2727
}
2828

2929
then {
30+
assert process.success
3031
assertAll(
31-
{ assert process.success },
3232
{ assert snapshot(
3333
path(process.out.vcf[0][1]).vcf.summary,
34-
process.out.versions
34+
sanitizeOutput(process.out, unstableKeys: ["vcf"])
3535
).match()
3636
}
3737
)
@@ -59,7 +59,7 @@ nextflow_process {
5959
{ assert process.success },
6060
{ assert snapshot(
6161
path(process.out.vcf[0][1]).vcf.summary,
62-
process.out.versions
62+
sanitizeOutput(process.out, unstableKeys: ["vcf"])
6363
).match()
6464
}
6565
)
@@ -84,9 +84,9 @@ nextflow_process {
8484
}
8585

8686
then {
87+
assert process.success
8788
assertAll(
88-
{ assert process.success },
89-
{ assert snapshot(process.out).match() }
89+
{ assert snapshot(sanitizeOutput(process.out)).match() }
9090
)
9191
}
9292
}

0 commit comments

Comments
 (0)