Commit 158d2d7f authored by Akdel's avatar Akdel
Browse files

demo site eta

parent b88ce14b
......@@ -376,17 +376,16 @@ def get_estimated_time(pdb_entries):
return func((l, n), 9.14726052e-06) / 60
@app.callback([dash.dependencies.Output("time-estimate", "children"),
dash.dependencies.Output("alignment-done", "children")],
@app.callback([dash.dependencies.Output("time-estimate", "children")],
[dash.dependencies.Input("align", "n_clicks")],
[dash.dependencies.State("structure-selection", "value")])
def get_time_estimate(clicked, pdb_entries):
if clicked and pdb_entries:
pdb_entries = [decompress_object(x) for x in pdb_entries]
time = get_estimated_time(pdb_entries)
return f"ETA: {np.round(time, 2)} min", [False]
return f"ETA: {np.round(time, 2)} min"
else:
return "", [False]
return ""
@app.callback(dash.dependencies.Output("is-it-done", "children"),
......@@ -408,13 +407,14 @@ def is_it_done(done):
dash.dependencies.Output("pfam-class", "children"),
dash.dependencies.Output("alignment-done", "children")],
[dash.dependencies.Input("align", "n_clicks")],
[dash.dependencies.Input("align", "n_clicks"),
dash.dependencies.Input("is-it-done", "children")],
[dash.dependencies.State("structure-selection", "value"),
dash.dependencies.State("pfam-class", "children"),
dash.dependencies.State("gap-open", "value"),
dash.dependencies.State("gap-extend", "value")])
def align_structures(clicked, pdb_entries, pfam_class, gap_open, gap_extend):
def align_structures(clicked, done, pdb_entries, pfam_class, gap_open, gap_extend):
if clicked and pdb_entries and pfam_class:
pfam_class = decompress_object(pfam_class)
pdb_entries = [decompress_object(x) for x in pdb_entries]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment