Budgitree
Why use this program?
Let's say you have just obtained your phylogenetic tree from FastTree.
This tree will likely contain polytomies, and branch lengths that are so
small that they will be represented in exponential notation.
Some programs will not accept trees with these two features (e.g., ClusterPicker).
You could remove the polytomies with the ape package in R. But how do you
print the tree to standard out with the branch lengths in standard float format? You could submit
an issue to the developers of your target program and hope they respond with a fix.
Both of these options may delay your workflow. This program provides a python3 solution
to your problems. Given a phylogenetic tree in newick format, budgitree
provides an easy way to print your tree to stdout with:
- Polytomies resolved (i.e., tree converted to strictly bifurcating) and/or
- Exponential notation removed (i.e., branch lengths in float format with user-specified number of decimal places)
- Collapse branches with support values less than the specified cutoff (default is do nothing)
Usage
Get help
$ 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.
Start smuggling
$ 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.
Collapse branches
Collapse branches with less than 0.5 support:
budgitree smuggle treefile.tre -c 0.50`
Print tree with branch supports to 20 decimal places (remove exponential notation):
budgitree smuggle treefile.tre -p 20
Stop removal of polytomies during run:
If for some reason you would like to retain the polytomies, switch the feature off:
budgitree smuggle treefile.tre -b
Combine the options
Remove polytomies, print branch lengths to 15 decimal places, collapse nodes <0.5:
budgitree smuggle treefile.tre -p 15 -c 0.5
Installation
Using pip:
pip3 install budgitree
The development version:
pip3 install git+https://github.com/schultzm/Budgitree.git
Testing
Run the test suite to check the software works as intended:
budgitree test
Version
Print the version to stdout:
budgitree version
Etymology
The budgerigar, or "budgie", is an Australian bird (Melopsittacus undulatus), keeping
with an Australian theme after @tseemann. The software sets digits on branches – if you
are imaginative, that kind of sounds like budgit. tree is because it operates on
phylogenetic trees. The smuggle feature of budgitree has to do with an Australian
joke involving budgie and swimwear.
Metadata
Release files for budgitree 0.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| budgitree-0.0.9.tar.gz | 19.8 kB | Without provenance | Details for budgitree-0.0.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| budgitree-0.0.9-py3-none-any.whl | Python 3 | none | any | Details for budgitree-0.0.9-py3-none-any.whl |
Total release size: 39.3 kB
Release files / budgitree-0.0.9.tar.gz
| Download URL | budgitree-0.0.9.tar.gz |
|---|---|
| Size | 19.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
640275ce2a45c53ebe1a71d9a1096cb67124e6c021a888c3cc61b2cb244d3549
|
|
BLAKE2b-256 checksum How to use checksums |
ffa7c427667383b1d31b97e5d5327f371823a4e29b33d7321c2d37657678bad0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.5
|
Release files / budgitree-0.0.9-py3-none-any.whl
| Download URL | budgitree-0.0.9-py3-none-any.whl |
|---|---|
| Size | 19.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7de18a25c8f97194a5319b8c87b6300ab01576b8bea6ee37debafb9df50c8a16
|
|
BLAKE2b-256 checksum How to use checksums |
ed843eb20817c09fd4d641fd1bdfe3fb1bf90a9376f62f56f29c5f80fa7dbda5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.5
|
Security for budgitree 0.0.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.