Skip to content

Commit

Permalink
remove duplicate usage of threshold value
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronWatters committed May 18, 2016
1 parent 9c75e64 commit 39213ca
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions jp_gene_viz/dNetwork.py
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,6 @@ def expand_click(self, b, incoming=True, outgoing=True, crosslink=True):
if not self.loaded():
self.info_area.value = "Cannot expand: no graph loaded."
return
threshhold = self.threshhold_slider.value
dG = self.display_graph
ew = self.data_graph.edge_weights
dew = dG.edge_weights.copy()
Expand All @@ -677,9 +676,6 @@ def expand_click(self, b, incoming=True, outgoing=True, crosslink=True):
for e in ew:
# observe threshhold
w = ew[e]
if threshhold > 0:
if abs(w) < threshhold:
continue
if not e in dew:
(f, t) = e
addit = False
Expand All @@ -699,8 +695,6 @@ def expand_click(self, b, incoming=True, outgoing=True, crosslink=True):
if f in nodes and t in nodes:
w = ew[e]
# observe threshhold
if threshhold > 0 and abs(w) < threshhold:
continue
dG.add_edge(f, t, w)
# position new nodes
P = self.data_positions
Expand All @@ -709,6 +703,7 @@ def expand_click(self, b, incoming=True, outgoing=True, crosslink=True):
if n not in dP and n in P:
dP[n] = P[n]
self.set_node_weights()
self.do_threshhold()
self.svg.empty()
self.draw()

Expand Down

0 comments on commit 39213ca

Please sign in to comment.