You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cytoscape...@googlegroups.com
I have exported a GrapML which contains node attributes from the python NetworkX library. Not all nodes contain all attributes. When I try to import this into Cytoscape it fails because of this.
Is there any way I can either specify a null value in the GraphML file that will not cause the type checking to default to the wrong data type (NaN or null for example) or have some other way around this?
Thanks!
-Peter
Samad Lotia
unread,
Jul 31, 2014, 12:21:32 PM7/31/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cytoscape...@googlegroups.com
Hi Peter,
I also tried the NetworkX's GraphML exporter and had problems, e.g. Unicode serialization and no support for list attributes. I wrote my own Python function which takes a NetworkX graph and exports it to an XGMML file, which Cytoscape accepts. Here's the Github Gist: https://gist.github.com/samadlotia/8c987acb4de07ed86fba
It should support node attributes without values. It only serializes node attributes of type int, string, and lists. Hopefully this meets your needs.
Samad
Keiichiro Ono
unread,
Aug 2, 2014, 4:09:13 AM8/2/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cytoscape...@googlegroups.com
If you are working with NetworkX, an alternative is export networks &
attributes as Cytoscape.js style JSON.
This example is used for my ongoing project (REST API module for
Cytoscape 3), but file-based import is already available for Cytoscape
3.1.1. And building JSON object is very straightforward: