Problems importing GML file to Cytoscape

362 views
Skip to first unread message

Ana Av

unread,
Oct 10, 2018, 6:01:52 PM10/10/18
to cytoscape-helpdesk
Hello. I'm working with networkx library and after I export my graph to a GML file and import it to Cytoscape I only visualize a straight line with no nodes. The nodes data are in the table panel but I can´t see them. In the GML file I use the attribute 'graphics' to define x and y positions, I don't know if that is what is causing the problem.
importGML.PNG

Brett Settle

unread,
Oct 10, 2018, 6:13:16 PM10/10/18
to cytoscape-helpdesk
Hi Ana,

Could you supply me with the GML file you are using to load the network, so I can figure out what is happening?

Thanks,
Brett

Ana Av

unread,
Oct 11, 2018, 9:57:54 AM10/11/18
to cytoscape-helpdesk
Sure.

Thank you.
TBH53045.gml

Brett Settle

unread,
Oct 11, 2018, 11:34:15 AM10/11/18
to cytoscape...@googlegroups.com
Good news, it looks like the network is being loaded correctly! Zooming in on the bottom of the line shows:
Screen Shot 2018-10-11 at 8.29.16 AM.png

The GML file contains 339 nodes, but only 184 of them have xy coordinates.  Nodes that do have coordinates are located around (475922.6845, 2089130.49), while nodes without a location are automatically placed at (0, 0). This leads to a line-like view because the two clusters are so far away from each other. If you apply a layout (Grid), you can see that all the nodes and edges were loaded correctly.

I would suggest adding a false location to the nodes that are missing a location, or normalizing the existing node locations around (0, 0). 

--
You received this message because you are subscribed to the Google Groups "cytoscape-helpdesk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpd...@googlegroups.com.
To post to this group, send email to cytoscape...@googlegroups.com.
Visit this group at https://groups.google.com/group/cytoscape-helpdesk.
To view this discussion on the web visit https://groups.google.com/d/msgid/cytoscape-helpdesk/3770d22b-b7a2-4b76-8c1e-1e987d4bbad5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Brett Settle
Programmer Analyst II, Cytoscape Consortium
Ideker Lab, UCSD

Reply all
Reply to author
Forward
0 new messages