From 78fd4d4a89a02fc5233a1f5bbdfd3946ec08f3b7 Mon Sep 17 00:00:00 2001 From: zsloan Date: Thu, 26 Nov 2020 16:06:59 -0600 Subject: Changed the way the chromosome colors for the "color by chr" manhattan plot option are stored to using a list comprehension on a list of the just the hex strings --- .../marker_regression/display_mapping_results.py | 32 ++++------------------ 1 file changed, 6 insertions(+), 26 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/marker_regression/display_mapping_results.py b/wqflask/wqflask/marker_regression/display_mapping_results.py index 87910401..08c2d750 100644 --- a/wqflask/wqflask/marker_regression/display_mapping_results.py +++ b/wqflask/wqflask/marker_regression/display_mapping_results.py @@ -75,32 +75,12 @@ MEDIUMPURPLE = ImageColor.getrgb("mediumpurple") # ---- END: Define common colours ---- # # ZS: List of distinct colors for manhattan plot if user selects "varied" -DISTINCT_COLOR_LIST = [ - ImageColor.getrgb("#FF0000"), - ImageColor.getrgb("#00FF00"), - ImageColor.getrgb("#0000FF"), - ImageColor.getrgb("#FFFF00"), - ImageColor.getrgb("#FF00FF"), - ImageColor.getrgb("#00FFFF"), - ImageColor.getrgb("#000000"), - ImageColor.getrgb("#800000"), - ImageColor.getrgb("#008000"), - ImageColor.getrgb("#000080"), - ImageColor.getrgb("#808000"), - ImageColor.getrgb("#800080"), - ImageColor.getrgb("#008080"), - ImageColor.getrgb("#808080"), - ImageColor.getrgb("#C00000"), - ImageColor.getrgb("#00C000"), - ImageColor.getrgb("#0000C0"), - ImageColor.getrgb("#C0C000"), - ImageColor.getrgb("#C000C0"), - ImageColor.getrgb("#00C0C0"), - ImageColor.getrgb("#C0C0C0"), - ImageColor.getrgb("#400000"), - ImageColor.getrgb("#004000"), - ImageColor.getrgb("#000040"), -] +COLOR_CODES = ["#FF0000", "#00FF00", "#0000FF", "#FFFF00", "#FF00FF", "#00FFFF", + "#000000", "#800000", "#008000", "#000080", "#808000", "#800080", + "#008080", "#808080", "#C00000", "#00C000", "#0000C0", "#C0C000", + "#C000C0", "#00C0C0", "#C0C0C0", "#400000", "#004000", "#000040"] + +DISTINCT_COLOR_LIST = [ImageColor.getrgb(color) for color in COLOR_CODES] # ---- FONT FILES ---- # VERDANA_FILE = "./wqflask/static/fonts/verdana.ttf" -- cgit v1.2.3