Skip to content
Snippets Groups Projects
Commit a8b0bec3 authored by Ticlla Ccenhua Monica Roxana's avatar Ticlla Ccenhua Monica Roxana
Browse files

rename rule multiqc_raw_listing_files, set message for rule fastqc_raw and...

rename rule multiqc_raw_listing_files, set message for rule fastqc_raw and change directory to store ourput of rule multiqc_raw_list_files
parent f6d69c9c
Branches
No related tags found
No related merge requests found
......@@ -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')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment