Skip to content

Commit

Permalink
Add warning about invalid setting combination for trimming
Browse files Browse the repository at this point in the history
  • Loading branch information
lczech committed Oct 11, 2024
1 parent d961775 commit 4fc3386
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion workflow/rules/qc-fastq.smk
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@ elif config["params"]["fastqc"]["input"] == "trimmed":
trimmed = get_trimmed_reads(wc)

# Now let's see if we have merged them or not, and add to our result accordingly.
if config["settings"]["merge-paired-end-reads"]:
if config["settings"]["trimming-tool"] == "none":
raise Exception(
"Invalid setting for fastqc: Selected 'settings: trimming-tool: \"none\"' "
+ "in combination with 'params: fastqc: input: \"trimmed\"'."
)
elif config["settings"]["merge-paired-end-reads"]:
assert len(trimmed) == 1
add_fastqc_file(smp.sample, smp.unit, "trimmed-merged", trimmed[0])
else:
Expand Down
2 changes: 1 addition & 1 deletion workflow/rules/trimming-none.smk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

def get_trimmed_reads(wildcards):
# Simply forward the files to their original fastq files.
return get_fastq(wildcards).values()
return list(get_fastq(wildcards).values())


def get_trimming_report(sample, unit):
Expand Down

0 comments on commit 4fc3386

Please sign in to comment.