diff --git a/workflow/Snakefile b/workflow/Snakefile index 71ec8e6..2ac6d7b 100644 --- a/workflow/Snakefile +++ b/workflow/Snakefile @@ -36,7 +36,7 @@ include: "rules/common.smk" ########################### -containerized: "docker://ftabaro/rna-seq:1.2" +containerized: "docker://ftabaro/rna-seq:1.3" ####################### @@ -133,6 +133,7 @@ init_folders = [ tables_folder, pictures_folder, notebooks_folder, + fastqc_raw_folder, ] diff --git a/workflow/rules/common.smk b/workflow/rules/common.smk index a61f0e2..764e11c 100644 --- a/workflow/rules/common.smk +++ b/workflow/rules/common.smk @@ -159,17 +159,18 @@ def get_fastq_paired(wildcards): def get_fastq(wildcards): - if wildcards.serie in library_names_single: - for p in raw_reads_folder.joinpath(wildcards.serie).iterdir(): - gd = parse_filepath(p) - if gd["sample"] == wildcards.sample: - return p - raise ValueError( - "Could not determine input files for serie: {}".format(wildcards.serie) + for p in raw_reads_folder.joinpath(wildcards.serie).iterdir(): + gd = parse_filepath(p) + s = gd["sample"] + if gd["mate"] != "": + s += gd["mate"] + if s == wildcards.sample: + return p + raise ValueError( + "Could not determine input files for serie: {}\nsample: {}\n{}".format( + wildcards.serie, wildcards.sample, gd ) - else: - ret = list(get_fastq_paired(wildcards).values()) - return ret + ) def mkdir(p: Path, verbose=False):