bIOINFORMATICS @WUST
An UPGMA phylogenetic‐tree builder in Python, with support for:
- FASTA or precomputed distance‐matrix input
- Needleman–Wunsch scoring → distance conversion
- UPGMA clustering → Newick output
- Optional dendrogram plotting via Matplotlib
- Editable‐install development with uv
- Flexible input: sequences (FASTA) or raw distance matrix (CSV/TSV/TXT)
- Customizable scoring: match/mismatch/gap parameters
- Clean API:
io.py,distance.py,tree.py,upgma.py,viz.py,cli.py - Console tool:
UPGMAentrypoint - Editable installs: rapid dev iterations via
uv pip install -e .
git clone --recurse-submodules https://github.com/Karo555/UPGMA
--> *
uv virtualenv .venv
source .venv/bin/activate
uv pip install -e .
I am using uv as a package manager
Install it by running
curl -LsSf https://astral.sh/uv/install.sh | sh
remeber to restart shell after installation.
Build a tree from fasta
UPGMA UPGMA/data/example1.fasta --mode sequences \ -o UPGMA/output/tree1.nwk \ --output-log UPGMA/output/merges1.csv \ --output-plot UPGMA/output/tree1.png
use precompted matrix
UPGMA UPGMA/data/example_matrix1.csv --mode matrix \ -o tree.nwk \ --output-log merges.csv \ --output-plot tree.png
UPGMA --help for more