Skip to content

Commit e7def47

Browse files
Multiqc2topics (#9271)
* update multiqc to use topics for versions * update nf-test and snapshots * update meta.yml * update main.nf.test after review * removed and re-generated main.nf.test.snap after changes * Fixing remarks * Fix failing linting tests --------- Co-authored-by: Marcel Ribeiro-Dantas <[email protected]>
1 parent c7274a8 commit e7def47

File tree

4 files changed

+71
-46
lines changed

4 files changed

+71
-46
lines changed

modules/nf-core/multiqc/main.nf

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ process MULTIQC {
1515
path(sample_names)
1616

1717
output:
18-
path "*multiqc_report.html", emit: report
19-
path "*_data" , emit: data
20-
path "*_plots" , optional:true, emit: plots
21-
path "versions.yml" , emit: versions
18+
path "*multiqc_report.html" , emit: report
19+
path "*_data" , emit: data
20+
path "*_plots" , optional:true , emit: plots
21+
tuple val("${task.process}"), val('multiqc'), eval('multiqc --version | sed "s/.* //g"'), topic: versions, emit: versions_multiqc
2222

2323
when:
2424
task.ext.when == null || task.ext.when
@@ -42,11 +42,6 @@ process MULTIQC {
4242
$replace \\
4343
$samples \\
4444
.
45-
46-
cat <<-END_VERSIONS > versions.yml
47-
"${task.process}":
48-
multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" )
49-
END_VERSIONS
5045
"""
5146

5247
stub:
@@ -55,9 +50,5 @@ process MULTIQC {
5550
mkdir multiqc_plots
5651
touch multiqc_report.html
5752
58-
cat <<-END_VERSIONS > versions.yml
59-
"${task.process}":
60-
multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" )
61-
END_VERSIONS
6253
"""
6354
}

modules/nf-core/multiqc/meta.yml

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: multiqc
2-
description: Aggregate results from bioinformatics analyses across many samples into
3-
a single report
2+
description: Aggregate results from bioinformatics analyses across many samples
3+
into a single report
44
keywords:
55
- QC
66
- bioinformatics tools
@@ -28,8 +28,8 @@ input:
2828
- edam: http://edamontology.org/format_3750 # YAML
2929
- extra_multiqc_config:
3030
type: file
31-
description: Second optional config yml for MultiQC. Will override common sections
32-
in multiqc_config.
31+
description: Second optional config yml for MultiQC. Will override common
32+
sections in multiqc_config.
3333
pattern: "*.{yml,yaml}"
3434
ontologies:
3535
- edam: http://edamontology.org/format_3750 # YAML
@@ -73,13 +73,27 @@ output:
7373
description: Plots created by MultiQC
7474
pattern: "*_data"
7575
ontologies: []
76-
versions:
77-
- versions.yml:
78-
type: file
79-
description: File containing software versions
80-
pattern: "versions.yml"
81-
ontologies:
82-
- edam: http://edamontology.org/format_3750 # YAML
76+
versions_multiqc:
77+
- - ${task.process}:
78+
type: string
79+
description: The process the versions were collected from
80+
- multiqc:
81+
type: string
82+
description: The tool name
83+
- multiqc --version | sed "s/.* //g:
84+
type: string
85+
description: The command used to generate the version of the tool
86+
topics:
87+
- versions:
88+
- - process:
89+
type: string
90+
description: The process the versions were collected from
91+
- tool:
92+
type: string
93+
description: The tool name
94+
- version:
95+
type: string
96+
description: The version of the tool
8397
authors:
8498
- "@abhi18av"
8599
- "@bunop"

modules/nf-core/multiqc/tests/main.nf.test

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ nextflow_process {
3030
{ assert process.success },
3131
{ assert process.out.report[0] ==~ ".*/multiqc_report.html" },
3232
{ assert process.out.data[0] ==~ ".*/multiqc_data" },
33-
{ assert snapshot(process.out.versions).match("multiqc_versions_single") }
33+
{ assert snapshot(process.out.findAll { key, val -> key.startsWith("versions")}).match() }
3434
)
3535
}
3636

@@ -56,7 +56,7 @@ nextflow_process {
5656
{ assert process.success },
5757
{ assert process.out.report[0] ==~ ".*/multiqc_report.html" },
5858
{ assert process.out.data[0] ==~ ".*/multiqc_data" },
59-
{ assert snapshot(process.out.versions).match("multiqc_versions_config") }
59+
{ assert snapshot(process.out.findAll { key, val -> key.startsWith("versions")}).match() }
6060
)
6161
}
6262
}
@@ -84,7 +84,7 @@ nextflow_process {
8484
{ assert snapshot(process.out.report.collect { file(it).getName() } +
8585
process.out.data.collect { file(it).getName() } +
8686
process.out.plots.collect { file(it).getName() } +
87-
process.out.versions ).match("multiqc_stub") }
87+
process.out.findAll { key, val -> key.startsWith("versions")} ).match() }
8888
)
8989
}
9090

Lines changed: 39 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,61 @@
11
{
2-
"multiqc_versions_single": {
2+
"sarscov2 single-end [fastqc]": {
33
"content": [
4-
[
5-
"versions.yml:md5,737bb2c7cad54ffc2ec020791dc48b8f"
6-
]
4+
{
5+
"versions_multiqc": [
6+
[
7+
"MULTIQC",
8+
"multiqc",
9+
"1.32"
10+
]
11+
]
12+
}
713
],
814
"meta": {
9-
"nf-test": "0.9.3",
10-
"nextflow": "24.10.4"
15+
"nf-test": "0.9.2",
16+
"nextflow": "25.04.6"
1117
},
12-
"timestamp": "2025-10-27T13:33:24.356715"
18+
"timestamp": "2025-10-28T15:27:59.813370216"
1319
},
14-
"multiqc_stub": {
20+
"sarscov2 single-end [fastqc] - stub": {
1521
"content": [
1622
[
1723
"multiqc_report.html",
1824
"multiqc_data",
1925
"multiqc_plots",
20-
"versions.yml:md5,737bb2c7cad54ffc2ec020791dc48b8f"
26+
{
27+
"versions_multiqc": [
28+
[
29+
"MULTIQC",
30+
"multiqc",
31+
"1.32"
32+
]
33+
]
34+
}
2135
]
2236
],
2337
"meta": {
24-
"nf-test": "0.9.3",
25-
"nextflow": "24.10.4"
38+
"nf-test": "0.9.2",
39+
"nextflow": "25.04.6"
2640
},
27-
"timestamp": "2025-10-27T13:34:11.103619"
41+
"timestamp": "2025-10-28T15:30:48.963962021"
2842
},
29-
"multiqc_versions_config": {
43+
"sarscov2 single-end [fastqc] [config]": {
3044
"content": [
31-
[
32-
"versions.yml:md5,737bb2c7cad54ffc2ec020791dc48b8f"
33-
]
45+
{
46+
"versions_multiqc": [
47+
[
48+
"MULTIQC",
49+
"multiqc",
50+
"1.32"
51+
]
52+
]
53+
}
3454
],
3555
"meta": {
36-
"nf-test": "0.9.3",
37-
"nextflow": "24.10.4"
56+
"nf-test": "0.9.2",
57+
"nextflow": "25.04.6"
3858
},
39-
"timestamp": "2025-10-27T13:34:04.615233"
59+
"timestamp": "2025-10-28T15:29:30.664969334"
4060
}
4161
}

0 commit comments

Comments
 (0)