映射节点大小并在 cytoscape 网络中添加图例 [英] Mapping nodes sizes and adding legends in cytoscape network

查看:70
本文介绍了映射节点大小并在 cytoscape 网络中添加图例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在python中使用networkx包构建了多个网络,每个网络代表一个生物实验.然后我将这些网络导出为 gml 文件,以便在 cytoscape 中进行可视化并进行比较.在每个文件中,我有两个节点属性 - 即计数和颜色.在 cytoscape 中,我将节点大小分配给它的计数.但是,节点数之间存在巨大差异,例如有些节点数为 100,而其他节点数为 50,000.我想将所有 cytoscape 网络中所有节点的大小映射到一个比例,并且还有一个指示相对大小的图例.下图右侧显示了一个示例!希望你能帮帮我!

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!

图片来源

推荐答案

问题第一部分的答案是构造一个 log(count) 列.这应该给你一个更好的范围来映射到节点大小.

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.

在样式控制面板弹出菜单中的名为创建图例..."的命令中创建图例的最佳运输"解决方案.这导出了一个图形文件,但没有做足够的工作.我正在开发一个名为 Legend Creator 的应用程序,它将为图例添加注释到画布.它正在 github/cytoscape repo 上开发.

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.

这篇关于映射节点大小并在 cytoscape 网络中添加图例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆