cytoscape / cyjShiny

An R/shiny widget for cytoscape.js
Other
92 stars 28 forks source link

Do I have an option to load a JSON object directly to cyjShiny? #54

Closed gmhhope closed 1 year ago

gmhhope commented 1 year ago

Hi cyjShiny developers,

It is great to see that cytoscape file can now be rendered to Shiny app. I am so excited.

I used Networkx to get cytoscape-format JSON file and import them directly to cytoscape desktop. So do I have an option to directly load the JSON file in cyjShiny?

Here is one example file: test.json.zip

Thanks, Minghao

cannin commented 1 year ago

@gmhhope Does this example help? https://github.com/cytoscape/cyjShiny/blob/2103f1c3b23a355756e6c65a8a80c058da5091c7/inst/demos/fromCytoscapeDesktop/app.R#L177

gmhhope commented 1 year ago

Thanks very much @cannin! That works!

May I ask another questions:

(1) Do I have an option to export a style (in desktop) with a particular layout (nodes/edges being positioned using desktop) and then put into the Rshiny App? (2) I don't see the nodes/edges attributes in the Rshiny app. How to make it happen?

Any references and suggestions that get me oriented to the right places are greatly appreciated!

Thanks, Minghao Gong

cannin commented 1 year ago

The questions might be related. We need to go in parts. First question, have you tried:

Screenshot 2023-06-02 at 11 17 19 AM
gmhhope commented 1 year ago

Hmm, it looks like exporting the Cytoscape to NDEx is more straightforward in my case.

Is there any benefit to using cyjShiny instead of NDEx? No offense but just want to understand more before investing more time in either direction. Appreciate your prompt responses!

Thanks, Minghao Gong

cannin commented 1 year ago

@gmhhope Apologies for the delay. NDEx lets you show a network on the NDEx servers with the functionalities they provide. cyjShiny is if you would want to make interactive tools for yourself and collaborators that you want customized (e.g., perhaps cancer pathways and some analysis you developed): 1) application using R Shiny or 2) include interactive networks as R Markdown notebooks shared as HTML files.

gmhhope commented 1 year ago

Thanks for the comments!