Skip to content

Commit

Permalink
Add display node data in coexpression
Browse files Browse the repository at this point in the history
  • Loading branch information
pbong committed Sep 8, 2023
1 parent f6f91e8 commit 3560448
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 13 additions & 1 deletion callbacks/coexpression/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
from ..lift_over import util as lift_over_util
from ..branch import *

import json

Input_parameter_module = namedtuple('Input_parameter_module', [
'param_slider_marks', 'param_slider_value'])

Expand Down Expand Up @@ -532,8 +534,18 @@ def download_coexpression_table_to_csv(download_n_clicks, coexpression_df, genom
State('coexpression-module-graph', 'elements'),
State('homepage-genomic-intervals-submitted-input', 'data')
)
def download_coexpression_table_to_csv(download_n_clicks, coexpression_dict, genomic_intervals):
def download_coexpression_graph_to_csv(download_n_clicks, coexpression_dict, genomic_intervals):
if download_n_clicks >= 1:
return dict(content='Hello world!', filename=f'[{genomic_intervals}] Co-Expression Network Analysis Graph.txt')

raise PreventUpdate

@app.callback(
Output('coexpression-module-graph-node-data', 'children'),
Input('coexpression-module-graph', 'tapNodeData')
)
def display_node_data(node_data):
if node_data:
return json.dumps(node_data)

raise PreventUpdate
2 changes: 2 additions & 0 deletions pages/analysis/co_expr.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,8 @@
]
),

html.Div(id='coexpression-module-graph-node-data'),

dcc.Loading([
cyto.Cytoscape(
id='coexpression-module-graph',
Expand Down

0 comments on commit 3560448

Please sign in to comment.