Added ImagePlot, which displays a dataset as an image.
This commit is contained in:
@@ -29,6 +29,7 @@ class TestWorkflow (workflow.Workflow):
|
||||
|
||||
go = workflow.Stage('go', 'Gene Ontology Data')
|
||||
go.add_function(GODistanceFunction())
|
||||
go.add_function(ImagePlotFunction())
|
||||
self.add_stage(go)
|
||||
|
||||
regression = workflow.Stage('regression', 'Regression')
|
||||
@@ -97,6 +98,14 @@ class GODistanceFunction(workflow.Function):
|
||||
return gene_distances
|
||||
|
||||
|
||||
class ImagePlotFunction(workflow.Function):
|
||||
def __init__(self):
|
||||
workflow.Function.__init__(self, 'image', 'Show Image')
|
||||
|
||||
def run(self, data):
|
||||
return [plots.ImagePlot(data, name='foo')]
|
||||
|
||||
|
||||
class TestDataFunction(workflow.Function):
|
||||
def __init__(self):
|
||||
workflow.Function.__init__(self, 'test_data', 'Generate Test Data')
|
||||
|
Reference in New Issue
Block a user