diff --git a/workflow/snakemake_rules/common.smk b/workflow/snakemake_rules/common.smk index ba550598a..8f2a4b6b9 100644 --- a/workflow/snakemake_rules/common.smk +++ b/workflow/snakemake_rules/common.smk @@ -169,10 +169,15 @@ def _get_metadata_by_wildcards(wildcards): return _get_metadata_by_build_name(wildcards.build_name) def _get_clade_recency_for_wildcards(wildcards): + # check if builds.yaml contains colors:{build_name}:clade_recency if wildcards.build_name in config["colors"] and 'clade_recency' in config["colors"][wildcards.build_name]: return config["colors"][wildcards.build_name]["clade_recency"] + # check if builds.yaml or parameters.yaml contains colors:clade_recency + elif "colors" in config and "clade_recency" in config["colors"]: + return config["colors"]["clade_recency"] + # else return sensible default value else: - return config["colors"]["default"]["clade_recency"] + return "" def _get_trait_columns_by_wildcards(wildcards): if wildcards.build_name in config["traits"]: