Export / import edge handles to / from xgmml

43 views
Skip to first unread message

David Ruckerbauer

unread,
Aug 31, 2016, 8:12:01 AM8/31/16
to cytoscape-helpdesk
Hi!

I am using Cytoscape 3.0.1 and I am wondering if there is any way to export the position of edge handles to an .xgmml file and then re-import them. In the .xgmml file I get a line like
<att name="EDGE_BEND" value="0.9997960122784353,0.0201973719116839,0.2675847899208634" type="string"/>
with the value being one number- triplet per handle. When I import this file, however, the handle is placed somewhere in the far left corner, with multiple handles stacked on top of each other. This doesn't change even if I change the numbers in the .xgmml file manually.

I am not using Cytoscape 3.4.0 because there the .xgmml files don't contain any information on coordinates at all.

Cheers,
David

Kei

unread,
Sep 1, 2016, 12:20:12 PM9/1/16
to cytoscape-helpdesk
Hi.

I've tried bend in 3.4.0 and it works fine, and all of coordinates are in the file (see the attached file).
Do you have any small example with this missing coordinates problem?
bend1.xgmml

David Ruckerbauer

unread,
Sep 2, 2016, 12:37:47 PM9/2/16
to cytoscape...@googlegroups.com
Hi!

Thank you for your answer. I attached a re-export  (from my Cytoscape 3.4.0 installation) of the file you gave me- the coordinates are missing along with most of the other information. While I get the bend when I import the file, changing any of the numbers in the value of EDGE_BEND does not change anything, the edge handle is always at the same place when importing the file.

I am using MAC OSX 10.11.2, Java 1.8.0_101.


As for Cytoscape 3.0.1:
When I create a new file, add nodes and an edge as well as a handle to the edge, exporting as .xgmml does not save a value for the EDGE_BEND. Importing this file and re-exporting it after adding an edge again (the previous one is not stored at all) leads to a .xgmml with a value for EDGE_BEND. Importing this file, however, again leads to a network where the edge handle is at a different place than previously assigned. This place seems constant, even when the value of EDGE_BEND is changed in the xgmml file and the file imported again. Re-exporting a file seems to change the value of EDGE_BEND, however.
So creating a new network and exporting it doesn't save the edge handle, importing a .xgmml adding a handle and exporting it does save the edge handle, but apparently not the right values.
Apart from the value for EDGE_HANDLE, also the line
<att name="z" value="0.0" type="string"/>
is added to the nodes, which is absent in the exported .xgmml of a new network.
bend1_reexport.xgmml
Reply all
Reply to author
Forward
0 new messages