Commit 8a6c6da6 authored by van den Berg's avatar van den Berg
Browse files

Only run FastQC on the trimmed file

parent c6cadb60
Pipeline #4077 failed with stages
in 26 minutes and 37 seconds
......@@ -270,25 +270,7 @@ rule genotype_gather:
"--output {output.vcf} --output-type z 2> {log} && "
"bcftools index --tbi --output-file {output.vcf_tbi} {output.vcf}"
rule fastqc_raw:
"""Run fastqc on raw fastq files"""
input:
r1 = lambda wc: config["samples"][wc.sample]["read_groups"][wc.read_group]["R1"],
r2 = lambda wc: config["samples"][wc.sample]["read_groups"][wc.read_group]["R2"]
output:
done = "{sample}/pre_process/raw-{sample}-{read_group}/.done"
log:
"log/{sample}/fastqc_raw.{read_group}.log"
container:
containers["fastqc"]
threads:
4
shell:
"fastqc --threads {threads} --nogroup -o $(dirname {output.done}) "
"{input.r1} {input.r2} 2> {log} && "
"touch {output.done}"
rule fastqc_postqc:
rule fastqc:
"""Run fastqc on fastq files post pre-processing"""
input:
r1 = rules.cutadapt.output.r1,
......@@ -296,7 +278,7 @@ rule fastqc_postqc:
output:
done = "{sample}/pre_process/trimmed-{sample}-{read_group}/.done"
log:
"log/{sample}/fastqc_postqc.{read_group}.log"
"log/{sample}/fastqc.{read_group}.log"
container:
containers["fastqc"]
threads:
......@@ -461,8 +443,7 @@ rule multiqc:
metric = expand("{s}/bams/{s}.metrics", s=config["samples"]),
alignment_metrics = expand("{s}/bams/{s}.alignment_summary_metrics", s=config["samples"]),
insert_metrics = expand("{s}/bams/{s}.insert_size_metrics", s=config["samples"]),
fastqc_raw = all_raw_fastqc,
fastqc_trim = all_trimmed_fastqc,
fastqc = all_trimmed_fastqc,
hs_metric = expand("{s}/bams/{s}.hs_metrics.txt", s=config["samples"]) if "baitsfile" in config else []
output:
html = "multiqc_report/multiqc_report.html",
......
......@@ -149,16 +149,8 @@ def sample_cutadapt_files(wildcards):
files.append(f'{sample_name}/pre_process/{sample_name}-{read_group}.txt')
return files
def all_raw_fastqc(wildcards):
""" Determine the raw fastq files for each sample """
fastq_files = list()
for sample in config['samples']:
for read_group in config['samples'][sample]['read_groups']:
fastq_files.append(f"{sample}/pre_process/raw-{sample}-{read_group}/.done")
return fastq_files
def all_trimmed_fastqc(wildcards):
""" Determine the raw fastq files for each sample """
""" Determine the trimmed fastq files for each sample """
fastq_files = list()
for sample in config['samples']:
for read_group in config['samples'][sample]['read_groups']:
......
......@@ -187,10 +187,6 @@
- path: micro/pre_process/trimmed-micro-lib_01/micro-lib_01_R2_fastqc.zip
- path: micro/pre_process/trimmed-micro-lib_02/micro-lib_02_R1_fastqc.zip
- path: micro/pre_process/trimmed-micro-lib_02/micro-lib_02_R2_fastqc.zip
- path: micro/pre_process/raw-micro-lib_01/micro_rg1_R1_fastqc.zip
- path: micro/pre_process/raw-micro-lib_01/micro_rg1_R2_fastqc.zip
- path: micro/pre_process/raw-micro-lib_02/micro_rg2_R1_fastqc.zip
- path: micro/pre_process/raw-micro-lib_02/micro_rg2_R2_fastqc.zip
- path: micro/pre_process/micro-lib_01.txt
- path: micro/pre_process/micro-lib_02.txt
- path: stats.tsv
......
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