Snakefile "ymp/rules/fastqc.rules"
Env(name="fastqc", base="bioconda", packages=["fastqc"])
with Stage("qc_fastqc") as S:
S.doc("""
Quality screen reads using FastQC
>>> ymp make toy.qc_fastqc
""")
rule qc_fastqc:
"""Run FastQC on read files"""
message:
"{:name:}: Creating QC report for {input}"
input:
"{:prev:}/{:target:}.{:pairnames:}.fq.gz"
output:
"{:this:}/{target}.{:pairnames:}_fastqc.html",
"{:this:}/{target}.{:pairnames:}_fastqc.zip"
log:
"{:this:}/{target}_fastqc.log"
benchmark:
"benchmarks/{:name:}/{:this:}/{target}.txt"
threads:
2 # fastqc cannot use more than 1 thread per file
params:
k=7,
resources:
mem = "4g",
conda:
"fastqc"
shell: """
fastqc \
-t {threads} \
-o $(dirname {output[0]}) \
{input} \
-k {params.k} \
>{log} 2>&1
"""