Open nilsoberg opened 2 years ago
Thanks, Nils --
A number of comments ...
So ... as regards your original observation that the nodes aren't colored as smaller networks are, the node.fillColor in your XGMML An alternate explanation would be when there are too many nodes/edges, and Cytoscape decides not to create the view, as it would be very time consuming. If so, it would be appropriate for you to create_view(), which is how your .py is set up. FYI, on my test setup, your large_ssn network does cause Cytoscape to skip the view creation. The view must be created afterward, and all nodes have coordinates (0,0) ... they're all right on top of each other until a layout is performed. Once I execute a layout, I get the expected topography.
It's also possible that you could get this error if you try to lay out a network where the view is not completely created yet. Py4cytoscape doesn't have a delay at the end of create_view(), so if that's a problem, you'll need your own sleep() after your create_view() call. At first, try something absurdly large (e.g., 60 seconds).
In your .py file, the reason your cytoscape_ping() function would fail is that Cytoscape may be just starting up, and the CyREST server may not yet be available. On my PC, it's available about 20 seconds after Cytoscape starts. You may already know this. In the (unreleased) py4cytoscape 1.6.0 branch, failed Cytoscape connections are automatically retried using an exponential backoff strategy. I'm not sure how this would affect your startup code, but I can imagine that it may cut down on your retries. FYI.
I see that you're passing in the Cytoscape port, presumably because you may have multiple Cytoscapes running. I don't think this configuration has been supported in quite a while. Can you limit your testing to a single Cytoscape instance for now?
On the large_ssn.xgmml file, I see that you have set up node.fillColor as a red bypass. (I'm not sure how the XGMML parsing works, so I'd have to verify that node.fillColor affects the bypass setting.) On my PC, that's exactly how each node is rendered. Interestingly, all of your nodes are rendered as square on my PC, even if I set a node bypass to circle. This seems like a Cytoscape problem. (I'm using only Cytoscape to duplicate this.) I'll post this to the Cytoscape support group.
On the images you supplied, I see that your nodes are blue. Are you telling me that they're blue despite the XGMML indicating that they should be red??
So, as to your main issue, I think you're telling me that you expect the nodes to be painted red, but they're coming up blue? I'm not seeing that, but I'm seeing that nodes are square and should be round. These are probably related. Worse ... if I use Style to try to make them round, I still get square. Very unsavory.
Comments?
Just FYI, I will be away for a few weeks so I'll get back to you when I return.
When using py4cytoscape with large networks, images are generated but not colored like smaller networks are. (The network files contain the node.fillColor attribute which is what Cytoscape uses to color the nodes by default.) This occurs in 3.8 and 3.10 (latest snapshot tested 0714).
The files that are attached are used for debugging.
py4c_test.py
uses py4cytoscape and can be used for testing using the CyREST API.cytoscape-3.10-01714-rest-output.txt cytoscape-3.10-0714-terminal-log.txt cytoscape-3.10-framework-cytoscape.log ssn_3 10
cytoscape-3.8-rest-output.txt cytoscape-3.8-terminal-log.txt cytoscape-3.8-framework-cytoscape.log ssn_3 8
py4c_test.py.txt
large_ssn.zip
First reported in #81