Commit d7b53dba authored by Valentina Galata's avatar Valentina Galata
Browse files

MultiQC: init set-up and incl fastqc

parent 5fd37079
#################################################################
# 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."
# report_comment: "For more information please see the sources listed below:"
report_header_info:
- IMP3 Docs: "https://imp3.readthedocs.io/en/impiris" # TODO
- MultiQC Docs: "https://multiqc.info/docs"
# TODO
# 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
zip_data_dir: true
data_dump_file: true
export_plots: false
plots_force_flat: false
plots_force_interactive: true
channels:
- bioconda
- conda-forge
- defaults
dependencies:
- _libgcc_mutex=0.1=conda_forge
- _openmp_mutex=4.5=1_llvm
- brotlipy=0.7.0=py36h8c4c3a4_1000
- ca-certificates=2020.4.5.1=hecc5488_0
- certifi=2020.4.5.1=py36h9f0ad1d_0
- cffi=1.14.0=py36hd463f26_0
- chardet=3.0.4=py36h9f0ad1d_1006
- click=7.1.2=pyh9f0ad1d_0
- coloredlogs=14.0=py36h9f0ad1d_1
- colormath=3.0.0=py_2
- cryptography=2.9.2=py36h45558ae_0
- cycler=0.10.0=py_2
- decorator=4.4.2=py_0
- freetype=2.10.2=he06d7ca_0
- future=0.18.2=py36h9f0ad1d_1
- humanfriendly=8.2=py36h9f0ad1d_0
- icu=58.2=hf484d3e_1000
- idna=2.9=py_1
- importlib-metadata=1.6.0=py36h9f0ad1d_0
- jinja2=2.11.2=pyh9f0ad1d_0
- kiwisolver=1.2.0=py36hdb11119_0
- ld_impl_linux-64=2.34=h53a641e_0
- libblas=3.8.0=16_openblas
- libcblas=3.8.0=16_openblas
- libffi=3.2.1=he1b5a44_1007
- libgcc-ng=9.2.0=h24d8f2e_2
- libgfortran-ng=7.5.0=hdf63c60_6
- liblapack=3.8.0=16_openblas
- libopenblas=0.3.9=h5ec1e0e_0
- libpng=1.6.37=hed695b0_1
- libstdcxx-ng=9.2.0=hdf63c60_2
- llvm-openmp=10.0.0=hc9558a2_0
- lzstring=1.0.4=py_1001
- markdown=3.2.2=py_0
- markupsafe=1.1.1=py36h8c4c3a4_1
- matplotlib-base=3.0.3=py36h5f35d83_1
- multiqc=1.8=py_2
- ncurses=6.1=hf484d3e_1002
- networkx=2.1=py36_0
- numpy=1.18.4=py36h7314795_0
- openssl=1.1.1g=h516909a_0
- pandoc=2.9.2.1=0
- pip=20.1.1=pyh9f0ad1d_0
- pycparser=2.20=py_0
- pyopenssl=19.1.0=py_1
- pyparsing=2.4.7=pyh9f0ad1d_0
- pysocks=1.7.1=py36h9f0ad1d_1
- python=3.6.10=h8356626_1011_cpython
- python-dateutil=2.8.1=py_0
- python_abi=3.6=1_cp36m
- pyyaml=5.3.1=py36h8c4c3a4_0
- readline=8.0=hf8c457e_0
- requests=2.23.0=pyh8c360ce_2
- setuptools=46.4.0=py36h9f0ad1d_0
- simplejson=3.17.0=py36h8c4c3a4_1
- six=1.14.0=py_1
- spectra=0.0.11=py_1
- sqlite=3.30.1=hcee41ef_0
- tk=8.6.10=hed695b0_0
- tornado=6.0.4=py36h8c4c3a4_1
- urllib3=1.25.9=py_0
- wheel=0.34.2=py_1
- xz=5.2.5=h516909a_0
- yaml=0.2.4=h516909a_0
- zipp=3.1.0=py_0
- zlib=1.2.11=h516909a_1006
# MultiQC summary report
from os.path import splitext
MQC_MODULES = []
# FastQC
if MG or MT:
MQC_MODULES.append("fastqc") # TODO
# data type: mg, mt or both
MQC_FASTQC_T = TYPES
# read type: PE or SE or both, raw and processed
MQC_FASTQC_R_RAW = ["r1", "r2"]
MQC_FASTQC_R_PROC = ["r1", "r2", "se"]
if not (MG and MT) and (len(MG) <= 1 or len(MT) <= 1):
MQC_FASTQC_R_RAW = ["se"]
MQC_FASTQC_R_PROC = ["se"]
else:
assert len(MG) == 2 and len(MT) == 2
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
rule multiqc_report:
input:
# FastQC
expand(
'Stats/{type}/{type}.{rtype}.zip',
type=MQC_FASTQC_T,
rtype=MQC_FASTQC_R
) if (MG or MT) else []
# TODO: other modules
output:
filelist=temp('Stats/multiqc_files.txt'),
html='Stats/multiqc_report.html',
data='Stats/multiqc_report_data.zip'
log:
"logs/multiqc.log"
threads: 1
params:
runtime = "00:30:00",
mem = MEMCORE,
configfile = CONFIGDIR + "/config.multiqc.yaml",
modules = 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}"
localrules: multiqc_done
rule multiqc_done:
input:
html='Stats/multiqc_report.html',
data='Stats/multiqc_report_data.zip'
output:
"status/multiqc.done"
threads: 1
message:
"MultiQC report has been created: {output}"
shell:
"touch {output}"
......@@ -72,6 +72,7 @@ validate(config,schema="../../../schemas/schema.imp.yaml")
SRCDIR = srcdir("../../scripts")
BINDIR = srcdir("../../bin")
ENVDIR = srcdir("../../envs")
CONFIGDIR = srcdir("../../../config")
# get parameters from the command line
# output
......
......@@ -45,6 +45,10 @@ if "vis" in SUM_STEPS:
output:
touch('status/visualization.done')
if "multiqc" in SUM_STEPS:
include:
'../../Summary/MultiQC.smk'
sum_target.append("status/multiqc.done")
# master command
rule SUMMARY:
......
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