Positional Data Missing?

24 views
Skip to first unread message

Terrence Ernst

unread,
May 14, 2019, 5:47:19 PM5/14/19
to cytoscape-helpdesk
I am wondering why positional data is missing when running exportNetwork, using RCy3.
I am specifically looking at the 'wine and cheese' example, from the cytoscape.js page. (http://www.wineandcheesemap.com/) (https://github.com/cytoscape/wineandcheesemap)
This example uses a flat (json) file that I am assuming was exported via the thick client (v=https://github.com/cytoscape/wineandcheesemap/blob/gh-pages/data.json) Note the positional data, for each node.

When trying to duplicate this example, using RCy3, I notice that the positional data is not exported.

Alex Pico

unread,
May 16, 2019, 3:43:47 PM5/16/19
to cytoscape-helpdesk
Positional data is exported by RCy3. Here's a short demo script:

library(RCy3)
openSession
()
exportNetwork
("test", "CX")

You'll find the data in chunks that looks like this:

{
   
"node" : 211,
   
"view" : 768,
   
"x" : 1835.5062515151699,
   
"y" : 1306.3731574723454
 
}

It's no longer explicitly called "position" like in the example json you pointed to. That's from 2016, maybe the format changed?

 - Alex

Terrence Ernst

unread,
May 16, 2019, 5:04:29 PM5/16/19
to cytoscape-helpdesk
I should note that I am referring specifically to the creation of the CYJS file, not the CX version.

Alex Pico

unread,
May 16, 2019, 7:59:24 PM5/16/19
to cytoscape...@googlegroups.com
Ack. Good catch! Turns out that Cytoscape Commands and CyREST both exclude position from their CYJS exports. I’ll file bugs for those. Once it’s fixed at the source, then it will automatically work in RCy3 as well. RCy3 simply calls the ‘network export’ command, in this case.

 - Alex



--
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/57271b05-75f4-4439-b4a6-dcbcec540ca2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages