From 2229e8f7db7b6821f949faa6cf32f081610c6149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draic=20Corcoran?= Date: Wed, 26 Jun 2024 15:55:06 +0200 Subject: [PATCH 1/2] fix: change config get This will cause a clearer keyerror to be thrown if str_panels is not found under reference in the config. --- workflow/rules/common.smk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflow/rules/common.smk b/workflow/rules/common.smk index 04628b6..de65735 100644 --- a/workflow/rules/common.smk +++ b/workflow/rules/common.smk @@ -295,7 +295,7 @@ def compile_output_list(wildcards): for barcode in set([u.barcode for u in units.loc[(sample, unit_type)].dropna().itertuples()]) for lane in set([u.lane for u in units.loc[(sample, unit_type)].dropna().itertuples()]) for str_panel in [ - panel_list.split(".")[0] for panel_list in config.get("reference", {}).get("str_panels", "") + panel_list.split(".")[0] for panel_list in config["reference"]["str_panels"] ] ] ) From 5392c1897c3649c234ea90b350c6483614825b38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draic=20Corcoran?= Date: Wed, 26 Jun 2024 15:58:58 +0200 Subject: [PATCH 2/2] style: Update common.smk --- workflow/rules/common.smk | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/workflow/rules/common.smk b/workflow/rules/common.smk index de65735..d3865bb 100644 --- a/workflow/rules/common.smk +++ b/workflow/rules/common.smk @@ -294,9 +294,7 @@ def compile_output_list(wildcards): for flowcell in set([u.flowcell for u in units.loc[(sample, unit_type)].dropna().itertuples()]) for barcode in set([u.barcode for u in units.loc[(sample, unit_type)].dropna().itertuples()]) for lane in set([u.lane for u in units.loc[(sample, unit_type)].dropna().itertuples()]) - for str_panel in [ - panel_list.split(".")[0] for panel_list in config["reference"]["str_panels"] - ] + for str_panel in [panel_list.split(".")[0] for panel_list in config["reference"]["str_panels"]] ] )