Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/bioinfodlsu/rice-pilaf into…
Browse files Browse the repository at this point in the history
… hot_fix
  • Loading branch information
memgonzales committed Sep 4, 2023
2 parents a32ab00 + 57024dd commit 57b6159
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions callbacks/homepage/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def display_specific_analysis_page(nav_className, analysis_nav_id, analysis_layo
Output('input-error', 'style'),
Output('homepage-is-submitted', 'data'),
Output('homepage-genomic-intervals-submitted-input', 'data'),
Output('homepage-genomic-intervals-saved-input', 'data', allow_duplicate=True),
State('homepage-genomic-intervals', 'value'),
Expand All @@ -73,7 +74,7 @@ def parse_input(nb_intervals_str, n_clicks, n_submit, dccStore_children, *_):
dccStore_children = get_cleared_dccStore_data_excluding_some_data(
dccStore_children)

return dccStore_children, None, {'display': 'none'}, False, ''
return dccStore_children, None, {'display': 'none'}, False, '', nb_intervals_str

if n_submit >= 1 or ('homepage-submit' == ctx.triggered_id and n_clicks >= 1):
if nb_intervals_str:
Expand All @@ -82,18 +83,18 @@ def parse_input(nb_intervals_str, n_clicks, n_submit, dccStore_children, *_):

if lift_over_util.is_error(intervals):
return dccStore_children, [f'Error encountered while parsing genomic interval {intervals[1]}', html.Br(), lift_over_util.get_error_message(intervals[0])], \
{'display': 'block'}, False, nb_intervals_str
{'display': 'block'}, False, nb_intervals_str, nb_intervals_str
else:
# clear data for items in dcc.Store found in session-container
dccStore_children = get_cleared_dccStore_data_excluding_some_data(
dccStore_children, 'homepage-genomic-intervals-saved-input')

browse_loci_util.write_igv_tracks_to_file(nb_intervals_str)

return dccStore_children, None, {'display': 'none'}, True, nb_intervals_str
return dccStore_children, None, {'display': 'none'}, True, nb_intervals_str, nb_intervals_str
else:
return dccStore_children, [f'Error: Input for genomic interval should not be empty.'], \
{'display': 'block'}, False, nb_intervals_str
{'display': 'block'}, False, nb_intervals_str, nb_intervals_str

raise PreventUpdate

Expand Down

0 comments on commit 57b6159

Please sign in to comment.