Skip to content

Commit 69b109b

Browse files
authored
Merge branch 'master' into updategatk3
2 parents 32b914c + edc1b3b commit 69b109b

File tree

5 files changed

+403
-0
lines changed

5 files changed

+403
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+
# renovate: datasource=conda depName=bioconda/multiqc
8+
- bioconda::multiqc=1.33
9+
# renovate: datasource=conda depName=bioconda/multiqc_sav
10+
- bioconda::multiqc_sav=0.2.0
11+
- pip=25.3
12+
- pip:
13+
- interop==1.9.0
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
process MULTIQC_SAV {
2+
label 'process_single'
3+
4+
conda "${moduleDir}/environment.yml"
5+
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
6+
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/36/3634362a0bf5a0530a6459bdba392622262d6de6cc0062e9a293bacc3098b323/data' :
7+
'community.wave.seqera.io/library/multiqc_multiqc_sav_pip_interop:b142653b3920c82b' }"
8+
9+
input:
10+
tuple val(meta), path(runinfo_xml), path(interop_bin, stageAs: "InterOp/*")
11+
path(extra_multiqc_files, stageAs: "?/*")
12+
path(multiqc_config)
13+
path(extra_multiqc_config)
14+
path(multiqc_logo)
15+
path(replace_names)
16+
path(sample_names)
17+
18+
output:
19+
tuple val(meta), path("*.html") , emit: report
20+
tuple val(meta), path("*_data") , emit: data
21+
tuple val(meta), path("*_plots"), emit: plots, optional:true
22+
tuple val("${task.process}"), val('multiqc') , eval('multiqc --version | sed "s/.* //g"') , emit: versions
23+
tuple val("${task.process}"), val('multiqc_sav'), eval('python -c "import multiqc_sav; print(multiqc_sav.__version__)"'), emit: versions_multiqc_sav
24+
tuple val("${task.process}"), val('interop') , eval('python -c "import interop; print(interop.__version__)"') , emit: versions_interop
25+
// MultiQC should not push its versions to the `versions` topic. Its input depends on the versions topic to be resolved thus outputting to the topic will let the pipeline hang forever
26+
27+
when:
28+
task.ext.when == null || task.ext.when
29+
30+
script:
31+
def args = task.ext.args ?: ''
32+
def prefix = task.ext.prefix ? "--filename ${task.ext.prefix}.html" : ''
33+
def config = multiqc_config ? "--config ${multiqc_config}" : ''
34+
def extra_config = extra_multiqc_config ? "--config ${extra_multiqc_config}" : ''
35+
def logo = multiqc_logo ? "--cl-config 'custom_logo: \"${multiqc_logo}\"'" : ''
36+
def replace = replace_names ? "--replace-names ${replace_names}" : ''
37+
def samples = sample_names ? "--sample-names ${sample_names}" : ''
38+
"""
39+
multiqc \\
40+
--force \\
41+
${args} \\
42+
${config} \\
43+
${prefix} \\
44+
${extra_config} \\
45+
${logo} \\
46+
${replace} \\
47+
${samples} \\
48+
.
49+
"""
50+
51+
stub:
52+
"""
53+
mkdir multiqc_data
54+
touch multiqc_data/.stub
55+
mkdir multiqc_plots
56+
touch multiqc_report.html
57+
"""
58+
}
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
name: multiqc_sav
2+
description: Aggregate results from bioinformatics analyses across many samples
3+
into a single report, with support for multiqc_sav plugin
4+
keywords:
5+
- QC
6+
- bioinformatics tools
7+
- Beautiful stand-alone HTML report
8+
- Illumina
9+
- Sequencing Analysis Viewer
10+
- SAV
11+
tools:
12+
- multiqc:
13+
description: |
14+
MultiQC searches a given directory for analysis logs and compiles a HTML report.
15+
It's a general use tool, perfect for summarising the output from numerous bioinformatics tools.
16+
homepage: https://multiqc.info/
17+
documentation: https://multiqc.info/docs/
18+
licence: ["GPL-3.0-or-later"]
19+
identifier: biotools:multiqc
20+
input:
21+
- - meta:
22+
type: map
23+
description: |
24+
Groovy Map containing sample information
25+
e.g. [ id:'sample1', single_end:false ]
26+
- runinfo_xml:
27+
type: file
28+
description: Illumina RunInfo.xml file
29+
pattern: "RunInfo.xml"
30+
ontologies:
31+
- edam: http://edamontology.org/format_2332 # XML format
32+
- interop_bin:
33+
type: file
34+
description: Illumina InterOp binary files
35+
pattern: "InterOp/*.bin"
36+
ontologies:
37+
- edam: http://edamontology.org/format_2333 # Binary format
38+
- extra_multiqc_files:
39+
type: file
40+
description: |
41+
List of reports / files rec ognised by MultiQC, for example the html and zip output of FastQC
42+
ontologies: []
43+
- multiqc_config:
44+
type: file
45+
description: Optional config yml for MultiQC
46+
pattern: "*.{yml,yaml}"
47+
ontologies:
48+
- edam: http://edamontology.org/format_3750 # YAML
49+
- extra_multiqc_config:
50+
type: file
51+
description: Second optional config yml for MultiQC. Will override common
52+
sections in multiqc_config.
53+
pattern: "*.{yml,yaml}"
54+
ontologies:
55+
- edam: http://edamontology.org/format_3750 # YAML
56+
- multiqc_logo:
57+
type: file
58+
description: Optional logo file for MultiQC
59+
pattern: "*.{png}"
60+
ontologies: []
61+
- replace_names:
62+
type: file
63+
description: |
64+
Optional two-column sample renaming file. First column a set of
65+
patterns, second column a set of corresponding replacements. Passed via
66+
MultiQC's `--replace-names` option.
67+
pattern: "*.{tsv}"
68+
ontologies:
69+
- edam: http://edamontology.org/format_3475 # TSV
70+
- sample_names:
71+
type: file
72+
description: |
73+
Optional TSV file with headers, passed to the MultiQC --sample_names
74+
argument.
75+
pattern: "*.{tsv}"
76+
ontologies:
77+
- edam: http://edamontology.org/format_3475 # TSV
78+
output:
79+
report:
80+
- - meta:
81+
type: map
82+
description: |
83+
Groovy Map containing sample information
84+
e.g. [ id:'sample1', single_end:false ]
85+
- "*.html":
86+
type: file
87+
description: MultiQC report file
88+
pattern: ".html"
89+
ontologies: []
90+
data:
91+
- - meta:
92+
type: map
93+
description: |
94+
Groovy Map containing sample information
95+
e.g. [ id:'sample1', single_end:false ]
96+
- "*_data":
97+
type: directory
98+
description: MultiQC data dir
99+
pattern: "multiqc_data"
100+
plots:
101+
- - meta:
102+
type: map
103+
description: |
104+
Groovy Map containing sample information
105+
e.g. [ id:'sample1', single_end:false ]
106+
- "*_plots":
107+
type: file
108+
description: Plots created by MultiQC
109+
pattern: "*_data"
110+
ontologies: []
111+
versions:
112+
- - ${task.process}:
113+
type: string
114+
description: The process the versions were collected from
115+
- multiqc:
116+
type: string
117+
description: The tool name
118+
- multiqc --version | sed "s/.* //g":
119+
type: eval
120+
description: The expression to obtain the version of the tool
121+
versions_multiqc_sav:
122+
- - ${task.process}:
123+
type: string
124+
description: The process the versions were collected from
125+
- multiqc_sav:
126+
type: string
127+
description: The tool name
128+
- python -c "import multiqc_sav; print(multiqc_sav.__version__)":
129+
type: eval
130+
description: The expression to obtain the version of the tool
131+
versions_interop:
132+
- - ${task.process}:
133+
type: string
134+
description: The process the versions were collected from
135+
- interop:
136+
type: string
137+
description: The tool name
138+
- python -c "import interop; print(interop.__version__)":
139+
type: eval
140+
description: The expression to obtain the version of the tool
141+
authors:
142+
- "@matthdsm"
143+
- "@delfiterradas"
144+
maintainers:
145+
- "@matthdsm"
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
nextflow_process {
2+
3+
name "Test Process MULTIQC_SAV"
4+
script "../main.nf"
5+
process "MULTIQC_SAV"
6+
7+
tag "modules"
8+
tag "modules_nfcore"
9+
tag "untar"
10+
tag "multiqc_sav"
11+
12+
test("NovaSeq6000") {
13+
setup {
14+
run("UNTAR") {
15+
script "../../untar/main.nf"
16+
process {
17+
"""
18+
input[0] = [[ id: 'NovaSeq6000' ],file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bcl/200624_A00834_0183_BHMTFYDRXX.tar.gz', checkIfExists: true)]
19+
"""
20+
}
21+
}
22+
}
23+
24+
when {
25+
process {
26+
"""
27+
ch_sav_in = UNTAR.out.untar.map{ meta, untar ->
28+
def xml = []
29+
untar.eachFileRecurse { file ->
30+
if (file.fileName.toString() == 'RunInfo.xml') {
31+
xml << file
32+
}
33+
}
34+
35+
def interop = []
36+
untar.eachFileRecurse { file ->
37+
if (file.parent.name == 'InterOp' && file.fileName.toString().endsWith(".bin")) {
38+
interop << file
39+
}
40+
}
41+
return [meta, xml, interop]
42+
}
43+
44+
input[0] = ch_sav_in
45+
input[1] = []
46+
input[2] = []
47+
input[3] = []
48+
input[4] = []
49+
input[5] = []
50+
input[6] = []
51+
"""
52+
}
53+
}
54+
55+
then {
56+
assertAll(
57+
{ assert process.success },
58+
{ assert process.out.report[0][1] ==~ ".*/multiqc_report.html" },
59+
{ assert process.out.data[0][1] ==~ ".*/multiqc_data" },
60+
{ assert snapshot(process.out.findAll { key, val -> key.startsWith("versions")}).match() }
61+
)
62+
}
63+
64+
}
65+
66+
test("NovaSeq6000 - stub") {
67+
68+
options "-stub"
69+
70+
setup {
71+
run("UNTAR") {
72+
script "../../untar/main.nf"
73+
process {
74+
"""
75+
input[0] = [[ id: 'NovaSeq6000' ],file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bcl/200624_A00834_0183_BHMTFYDRXX.tar.gz', checkIfExists: true)]
76+
"""
77+
}
78+
}
79+
}
80+
81+
when {
82+
process {
83+
"""
84+
ch_sav_in = UNTAR.out.untar.map{ meta, untar ->
85+
def xml = []
86+
untar.eachFileRecurse { file ->
87+
if (file.fileName.toString() == 'RunInfo.xml') {
88+
xml << file
89+
}
90+
}
91+
92+
def interop = []
93+
untar.eachFileRecurse { file ->
94+
if (file.parent.name == 'InterOp' && file.fileName.toString().endsWith(".bin")) {
95+
interop << file
96+
}
97+
}
98+
return [meta, xml, interop]
99+
}
100+
101+
input[0] = ch_sav_in
102+
input[1] = []
103+
input[2] = []
104+
input[3] = []
105+
input[4] = []
106+
input[5] = []
107+
input[6] = []
108+
"""
109+
}
110+
}
111+
112+
then {
113+
assertAll(
114+
{ assert process.success },
115+
{ assert process.out.report[0][1] ==~ ".*/multiqc_report.html" },
116+
{ assert process.out.data[0][1] ==~ ".*/multiqc_data" },
117+
{ assert snapshot(process.out.findAll { key, val -> key.startsWith("versions")}).match() }
118+
)
119+
}
120+
}
121+
}

0 commit comments

Comments
 (0)