ismms-himc / clustergrammer2

"Dimensionality-increasing" data visualization tool and interactive WebGL Jupyter widget built for single-cell data.
https://clustergrammer.readthedocs.io/case_studies.html
MIT License
116 stars 20 forks source link

how to use clustergrammer2 with "dash" for my web app #124

Open jessielyons opened 1 year ago

jessielyons commented 1 year ago

Hello,

I am quite lost on how to use clustergrammer2 with "dash". I really want to show a heatmap in my app and appreciate your feedback asap.

My current clustergrammer2 code which works.

num_rows = 71 n1 = Network(CGM2)

n1.load_df(np.log2(df_allgrp_fill_transposed), meta_col=df_allgrp_fill_meta, col_cats=col_cats) n1.set_global_cat_colors(df_colors) n1.filter_N_top(axis='row', N_top=num_rows, rank_type='var') n1.set_manual_category(col='Tissue', preferred_cats=df_colors) n1.widget()

Thanks so much!

jessielyons commented 1 year ago

Hey, anyone any response? So I can atleast create a .json file. But how do I read this json file via dash to build a dashboard?

Please help :)

cornhundred commented 1 year ago

Hi, I haven't used Dash but I can try to look into it.

jessielyons commented 1 year ago

Hi @cornhundred ,

Thanks and look forward to your help. Alternatively, do you have a script available on how to display the .json file perhaps into a website for this heatmap or an .html file? Thanks again!

cornhundred commented 1 year ago

Yes, @jessielyons this ObservableHQ collection has several examples of how the visualization can be embedded into a JavaScript application https://observablehq.com/collection/@cornhundred/clustergrammer-gl Let me know if you have any questions