Commit 6026fc1b authored by Valentina Galata's avatar Valentina Galata
Browse files

MultiQC: added prokka (added a new output in prokkaC.smk)

parent d7b53dba
#################################################################
############################################################
# MultiQC Config
#################################################################
############################################################
# Based on config_defaults.yaml from MultiQC (v1.8)
##############################
# Info
##############################
title: "IMP3 processing summary"
subtitle: "MultiQC report"
intro_text: "Please not that only the output of tools supported by MultiQC has been included in this report."
......@@ -11,14 +14,17 @@ intro_text: "Please not that only the output of tools supported by MultiQC has b
report_header_info:
- IMP3 Docs: "https://imp3.readthedocs.io/en/impiris" # TODO
- MultiQC Docs: "https://multiqc.info/docs"
# TODO
# TODO: would be nice to have here some sample info
# Logo
custom_logo: null # TODO
custom_logo_url: null # TODO
custom_logo_title: null # TODO
##############################
# Output
##############################
data_format: 'tsv'
force: true
make_data_dir: true
......@@ -27,3 +33,12 @@ data_dump_file: true
export_plots: false
plots_force_flat: false
plots_force_interactive: true
##############################
# Tools
##############################
# FastQC
# Prokka
prokka_fn_snames: true
......@@ -7,6 +7,7 @@ rule annotate:
"Analysis/annotation/prokka.fna",
"Analysis/annotation/prokka.ffn",
"Analysis/annotation/prokka.fsa",
"Analysis/annotation/prokka.txt"
threads: 8
params:
runtime = "8:00:00",
......
......@@ -6,7 +6,7 @@ MQC_MODULES = []
# FastQC
if MG or MT:
MQC_MODULES.append("fastqc") # TODO
MQC_MODULES.append("fastqc")
# data type: mg, mt or both
MQC_FASTQC_T = TYPES
# read type: PE or SE or both, raw and processed
......@@ -20,19 +20,23 @@ if MG or MT:
MQC_FASTQC_R = expand("{rtype}_fastqc", rtype=MQC_FASTQC_R_RAW)
if 'preprocessing' in IMP_STEPS:
MQC_FASTQC_R += expand("{rtype}.preprocessed_fastqc", rtype=MQC_FASTQC_R_PROC)
# TODO: other modules
# Prokka
if "analysis" in IMP_STEPS:
MQC_MODULES.append("prokka")
rule multiqc_report:
input:
# FastQC
expand(
fastqc=expand(
'Stats/{type}/{type}.{rtype}.zip',
type=MQC_FASTQC_T,
rtype=MQC_FASTQC_R
) if (MG or MT) else []
# TODO: other modules
) if (MG or MT) else [],
# Prokka
prokka=["Analysis/annotation/prokka.txt"] if "analysis" in IMP_STEPS else [],
output:
filelist=temp('Stats/multiqc_files.txt'),
include='Stats/multiqc_files.txt', # TODO: temp
exclude='Stats/multiqc_files_excluded.txt', # TODO: temp
html='Stats/multiqc_report.html',
data='Stats/multiqc_report_data.zip'
log:
......@@ -42,15 +46,28 @@ rule multiqc_report:
runtime = "00:30:00",
mem = MEMCORE,
configfile = CONFIGDIR + "/config.multiqc.yaml",
modules = MQC_MODULES,
modules = " ".join(["--module %s" % m for m in MQC_MODULES]),
filename = lambda wildcards, output: splitext(output.html)[0]
conda:
ENVDIR + "/MultiQC.yaml"
message:
"Create MultiQC report from {input}"
shell:
"echo '{input}' | sed 's/\s\+/\\n/g' > {output.filelist} && "
"multiqc --file-list {output.filelist} --module {params.modules} --config {params.configfile} --filename {params.filename} &> {log}"
"""
> {output.include}
> {output.exclude}
for file in {input.fastqc}
do
if [ -s ${{file}} ] && [ ! $(unzip -l -q ${{file}} | grep -q \"No errors\") ]
then
echo ${{file}} >> {output.include}
else
echo ${{file}} >> {output.exclude}
fi
done
echo '{input.prokka}' | sed 's/\s\+/\\n/g' >> {output.include}
multiqc --file-list {output.include} {params.modules} --config {params.configfile} --filename {params.filename} &> {log}
"""
localrules: multiqc_done
rule multiqc_done:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment