cytoscape / py4cytoscape

Python library for calling Cytoscape Automation via CyREST
https://Py4Cytoscape.readthedocs.io
Other
69 stars 15 forks source link

Options to automate Node layout tools #118

Closed gmhhope closed 12 months ago

gmhhope commented 1 year ago

Hi Barry,

https://manual.cytoscape.org/en/stable/Navigation_and_Layout.html#node-layout-tools

Any command line or py4cytoscape that can automate the rotate step in node-layout tool?

I would like to rotate multiple ones so automation is kinda required. Thanks very much!

Best, Minghao Gong

gmhhope commented 1 year ago

THe confusion for me is that, I tried to even fetch the Layout tool description in Command line of Cytoscape. I could not find it. What exactly this component towards Cytoscape? Is that an App?

Thanks, Minghao Gong

bdemchak commented 1 year ago

Hi, Minghao --

This is a very good question ... and it was reported to the Cytoscape group and discussed on July 18.

The group agreed that there's nothing Cytoscape can offer until these capabilities get added to the Command Line dialog, and once that happens they will be easily accessible to py4cytoscape and RCy3.

The group also agreed that doing this is important and should happen soon.

Since then, the group's priority has been to release v3.10.1, which addresses critical issues with recent JVMs -- the JVMs are having problems with ZIP files, which Cytoscape relies on.

v3.10.1 was released last week, so it's fair to bring this up as a priority again. The next Cytoscape release isn't due for several months, but interim releases can be made available, so there's hope.

I'll bring this up now and at tomorrow's group meeting.

And thanks for trying to find this first in Command Line ... had Cytoscape offered this feature, there would be a good chance of finding it there. Alternately, if it was implemented as a function call (instead of Command), you'd find it in the Swagger documentation at Help | Automation | CyREST API -- it's not there, either.

Thanks for your excellent use of py4cytoscape ... I'll post here as soon as I have an answer.

gmhhope commented 1 year ago

Thanks for your prompt response to my request!

Yes, that tool is essential for some automatic process and I'd love to continue using Cytoscape and all the option to automate the graph. It might be also good to see if there is chance that the command line tool can involve yFile Layout...I am trying the hierarchical layout and it is much better with yFile hierarchical layout as the node at the same level won't be mixed together between the parental clades.

hierarchical yFile Hierarchical

And of course, now I need to use the Layout tools to scale it to a proper size, even with yFile...And this is the semi-ideal look:

Screenshot 2023-09-05 at 11 44 32 PM

Thanks again!

Best, Minghao Gong

bdemchak commented 1 year ago

Hi, Minghao --

I have asked that the group consider Scaling and Rotation ... they responded favorably, and I'll find out details within the next few days. The other Layout tools are much harder, so they probably won't come soon.

As for the yFiles, I'm afraid there isn't much chance of that. The yFiles layouts are available to Cytoscape only through the generosity of the yWorks company as an advertisement for their for-pay product. For this, the Cytoscape group agreed not to make yFiles available via APIs such as CyREST, py4cytoscape or RCy3. I'm afraid I don't know much about their product except for how it applies to Cytoscape.