コード例 #1
0
#!/usr/bin/env python

from cubes.input_cubes import Test 
from cubes.compute_cubes import ParallelFastROCSRanking, AccumulateRankings
from cubes.output_cubes import TextRankingOutputCube
from floe.api import WorkFloe, CubeGroup
from floe.api import OEMolIStreamCube
from floe.api import OEMolOStreamCube, FileOutputCube

# Declare Floe, add metadata for UI
job = WorkFloe('FastROCS Test Floe')
job.classification=[['Test']]
job.tags=[['yippee ki yay mf']]
job.title='test FastROCS Server'
job.description = """
Read a molecule query and return the FastROCS Server Results
"""
input_cube = Test('input')

request_cube = ParallelFastROCSRanking('request_cube')
request_cube.promote_parameter('url', promoted_name='url')
accu_cube = AccumulateRankings('accu')
accu_cube.promote_parameter('url', promoted_name='url')

output_cube = TextRankingOutputCube('results_output')
output_cube.promote_parameter('name', promoted_name='name')

job.add_cubes(input_cube, request_cube, accu_cube, output_cube)

input_cube.success.connect(request_cube.data_input)
コード例 #2
0
#!/usr/bin/env python

from cubes.compute_cubes import IndexGenerator, CreateTestData, PingServer
from cubes.input_cubes import IndexInputCube
from cubes.output_cubes import IndexOutputCube, ResultsOutputCube, PlotResults
from floe.api import WorkFloe, CubeGroup
from floe.api import OEMolOStreamCube
from floe.api import OEMolIStreamCube

# Declare Floe, add metadata for UI
job = WorkFloe('Test Floe')
job.classification = [['Test']]
job.tags = [['yippee ki yay mf']]
job.title = 'test output'
job.description = """
Read an index text file ping a server and write outputs in several format
"""
input_cube = IndexInputCube('text_input')
#input_cube.promote_parameter('data_in', promoted_name='Input')

create_test_data = CreateTestData('create test data')
ping_server = PingServer('ping server')

#index_generator = IndexGenerator('index generator')
results_output = ResultsOutputCube('results output in csv')
results_output.promote_parameter('name', promoted_name='Output')
plot_results = PlotResults('plot results in svg')
plot_results.promote_parameter('name', promoted_name='Output')

index_output = IndexOutputCube('index output')
index_output.promote_parameter('name', promoted_name='Output')