问题
I used networkx package in python to construct multiple networks, where each represents a biological experiment. I then exported these networks as gml files to visualize in cytoscape and make comparisons. In each file, I have two attributes for nodes- i.e., count and color. In cytoscape, I assign the node size to its count. However, there is a huge difference between the counts of nodes, for instance some have a count of 100 while others have a count of 50,000. I would like map the sizes of all nodes in all cytoscape networks to one scale and also have a legend indicating the relative sizes. An example is shown in right side of the image below! I hope you can help me!
Image source
回答1:
The answer to the first part of the question is to construct a log(count) column. That should give you a better range to map into node size.
The best 'shipping' solution to creating a legend in a command called 'Create Legend...' found in the Style control panel pop-up menu. That exports a graphics file, but doesn't do an adequate job of it. I'm working on an app called Legend Creator, which will add annotations to the canvas for a legend. It's in development on the github/cytoscape repo.
来源:https://stackoverflow.com/questions/49814286/mapping-nodes-sizes-and-adding-legends-in-cytoscape-network