Skip to content

Commit

Permalink
Specify which MultiQC modules to run
Browse files Browse the repository at this point in the history
This is as a (temporary) workaround for a bug in MultiQC, see
#37
  • Loading branch information
Redmar-van-den-Berg committed Nov 21, 2024
1 parent 4b7ec31 commit 0fc8b1c
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ rule multiqc:
params:
filelist="multiqc_filelist.txt",
depth=2,
modules=multiqc_modules(),
output:
html="multiqc_hamlet.html",
log:
Expand All @@ -234,5 +235,6 @@ rule multiqc:
--fn_as_s_name \
--file-list {params.filelist} \
--config {input.config} \
{params.modules} \
--filename {output.html} 2> {log}
"""
6 changes: 6 additions & 0 deletions common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,9 @@ containers = {

# The version of HAMLET
PIPELINE_VERSION = "v2.2.1-dev"


def multiqc_modules():
"""Define which MultiQC modules to run here"""
modules = ["cutadapt", "sequali", "star", "picard", "vep"]
return [f" --module {module}" for module in modules]
2 changes: 2 additions & 0 deletions includes/qc-seq/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ rule multiqc:
params:
filelist="multiqc_filelist.txt",
depth=2,
modules=multiqc_modules(),
output:
html="multiqc_qc_seq.html",
log:
Expand All @@ -97,5 +98,6 @@ rule multiqc:
--fn_as_s_name \
--file-list {params.filelist} \
--config {input.config} \
{params.modules} \
--filename {output.html} 2> {log}
"""
6 changes: 6 additions & 0 deletions includes/qc-seq/common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ def multiqc_files():
return cutadapt + sequali


def multiqc_modules():
"""Define which MultiQC modules to run here"""
modules = ["cutadapt", "sequali"]
return [f" --module {module}" for module in modules]


module_output = SimpleNamespace(
forward=get_forward_output,
reverse=get_reverse_output,
Expand Down
2 changes: 2 additions & 0 deletions includes/snv-indels/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ rule multiqc:
params:
filelist="multiqc_filelist.txt",
depth=2,
modules=multiqc_modules(),
output:
html="multiqc_snv_indels.html",
log:
Expand All @@ -462,5 +463,6 @@ rule multiqc:
--fn_as_s_name \
--file-list {params.filelist} \
--config {input.config} \
{params.modules} \
--filename {output.html} 2> {log}
"""
6 changes: 6 additions & 0 deletions includes/snv-indels/common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ def multiqc_files():
return star_count + star_log + picard_stats + vep_stats


def multiqc_modules():
"""Define which MultiQC modules to run here"""
modules = ["star", "picard", "vep"]
return [f" --module {module}" for module in modules]


module_output = SimpleNamespace(
bam=get_bam_output,
bai=get_bai_output,
Expand Down
1 change: 0 additions & 1 deletion test/test_expression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@
tags:
- functional
- expression
- current
command: >
snakemake
--snakefile includes/expression/Snakefile
Expand Down
2 changes: 2 additions & 0 deletions test/test_hamlet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@
- "SRR8615409\tfuzzy-end\t1"
- path: "multiqc_hamlet.html"
contains:
- "Cutadapt"
- "Sequali"
- "VEP"
- "STAR"
- "Picard"
Expand Down
4 changes: 4 additions & 0 deletions test/test_qc_seq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@
- "qc-seq"
# Sequali sample names must be renamed
- "TestSample1-R1.fq.gz_TestSample1-R2.fq.gz"
# The MultiQC report must contain all relevant sections
contains:
- "Cutadapt"
- "Sequali"
- path: TestSample1/qc-seq/sequali/TestSample1.json
- path: TestSample1/qc-seq/sequali/TestSample1.html

Expand Down

0 comments on commit 0fc8b1c

Please sign in to comment.