Validation on number of inputs added
This commit is contained in:
@@ -65,7 +65,7 @@ class LoadAnnotationsFunction(workflow.Function):
|
||||
logger.log('notice', 'Reading file: %s' % dialog.get_filename())
|
||||
self.load_file(dialog.get_filename())
|
||||
|
||||
def run(self, data):
|
||||
def run(self):
|
||||
btns = ('Open', gtk.RESPONSE_OK, \
|
||||
'Cancel', gtk.RESPONSE_CANCEL)
|
||||
dialog = gtk.FileChooserDialog('Open GO Annotation File',
|
||||
@@ -81,7 +81,7 @@ class GODistanceFunction(workflow.Function):
|
||||
workflow.Function.__init__(self, 'go_diatance', 'GO Distances')
|
||||
self.output = None
|
||||
|
||||
def run(self, (data,)):
|
||||
def run(self, data):
|
||||
logger.log('debug', 'datatype: %s' % type(data))
|
||||
if not type(data) == Annotations:
|
||||
return None
|
||||
@@ -98,7 +98,7 @@ class TestDataFunction(workflow.Function):
|
||||
def __init__(self):
|
||||
workflow.Function.__init__(self, 'test_data', 'Generate Test Data')
|
||||
|
||||
def run(self, data):
|
||||
def run(self):
|
||||
logger.log('notice', 'Injecting foo test data')
|
||||
x = randn(20,30)
|
||||
X = dataset.Dataset(x)
|
||||
@@ -108,7 +108,7 @@ class DatasetLog(workflow.Function):
|
||||
def __init__(self):
|
||||
workflow.Function.__init__(self, 'log', 'Log')
|
||||
|
||||
def run(self, (data,)):
|
||||
def run(self, data):
|
||||
logger.log('notice', 'Taking the log of dataset %s' % data.get_name())
|
||||
d = data.asarray()
|
||||
d = log(d)
|
||||
@@ -121,7 +121,7 @@ class DatasetLoadFunction(workflow.Function):
|
||||
def __init__(self):
|
||||
workflow.Function.__init__(self, 'load_data', 'Load Pickled Dataset')
|
||||
|
||||
def run(self, data):
|
||||
def run(self):
|
||||
chooser = gtk.FileChooserDialog(title="Select cel files...", parent=None,
|
||||
action=gtk.FILE_CHOOSER_ACTION_OPEN,
|
||||
buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
|
||||
@@ -147,7 +147,7 @@ class DatasetSaveFunction(workflow.Function):
|
||||
def __init__(self):
|
||||
workflow.Function.__init__(self, 'save_data', 'Save Pickled Dataset')
|
||||
|
||||
def run(self, data):
|
||||
def run(self):
|
||||
if not data:
|
||||
logger.log("notice", "No data to save.")
|
||||
return
|
||||
@@ -180,7 +180,7 @@ class CelFileImportFunction(workflow.Function):
|
||||
def __init__(self):
|
||||
workflow.Function.__init__(self, 'cel_import', 'Import Affy')
|
||||
|
||||
def run(self, (data,)):
|
||||
def run(self, data):
|
||||
import rpy
|
||||
chooser = gtk.FileChooserDialog(title="Select cel files...", parent=None,
|
||||
action=gtk.FILE_CHOOSER_ACTION_OPEN,
|
||||
@@ -229,7 +229,7 @@ class PCAFunction(workflow.Function):
|
||||
workflow.Function.__init__(self, 'pca', 'PCA')
|
||||
self._workflow = wf
|
||||
|
||||
def run(self, (data,)):
|
||||
def run(self, data):
|
||||
import rpy
|
||||
|
||||
dim_2, dim_1 = data.get_dim_names()
|
||||
|
Reference in New Issue
Block a user