Commit 6b05a37e authored by Mikael Boden's avatar Mikael Boden

updated_webservice.py_with_new_protocols_for_accessing_uniprot_and_GO

parent eff5f374
......@@ -7,7 +7,7 @@ matplotlib_colours={'aliceblue':'#F0F8FF','aqua':'#00FFFF','aquamarine':'#7FFFD4
twenty_colours ={'dodgerblue':'#1E90FF', 'orangered':'#FF4500', 'greenyellow':'#ADFF2F', 'orchid':'#DA70D6'}
symbols = ["*", "^", "!", "#", "~", "+", ":", "<", ">", "@", "%", "=", "-"]
symbols = ["*", "^", "!", "#", "~", "+", ":", "<", ">", "@", "%", "=", "-", "a", "b", "c", "d", "e" "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "aa", "bb", "cc", "dd", "ee", "ff", "gg", "hh", "ii", "jj", "kk", "ll", "mm", "nn", "oo", "pp", "qq", "rr", "ss", "tt", "uu", "vv", "ww", "xx", "yy", "zz"]
class NexusAnnotations():
"""
......@@ -59,6 +59,10 @@ class NexusAnnotations():
if annot not in self.annotation_symbols:
symbol = self.generate_annotation_symbol(annot)
self.add_annotation_symbol(annot, symbol)
else:
symbol = self.generate_annotation_symbol(annot)
self.add_annotation_symbol(annot, symbol)
# Add in a symbol to represent this annotation if one doesn't already exist
......@@ -113,6 +117,8 @@ class NexusAnnotations():
symbol = random.choice(self.symbol_list)
if symbol not in self.annotation_symbols.values():
return symbol
else:
return symbol
i+=1
def add_annotation_symbol(self, symbol, annotation):
......@@ -127,13 +133,16 @@ class NexusAnnotations():
:return: A unique colour
"""
i = 0
while i < len(self.colour_dict.values()):
colour = random.choice(list(self.colour_dict.values()))
if colour not in self.used_colours:
return colour
i+=1
# i = 0
# while i < len(self.colour_dict.values()):
# colour = random.choice(list(self.colour_dict.values()))
# if colour not in self.used_colours:
# return colour
# else:
# return colour
# i+=1
colour = random.choice(list(self.colour_dict.values()))
return colour
def generate_colour_list(self, num):
return num
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment