Python wrapper for TNT (Tree analysis using New Technology) implied weighting with clades support
Installation
Pip:
$ pip install pyiwe
conda:
$ conda install -c anaconda -c conda-forge -c alexander-pv pyiwe
From source:
$ git clone git@github.com:alexander-pv/pyiwe.git && cd pyiwe
$ pip install .
Terminal TNT will be installed automatically.
The package file from PyPi or conda does not include terminal TNT. To install it, open python in terminal mode and import pyiwe package.
$ python
$ >>> import pyiwe
Tutorial
implied_weighting_theory.ipynb, theory behind implied weighting with fitting functions plots to play;
pyiwe_example.ipynb, examples of reading TNT trees, plotting trees, getting branch supports and concavity values distributions for each clade in a tree based on TNT feature matrices;
pyiwe_runner.py, terminal-based example for a quick start;
Run pyiwe_runner.py to see arguments help:
$ cd ./pyiwe/tutorial && python pyiwe_runner.py -h
Argument parser for pyiwe_runner.py
positional arguments:
feat_matrix str, path to the feature matrix for TNT
optional arguments:
-h, --help show this help message and exit
-k_start k_start float, minimum value in a linear scale or a degree in a logarithmic scale, default=1e-2
-k_stop k_stop float, maximum value in a linear scale or a degree in a logarithmic scale, default=1.5
-k_num k_num int, number of samples to generate, default=100
-k_scale k_scale str, scale of concavity values, `log` or `linear`, default=`log`
-n_runs n_runs int, the number of repeated IW runs, default=3
-cutoff cutoff float, cutoff value between 0.0 and 1.0 for a final majority rule tree, default=0.5
-xmult_hits xmult_hits
int, produce N hits to the best length and stop, default=5
-xmult_level xmult_level
int, set level of search (0-10). Use 0-2 for easy data, default=3
-xmult_drift xmult_drift
int, cycles of drifting;, default=5
-hold hold int, a tree buffer to keep up to specified number of trees, default=500
-output_folder output_folder
str, path to store data, default=./output
-log_base log_base float, base for calculating a log space for concavity constants, default=10.0
-float_prec float_prec
int, Floating point calculations precision, default=5
-tnt_seed tnt_seed str, random seed properties for TNT, default=`1`
-seed seed str, random seed for Python numpy, default=42
-tnt_echo tnt_echo str, `=`, echo each command, `-`, don`t echo, default=`-`
-memory memory float, Memory to be used by macro language, in KB, default=10240
-c bool, clear temp *.tre files in output folder after processing
-v bool, add processing verbosity
Basic example:
$ cd ./pyiwe/tutorial
$ python pyiwe_runner.py ../pyiwe/tests/testdata/bryocorini/SI_4_Bryocorinae_matrix.tnt -c
References
TNT source: http://www.lillo.org.ar/phylogeny/tnt (Goloboff, Farris, & Nixon, 2003)
Biopython: https://biopython.org
ETE, Python Environment for Tree Exploration: http://etetoolkit.org
Metadata
Release files for pyiwe 0.0.8.post3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyiwe-0.0.8.post3-py3-none-any.whl | Python 3 | none | any | Details for pyiwe-0.0.8.post3-py3-none-any.whl |
Release files / pyiwe-0.0.8.post3-py3-none-any.whl
| Download URL | pyiwe-0.0.8.post3-py3-none-any.whl |
|---|---|
| Size | 20.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3c5739ad1da622b90f686e493a0fcbc2cc072e6e8abe367bb30f1a9cddbc9534
|
|
BLAKE2b-256 checksum How to use checksums |
6eda180fe522d6ffe622140493c575008c91793a29a46c4b988ca4f61d17972a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.9.19
|
Security for pyiwe 0.0.8.post3
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.