From 94f4b276b9e842b4ccee11fceb53e0c7edeadbfe Mon Sep 17 00:00:00 2001 From: einarr Date: Thu, 2 Aug 2007 11:20:30 +0000 Subject: [PATCH] Fixed selection in DAG-plot to work both with and without IC set. --- workflows/gobrowser.py | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/workflows/gobrowser.py b/workflows/gobrowser.py index e716b9d..40a7bc6 100644 --- a/workflows/gobrowser.py +++ b/workflows/gobrowser.py @@ -633,17 +633,17 @@ class DagPlot(plots.Plot): def _add_ic_spin_buttons(self): """Adds spin buttons to the toolbar for selecting minimum and maximum threshold values on information content.""" - sb_min = gtk.SpinButton() + sb_min = gtk.SpinButton(digits=2) sb_min.set_range(0, 100) - sb_min.set_value(1) - sb_min.set_increments(1, 3) + sb_min.set_value(0) + sb_min.set_increments(.1, 1.) sb_min.connect('value-changed', self._on_ic_value_changed) self._ic_sb_min = sb_min - sb_max = gtk.SpinButton() + sb_max = gtk.SpinButton(digits=2) sb_max.set_range(0, 100) sb_max.set_value(1) - sb_max.set_increments(1, 3) + sb_max.set_increments(.1, 1.) sb_max.connect('value-changed', self._on_ic_value_changed) self._ic_sb_max = sb_max @@ -694,7 +694,7 @@ class DagPlot(plots.Plot): icnodes = ic.existing_identifiers('go-terms', self.nodes) icindices = ic.get_indices('go-terms', icnodes) a = ravel(ic.asarray()[icindices]) - ic_good = set(array(icnodes)[(a>ic_min) & (a=ic_min) & (a<=ic_max)]) sizes = zeros(len(self.nodes)) visible = set() @@ -728,7 +728,10 @@ class DagPlot(plots.Plot): assert y1<=y2 index = nonzero((xdata>x1) & (xdatay1) & (ydata