allow build specific colours & config
@@ -566,6 +566,12 @@ def export_title(wildcards):
# TODO: maybe we could replace this with a config entry for full/human-readable build name?
location_name = wildcards.build_name
+ if "auspice_config" in config["builds"][location_name]:
+ from augur.utils import read_config
+ auspice_config = read_config(config["builds"][location_name]["auspice_config"])
+ if 'title' in auspice_config and auspice_config['title']:
+ return auspice_config['title']
+
if not location_name:
return "Genomic epidemiology of novel coronavirus"
elif location_name == "global":
@@ -599,7 +605,7 @@ rule export:
metadata = _get_metadata_by_wildcards,
node_data = _get_node_data_by_wildcards,
auspice_config = config["files"]["auspice_config"],
- colors = lambda w: config["files"]["colors"] if "colors" in config["files"] else rules.colors.output.colors.format(**w),
+ colors = lambda w: config["builds"][w.build_name]["colors"] if "colors" in config["builds"][w.build_name] else ( config["files"]["colors"] if "colors" in config["files"] else rules.colors.output.colors.format(**w) ),
lat_longs = config["files"]["lat_longs"],
description = config["files"]["description"]
output:
