rich-iannone / DiagrammeR

Graph and network visualization using tabular data in R
https://rich-iannone.github.io/DiagrammeR/
Other
1.7k stars 249 forks source link

Shiny: I can't display Node with 300 interaction. DiagrammeR has limited network size? #122

Closed kmezhoud closed 8 years ago

kmezhoud commented 9 years ago

Hi, In biology, some important protein (cancer biomarker) can get more than 300 interactions as TP53. In the following session, when I use proteins ("MYO6", "DKK3") with a few interactions (less than 100) I can display network in shiny App. But with I use TP53, I can not. How can I set network (edge length, node size, layouts) to save space in grViz function?

Please Here a session with necessary code: https://drive.google.com/file/d/0B9NOY9eukkEeMXQ1eVFRZDVLYjg/view?usp=sharing

save file as bigNet.RData

load("~/Desktop/bigNet.RData") GeneList <- ("MYO6", "DKK3") shinyApp(ui = ui, server = server ## that works

Test with TP53

GeneList <- "TP53" shinyApp(ui = ui, server = server) ## error

Thanks Karim

kmezhoud commented 9 years ago

Hi, I think, it is possible to render a big network in shiny. But the graph comes too small (see Example 119 nodes and 348 interactions).

Example (119/348) https://drive.google.com/file/d/0B9NOY9eukkEeOVE5T1d6TGZlNzQ/view?usp=sharing

kmezhoud commented 9 years ago

Now I am sure, There is a limit to plot network with grVis(obj) This two networks can to be, but can not together with this error message (93 nodes/436 interaction, grViz_obj.txt).

abort() at bb
aa
GG
sx
Wx
IA
Pz
ld
qb
ccall
Viz
renderValue
superFuncBound

onValueChange@http://127.0.0.1:7588/shared/shiny.min.js:3:43619
onValueChange@http://127.0.0.1:7588/shared/shiny.min.js:4:7926
receiveOutput@http://127.0.0.1:7588/shared/shiny.min.js:3:29316
http://127.0.0.1:7588/shared/shiny.min.js:3:30916
_sendMessagesToHandlers@http://127.0.0.1:7588/shared/shiny.min.js:3:30658
dispatchMessage@http://127.0.0.1:7588/shared/shiny.min.js:3:30491
onmessage@http://127.0.0.1:7588/shared/shiny.min.js:3:41906``

Network 1 Network 2

kmezhoud commented 9 years ago

Suggestion to better interact with big networks: Maybe it will be interesting to add some utilities as zooming and selecting network. Here pkerpedjiev or this two examples. Thanks

happyshows commented 8 years ago

@kmezhoud for medium sized network (100<x<1000), I suggest you to use visNetwork directly if you insist the interactivity piece, for graph larger than that, I believe it's better to export the graph and render in Cytoscape. There's no point to render a network for documentation purpose for size like that.

rich-iannone commented 8 years ago

@kmezhoud There are functions to select nodes and to create a subgraph from the selection. So, that could limit what is rendered. But I do agree with @happyshows about the option to export the DOT code and import the graph in Cytoscape or Gephi.