String spliceSiteColor = get(MUTATION_SPLICE_SITE_COLOR_KEY);
String synonymousColor = get(MUTATION_SYNONYMOUS_COLOR_KEY);
String targetedRegionColor = get(MUTATION_TARGETED_REGION_COLOR_KEY);
String unknownColor = get(MUTATION_UNKNOWN_COLOR_KEY);
PaletteColorTable colorTable = new PaletteColorTable();
if ((indelColor != null) && (missenseColor != null) && (nonsenseColor != null) &&
(spliceSiteColor != null) &&
(synonymousColor != null) &&
(targetedRegionColor != null) &&
(unknownColor != null)) {
Color color1 = ColorUtilities.stringToColor(indelColor);
colorTable.put("Indel", color1);
Color color2 = ColorUtilities.stringToColor(missenseColor);
colorTable.put("Missense", color2);
Color color3 = ColorUtilities.stringToColor(nonsenseColor);
colorTable.put("Nonsense", color3);
Color color4 = ColorUtilities.stringToColor(spliceSiteColor);
colorTable.put("Splice_site", color4);
Color color5 = ColorUtilities.stringToColor(synonymousColor);
colorTable.put("Synonymous", color5);
Color color6 = ColorUtilities.stringToColor(targetedRegionColor);
colorTable.put("Targeted_Region", color6);
Color color7 = ColorUtilities.stringToColor(unknownColor);
colorTable.put("Unknown", color7);
// Nicos extensions
String[] nicosCats = {"Truncating", "Non-coding_Transcript", "Other_AA_changing", "Other_likely_neutral"};
for (String cat : nicosCats) {
String key = "MUTATION_" + cat + "_COLOR";
colorTable.put(cat, ColorUtilities.stringToColor(get(key)));
}
}
return colorTable;
}