Skip to content

Commit

Permalink
add get_fastqc_files. corrects single vs paired
Browse files Browse the repository at this point in the history
  • Loading branch information
alsmith151 committed Mar 21, 2024
1 parent 3e387a3 commit 42cbce5
Showing 1 changed file with 32 additions and 7 deletions.
39 changes: 32 additions & 7 deletions seqnado/workflow/rules/qc.smk
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,44 @@ use rule samtools_stats as samtools_stats_filtered with:
output:
stats="seqnado_output/qc/alignment_filtered/{sample}.txt",


rule multiqc:
input:
expand(
def get_fastqc_files(wildcards):


single_end_assays = [name for name in SAMPLE_NAMES if DESIGN.query(name).is_paired == True]
paired_end_assays = [name for name in SAMPLE_NAMES if DESIGN.query(name).is_paired == False]

fastqc_raw_paired = expand(
"seqnado_output/qc/fastqc_raw/{sample}_{read}_fastqc.html",
sample=SAMPLE_NAMES,
sample=paired_end_assays,
read=[1, 2],
),
expand(
fastqc_trimmed_paired = expand(
"seqnado_output/qc/fastqc_trimmed/{sample}_{read}_fastqc.html",
sample=SAMPLE_NAMES,
sample=paired_end_assays,
read=[1, 2],
),

fastqc_raw_single = expand(
"seqnado_output/qc/fastqc_raw/{sample}_fastqc.html",
sample=single_end_assays,
),

fastqc_trimmed_single = expand(
"seqnado_output/qc/fastqc_trimmed/{sample}_fastqc.html",
sample=single_end_assays,
),

all_qc_files = []
for files in [fastqc_raw_paired, fastqc_trimmed_paired, fastqc_raw_single, fastqc_trimmed_single]:
if files:
all_qc_files.extend(files)

return all_qc_files


rule multiqc:
input:
get_fastqc_files,
expand("seqnado_output/qc/alignment_raw/{sample}.txt", sample=SAMPLE_NAMES),
expand(
"seqnado_output/qc/alignment_filtered/{sample}.txt",
Expand Down

0 comments on commit 42cbce5

Please sign in to comment.