Skip to content

Commit 4833d58

Browse files
committed
Update fastqc rule
1 parent c1a7032 commit 4833d58

1 file changed

Lines changed: 15 additions & 9 deletions

File tree

rules/fastqc4QC.smk

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
1-
1+
import os
2+
print(record_fastqpath)
23
rule fastqc4QC:
4+
# input:
5+
# log_prep_fq = rules.prep_fastq_folder.output.log
36
params:
4-
prefix = "{sample}",
5-
prefix2 = filterFastq4nopipe,
6-
fastqc_outdir = "QC/Sample_{sample}/fastqc_outdir"
7+
fastqc_outdir = os.path.join(analysis, "QC/Sample_{sample}/fastqc_outdir"),
8+
fastq_path = lambda wildcards: record_fastqpath[wildcards.sample],
79
output:
8-
"QC/Sample_{sample}/fastqc_outdir/fastqc.log"
10+
os.path.join(analysis, "QC/Sample_{sample}/fastqc_outdir/fastqc.log")
911
container:
1012
program.fastqc
1113
threads: 8 # could be overwritten by the config file
1214
shell:
1315
"""
14-
# find all the fastq files in the sample directory and perform fastqc on them
15-
fastq_files=$(find {params.prefix} -name "*.fastq.gz")
16-
fastqc --threads {threads} --outdir={params.fastqc_outdir} $fastq_files >{output} 2>&1
17-
"""
16+
mkdir -p {params.fastqc_outdir}
17+
echo "Running FastQC in the folder of: "
18+
pwd
19+
fastq_files=$(find {params.fastq_path} -name "*.fastq.gz" -or -name "*.fq.gz")
20+
fastqc --threads {threads} \
21+
--outdir={params.fastqc_outdir} \
22+
$fastq_files >{output} 2>&1
23+
"""

0 commit comments

Comments
 (0)