Mapping nodes sizes and adding legends in cytoscape network

旧街凉风 提交于 2021-01-28 09:19:24

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!