コード例 #1
0
homedir = os.getcwd()

tool_title = widgets.Label(r'\(\textbf{pc4cancerimmune}\)')
if nanoHUB_flag or hublib_flag:
    # define this, but don't use (yet)
    remote_cb = widgets.Checkbox(
        indent=False,
        value=False,
        description='Submit as Batch Job to Clusters/Grid')

    top_row = widgets.HBox(children=[read_config, tool_title])
    gui = widgets.VBox(children=[top_row, tabs, run_button.w])
else:  # missing hublib (e.g. Windows desktop)
    gui_height = '900px'
    gui_layout = widgets.Layout(
        width='auto',
        height=gui_height,
        overflow_y='scroll',
    )
    top_row = widgets.HBox(children=[tool_title])
    gui = widgets.VBox(children=[top_row, tabs, run_button], layout=gui_layout)

fill_gui_params(read_config.options['DEFAULT'])

# pass in (relative) directory where output data is located
output_dir = "tmpdir"
svg.update(output_dir)
sub.update_dropdown_fields("data")
sub.update(output_dir)
コード例 #2
0
#    s.run(run_name, "--local ../bin/pc-nb config.xml")
#    os.system("../cancer_biorobots ../config/PhysiCell_settings.xml &")
# cmd_str = "./myproj " + full_xml_filename + " &"
# os.system(cmd_str)

run_button = widgets.Button(
    #    description='Run',
    description='Write',
    button_style='success',  # 'success', 'info', 'warning', 'danger' or ''
    tooltip='Run simulation',
)
run_button.on_click(run_button_cb)

#titles = ['Basics', 'Substrates', 'Custom', 'Cell Plots', 'Substrate Plots']
titles = ['Basics', 'User Params', 'Cell Plots', 'Substrate Plots']
#tabs = widgets.Tab(children=[config_tab.tab, cells.tab, custom.tab, svg.tab, sub.tab],
tabs = widgets.Tab(children=[config_tab.tab, user_tab.tab, svg.tab, sub.tab],
                   _titles={i: t
                            for i, t in enumerate(titles)},
                   layout=tab_layout)

#gui = widgets.VBox(children=[read_config, tabs, write_config_row, run_button.w])
gui = widgets.VBox(children=[tabs, run_button])
#fill_gui_params(read_config.options['DEFAULT'])
#fill_gui_params("../config/PhysiCell_settings.xml")
fill_gui_params(full_xml_filename)

#svg.update(read_config.value)
svg.update("output")
sub.update("output")