Budgitree newick 树处理器
项目描述
布吉树
为什么要使用这个程序?
假设您刚刚从 FastTree 获得了您的系统发育树。这棵树很可能包含多分枝和分支长度,它们非常小,以至于它们将以指数符号表示。一些程序不接受具有这两个特性的树(例如,ClusterPicker)。您可以ape使用R. 但是,如何使用标准浮点格式的分支长度将树打印到标准输出?您可以向目标程序的开发人员提交问题,并希望他们做出修复。这两个选项都可能会延迟您的工作流程。该程序为您的问题提供了 python3 解决方案。给定一个 newick 格式的系统发育树,budgitree
提供一种简单的方法来打印你的树stdout:
- 多分法已解决(即,树转换为严格分叉)和/或
- 删除了指数符号(即,具有用户指定小数位数的浮点格式的分支长度)
- 折叠支持值小于指定截止值的分支(默认是什么都不做)
用法
得到帮助
$ budgitree
usage: budgitree [-h] ...
Given a newick tree, use this program to resolve polytomies (convert to
bifurcating) and or change the formatting of branch lengths.
optional arguments:
-h, --help show this help message and exit
Sub-commands help:
smuggle Smuggle the budgie.
version Print version.
test Run test suite.
开始走私
$ budgitree smuggle -h
usage: budgitree smuggle [-h] [-p PRECISION] [-b] [-c COLLAPSE] tree
Process the tree.
positional arguments:
tree Input newick tree
optional arguments:
-h, --help show this help message and exit
-p PRECISION, --precision PRECISION
Branch length precision (i.e., number of decimal
places to print).
-b, --dont_bifurcate_polytomies
Switch off conversion of node polytomies to
bifurcating
-c COLLAPSE, --collapse COLLAPSE
Collapse nodes with support values less than this.
折叠分支
支持小于 0.5 的折叠分支:
budgitree smuggle treefile.tre -c 0.50`
带有分支的打印树支持小数点后 20 位(删除指数符号):
budgitree smuggle treefile.tre -p 20
在运行期间停止移除多分体:
如果出于某种原因您想保留多分法,请关闭该功能:
budgitree smuggle treefile.tre -b
组合选项
删除多分法,将分支长度打印到小数点后 15 位,折叠节点 <0.5:
budgitree smuggle treefile.tre -p 15 -c 0.5
安装
使用pip:
pip3 install budgitree
开发版:
pip3 install git+https://github.com/schultzm/Budgitree.git
测试
运行测试套件以检查软件是否按预期工作:
budgitree test
版本
将版本打印到标准输出:
budgitree version
词源
虎皮鹦鹉或“虎皮鹦鹉”是一种澳大利亚鸟类(Melopsittacus undulatus),与@tseemann 之后的澳大利亚主题保持一致。该软件在分支上设置数字——如果你有想象力,那听起来像budgit. tree是因为它在系统发育树上运行。的smuggle特征budgitree与一个涉及鹦鹉和泳装的澳大利亚笑话有关。
项目详情
下载文件
下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。
源分布
budgitree-0.0.9.tar.gz
(19.8 kB
查看哈希)
内置分布
budgitree-0.0.9-py3-none-any.whl
(19.5 kB
查看哈希)