Commit b8934d0a authored by van den Berg's avatar van den Berg
Browse files

Add summary output for cutadapt

The cutadapt summary file contains statistics we want to report, such as
the number of reads and bases before and after trimming. This way, we do
not need to compute these statistics after the fact, which would require
parsing the large fastq files an additional time.
parent 8670b32a
......@@ -141,12 +141,14 @@ rule cutadapt:
r2=get_reverse
output:
r1 = "{sample}/pre_process/{sample}-{read_group}_R1.fastq.gz",
r2 = "{sample}/pre_process/{sample}-{read_group}_R2.fastq.gz"
r2 = "{sample}/pre_process/{sample}-{read_group}_R2.fastq.gz",
summary = "{sample}/pre_process/{sample}-{read_group}.txt"
singularity: containers["cutadapt"]
shell: "cutadapt -a AGATCGGAAGAG -A AGATCGGAAGAG "
"--minimum-length 1 --quality-cutoff=20,20 "
"--output {output.r1} --paired-output {output.r2} -Z "
"{input.r1} {input.r2}"
"{input.r1} {input.r2} "
"--report=minimal > {output.summary}"
rule align:
"""Align fastq files"""
......
......@@ -210,11 +210,6 @@
- "rror"
files:
- path: "micro/coverage/covstats.png"
- path: "micro/coverage/covstats.json"
contains:
- "\"frac_min_100x\": 0.97"
- "\"mean\": 137"
- "\"width_nonzero\": 16569"
- path: "stats.tsv"
- path: "micro/pre_process/trimmed-micro-lib_01/micro-lib_01_R1_fastqc.zip"
- path: "micro/pre_process/trimmed-micro-lib_01/micro-lib_01_R2_fastqc.zip"
......@@ -224,3 +219,19 @@
- 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/coverage/covstats.json"
contains:
- "\"frac_min_100x\": 0.97"
- "\"mean\": 137"
- "\"width_nonzero\": 16569"
- path: "micro/pre_process/micro-lib_01.txt"
contains:
- "status\tin_reads\tin_bp\ttoo_short\ttoo_long\ttoo_many_n\tout_reads\tw/adapters\tqualtrim_bp\tout_bp\tw/adapters2\tqualtrim2_bp\tout2_bp"
- "OK\t3860\t1137566\t0\t0\t0\t3860\t4\t375\t573198\t10\t727\t563218"
- path: "micro/pre_process/micro-lib_02.txt"
contains:
- "status\tin_reads\tin_bp\ttoo_short\ttoo_long\ttoo_many_n\tout_reads\tw/adapters\tqualtrim_bp\tout_bp\tw/adapters2\tqualtrim2_bp\tout2_bp"
- "OK\t3860\t1139177\t0\t0\t0\t3860\t3\t416\t572845\t14\t711\t565152"
Supports Markdown
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