python中vega中的交互系统发生树。
phylovega的Python项目详细描述
Phylovega
从python可视化vega中的系统发生树。
由vega支持的python中的声明性树可视化。
声明性语法
fromphylovegaimportTreeChart# Construct Vega Specificationchart=TreeChart.read_newick('tree.newick',height_scale=200,# Node attributesnode_size=200,node_color="#ccc",# Leaf attributesleaf_labels="id",# Edge attributesedge_width=2,edge_color="#000",)
交互树
使用vega语法
它是如何工作的?
phylovega定义了一个vega语法(特别是一组转换)来绘制系统发生树。
为什么?
python是一个简单的交互式系统树查看器。维加做到了 这里的大部分重物。Phylovega只是利用Vega转换规范来构建交互式可视化。
在工作中
这里有一个特性列表,这些特性最终会进入到Phylovega中。
- 更多互动性
- 可折叠的锁骨。
- 圆树
- 。(请随意添加到列表中)。
安装
使用pip
:
pip install phylovega
通过克隆此repo并调用:
pip install -e .
依赖关系
Phylovega使用Vega4规范。它可以和Jupyterlab一起使用。
- JupyterLab:下一代jupyter笔记本。
- PhyloPandas:熊猫系统发育数据框架