PhytClust takes a phylogenetic tree as input and outputs monophyletic leaf clusters that best fit the tree structure.
Project description
PhytClust
Tree-aware clustering for rooted phylogenies.
PhytClust partitions the leaves of a phylogenetic tree into clusters that are guaranteed to be monophyletic — every cluster is a proper clade. Under the hood it uses dynamic programming on the tree structure itself, so the optimization respects the topology rather than flattening it into a distance matrix.
It ships as a single pip install with three interfaces: a CLI for quick runs, a Python API for scripting and pipelines, and an experimental web GUI for interactive exploration.
Install
pip install phytclust
Or from source:
git clone https://github.com/ICCB-Cologne/PhytClust.git
cd PhytClust
pip install -e ".[dev]"
Quick taste
# cluster a tree into exactly 5 clades
phytclust examples/sample_tree.nwk --k 5 --save-fig
# let PhytClust pick the 3 best k values
phytclust examples/sample_tree.nwk --top-n 3 --save-fig
# get one representative k per resolution scale
phytclust examples/sample_tree.nwk --resolution --bins 4 --save-fig
Web GUI [beta]
PhytClust comes with an experimental browser-based interface for interactive exploration.
Install with GUI extras:
pip install "phytclust[gui]"
Launch the server:
uvicorn phytclust.gui.api:app --host 127.0.0.1 --port 8000
Then open http://127.0.0.1:8000 in a browser. Paste any Newick string, choose a clustering mode, and explore the results interactively.
For a public deployment (multi-user, capped tree size, no server-side writes):
PHYTCLUST_PUBLIC_MODE=1 PHYTCLUST_MAX_TIPS=5000 \
uvicorn phytclust.gui.api:app --host 0.0.0.0 --port 8000
Documentation
Full docs (tutorials, reference, concepts) are hosted at:
iccb-cologne.github.io/PhytClust
If you want to browse or build the docs locally:
pip install -e ".[docs]"
mkdocs serve # opens at http://127.0.0.1:8000
Citation
If PhytClust is useful in your research, please cite:
K. Ganesan, E. Billard, T.L. Kaufmann, C.B. Strange, M.C. Cwikla, A. Altenhoff, C. Dessimoz, R.F. Schwarz. PhytClust (2025). github.com/ICCB-Cologne/PhytClust
License
GPL-3.0 — see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file phytclust-0.1.2.tar.gz.
File metadata
- Download URL: phytclust-0.1.2.tar.gz
- Upload date:
- Size: 281.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
238b72a1021bb397794c02ce336f2bff9efb297e92e6f70a907bc74589616835
|
|
| MD5 |
768ef7522ba218363b9a0ad92500f197
|
|
| BLAKE2b-256 |
b11ba96cbc188739a9a0a03a93b36e76cdabfa52d86f1d343cbdd9c336722d41
|
File details
Details for the file phytclust-0.1.2-py3-none-any.whl.
File metadata
- Download URL: phytclust-0.1.2-py3-none-any.whl
- Upload date:
- Size: 267.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee442e6f9d65a781c2d54c9e3f05e94b739ffd93a637a87c098b97493e1324b6
|
|
| MD5 |
f3c9cbc97db1f71f0a40a92751229a91
|
|
| BLAKE2b-256 |
9e4eeea4d84defaf94a91163a8ee08f1cf98fb42dbf9a4a47e2364fcb3d192ca
|