errenmike1806
errenmike1806

Reputation: 109

Cytoscape missing some edges between nodes when reading NetworkX

I'm trying to illustrate a huge graph that I created in NetworkX in with Python using Cytoscape for analyzing connections. I write NetworkX graph into .gml format file and then open it with Cytoscape.

However, some of the nodes are missing connections!

For example, I have an edge between node '50026' and 'con_10_2362', as well as '50026', 'con_10_1037'.

enter image description here

But when I'm looking at the Cytoscape model, the nodes '50026' and 'con_10_2362' are not connected! Neither on the plot nor in in data table.

enter image description here

When I illustrate the graph as .htlm file with pyvis, nodes are connected there correctly.

enter image description here

I would like to use pyvis, but in Cytoscape I can drag nodes and follow different paths and move nodes by mouse which I cannot in .htlm. My guess is that there is something happens during writing or reading .gml file. Has someone ever ecnountered that issue?

Upvotes: 0

Views: 118

Answers (1)

Scooter Morris
Scooter Morris

Reputation: 1390

Without seeing the actual .gml file, it would be really hard to diagnose what might be going on. On the other hand, if you use py4cytoscape, you can skip the .gml step entirely and write the graph directly to Cytoscape for visualization. You could still use NetworkX to build up your graph or you could just create the nodes and edges directly.

Also, feel free to post a Cytoscape bug and attach the .gml file with information about which edges are missing. This will allow us to do a deeper dive.

Upvotes: 0

Related Questions