cytoscape / RCy3

New version of RCy3, redesigned and collaboratively maintained by Cytoscape developer community
MIT License
48 stars 20 forks source link

How to extract x and y values of all the nodes in a network #91

Closed crotoc closed 4 years ago

crotoc commented 4 years ago

Hi there, Thanks for your great package so that I can get my work done. I have a question whether there is a way to get the x and y values of all the nodes in a network. I am plotting a network and using yFile layout. Because yFile layout can not be accessed by RCy3, I have to apply the layout mannually. Then I need to extract the x and y values of this network to draw some more flexible network in R. Can you point me to the right direction. Thanks!

m-grimes commented 4 years ago

There used to be a function in the old RCy called getNodePosition() but I think that is depreciated? That was useful for copying layouts using the converse setNodePosition().

Mark

Mark Grimes Division of Biological Sciences University of Montana

On 12 Feb 2020, at 9:03, Rui chen wrote:

Hi there, Thanks for your great package so that I can get my work done. I have a question whether there is a way to get the x and y values of all the nodes in a network. I am plotting a network and using yFile layout. Because yFile layout can not be access by RCy3, I have to apply the layout mannually. Then I need to extract the x and y values of this network to draw some more flexible network in R. Can you point me to the right direction. Thanks!

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/cytoscape/RCy3/issues/91

AlexanderPico commented 4 years ago

We've got getNodePosition and layoutCopycat for those use cases. Let me know if they don't do what you need.

crotoc commented 4 years ago

Bing! The getNodePosition does exactly what I want. Thanks very much!

By the way, RCy3 is not possible to invoke yFiles, right? Is it a way to work around so that I can automate my whole workflow. Thanks!

AlexanderPico commented 4 years ago

Correct. yFiles is provided by a for-profit company. They generously allow us to include it in Cytoscape for free, but they very clearly will not allow for automation. The automation of their layouts is what they charge money for. No way around this except by purchasing their projects...

crotoc commented 4 years ago

Okay! I tried to use their libs but I am really bad at Java, so doesn't know how to get layout info from their lib.... Can I know whether there is a layout good for GO (hierarchy layout/directed acyclic graph )? The current default ones are really not good for this purpose. Thanks!