Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
binfpy
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
opensource
binfpy
Commits
6b05a37e
Commit
6b05a37e
authored
Jul 24, 2018
by
Mikael Boden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated_webservice.py_with_new_protocols_for_accessing_uniprot_and_GO
parent
eff5f374
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
111 additions
and
161 deletions
+111
-161
annotations.py
annotations.py
+17
-8
webservice.py
webservice.py
+94
-153
No files found.
annotations.py
View file @
6b05a37e
...
...
@@ -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
webservice.py
View file @
6b05a37e
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment