* system/fluents.py: Fixed a bug where the the application tried to load
a toolbar from None * system/plots.py: Fixed MainView.insert_view that was a no-op when in large view. * system/dataset.py: Changed __str__ of dataset to also show names of dimensions.
This commit is contained in:
parent
aca9a47f56
commit
87f87e36c8
|
@ -1,4 +1,3 @@
|
|||
from system import logger
|
||||
from scipy import atleast_2d,asarray,ArrayType
|
||||
|
||||
|
||||
|
@ -55,7 +54,6 @@ class Dataset:
|
|||
self.shape = array.shape
|
||||
if shape != None:
|
||||
if self.shape!=shape:
|
||||
#logger.log("debug","Dataset and input shape mismatch")
|
||||
raise ValueError, "Differing in array and provided. %s != %s" % (self.shape, shape)
|
||||
if identifiers!=None:
|
||||
self._set_identifiers(identifiers,all_dims)
|
||||
|
@ -71,8 +69,8 @@ class Dataset:
|
|||
|
||||
self._all_dims = all_dims
|
||||
|
||||
def __str__self(self):
|
||||
return self._name
|
||||
def __str__(self):
|
||||
return self._name + ":" + self._dims.__str__()
|
||||
|
||||
def __iter__(self):
|
||||
"""Returns an iterator over dimensions of dataset."""
|
||||
|
@ -193,7 +191,6 @@ class Dataset:
|
|||
reverse[value] = key
|
||||
return [self._map[dim][key] for key in idents]
|
||||
|
||||
|
||||
class CategoryDataset(Dataset):
|
||||
"""The category dataset class.
|
||||
|
||||
|
@ -247,3 +244,4 @@ class Selection:
|
|||
"""Handles selected identifiers along each dimension of a dataset"""
|
||||
def __init__(self):
|
||||
self.current_selection={}
|
||||
|
||||
|
|
|
@ -97,8 +97,12 @@ class FluentApp:
|
|||
window = self.widget_tree.get_widget('plot_toolbar_dock')
|
||||
if self._plot_toolbar:
|
||||
window.remove(self._plot_toolbar)
|
||||
|
||||
self._plot_toolbar = view.get_toolbar()
|
||||
|
||||
if view:
|
||||
self._plot_toolbar = view.get_toolbar()
|
||||
else:
|
||||
self._plot_toolbar = None
|
||||
|
||||
if self._plot_toolbar:
|
||||
window.add(self._plot_toolbar)
|
||||
|
||||
|
@ -127,6 +131,8 @@ class FluentApp:
|
|||
return self.navigator_view
|
||||
|
||||
# Event handlers.
|
||||
# These methods are called by the gtk framework in response to events and
|
||||
# should not be called directly.
|
||||
|
||||
def on_single_view(self, *ignored):
|
||||
self['main_view'].goto_large()
|
||||
|
|
|
@ -207,7 +207,10 @@ class MainView (gtk.Notebook):
|
|||
self.set_current_page(0)
|
||||
|
||||
def insert_view(self, view):
|
||||
vf = self.get_active_small_view()
|
||||
if self.get_current_page() == 0:
|
||||
vf = self.get_active_small_view()
|
||||
else:
|
||||
vf = self._large_view
|
||||
vf.set_view(view)
|
||||
|
||||
def show(self):
|
||||
|
|
|
@ -5,11 +5,11 @@ from system import dataset, logger, plots, workflow
|
|||
from scipy import array,randn,log
|
||||
import cPickle
|
||||
|
||||
class GOWorkflow (workflow.Workflow):
|
||||
class TestWorkflow (workflow.Workflow):
|
||||
|
||||
name = 'Gene Ontology Workflow'
|
||||
ident = 'go'
|
||||
description = 'Gene Ontology Workflow. This workflow currently serves as a general testing workflow.'
|
||||
name = 'Test Workflow'
|
||||
ident = 'test'
|
||||
description = 'Test Gene Ontology Workflow. This workflow currently serves as a general testing workflow.'
|
||||
|
||||
def __init__(self, app):
|
||||
workflow.Workflow.__init__(self, app)
|
||||
|
@ -102,7 +102,8 @@ class TestDataFunction(workflow.Function):
|
|||
logger.log('notice', 'Injecting foo test data')
|
||||
x = randn(20,30)
|
||||
X = dataset.Dataset(x)
|
||||
return [X, plots.SinePlot()]
|
||||
p = plots.ScatterPlot(X, X, 'rows', 'rows', '0_1', '0_2')
|
||||
return [X, plots.SinePlot(), p]
|
||||
|
||||
class DatasetLog(workflow.Function):
|
||||
def __init__(self):
|
Reference in New Issue