From a8b0bec30f17d387fd49603fd6d2a597f6b00063 Mon Sep 17 00:00:00 2001 From: ticlla <monicaroxana.ticllaccenhua@unibas.ch> Date: Mon, 10 Jun 2019 16:17:34 +0200 Subject: [PATCH] rename rule multiqc_raw_listing_files, set message for rule fastqc_raw and change directory to store ourput of rule multiqc_raw_list_files --- rules/rawQC.smk | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/rules/rawQC.smk b/rules/rawQC.smk index 0f1997c..b835d0f 100644 --- a/rules/rawQC.smk +++ b/rules/rawQC.smk @@ -5,7 +5,7 @@ Description: rules for QC and pre-processing of paired-end shotgun DNA metagenomic sequencing. ''' localrules: - multiqc_raw_listing_files, + multiqc_raw_list_files, multiqc_raw ##---------------------------------------------------------------------------## @@ -33,22 +33,24 @@ rule fastqc_raw: fastqc_zip = RAW_QC_DIR+'/{dataset}_fastqc/{fastq_file}_fastqc.zip' threads: cpus_avail singularity: singularity_img + message: + "Executing FatQC on {input} with {threads} threads and using {params.samplerate} times total reads." shell: ''' - # Take a random sample of reads (1%) and process them with fastQC + # Take a random sample of reads and process them with fastQC (reformat.sh in={input} out=stdout.fq samplerate={params.samplerate} | \ fastqc -o {params.fastqc_dir}/{wildcards.dataset}_fastqc -f fastq \ -t {threads} stdin:{wildcards.fastq_file}) 2> {log} ''' # List files for MultiQC -rule multiqc_raw_listing_files: +rule multiqc_raw_list_files: input: - #all fastqc zip files in a dataset + #all fastqc zip files per dataset fastqcs=lambda wildcards: ['{}/{}_fastqc/{}_fastqc.zip'.format(RAW_QC_DIR, value, FASTQS[ix]) for ix,value in enumerate(DATASETSX) if value==wildcards.dataset] output: - multiqc_input_list = RAW_QC_DIR+'/{dataset}_multiqc_inputs.txt' + multiqc_input_list = RAW_QC_REPORT+'/{dataset}_multiqc_inputs.txt' run: import os try: @@ -59,10 +61,11 @@ rule multiqc_raw_listing_files: with open(output.multiqc_input_list, mode='w', encoding='utf-8') as out: for item in input.fastqcs: out.write("%s\n" % item) -# + +# Run MultiQC on all FastQC eports rule multiqc_raw: input: - RAW_QC_DIR+'/{dataset}_multiqc_inputs.txt' + RAW_QC_REPORT + '/{dataset}_multiqc_inputs.txt' output: multiqc_report = report(RAW_QC_REPORT + '/{dataset}_multiqc.html', category='rawQC') -- GitLab