Skip to main content

PyPI License: MIT CI Docs

PhyloZoo logo

PhyloZoo is a Python package for working with phylogenetic networks and related evolutionary data types. PhyloZoo aims to provide the foundational infrastructure for phylogenetic network analysis in Python—a common framework that other packages can build on.


Key Features

  • Directed & semi-directed networks — represent phylogenetic networks as fully directed rooted DAGs or as semi-directed/mixed graphs that allow root uncertainty. Both representations are validated on construction to guarantee well-formed phylogenetic objects. Includes a rich library of operations: network classifications, generators, conversions between representations, and much more.
  • Quartets, triplets, splits & distance matrices — support for quartet and triplet systems, split systems, and pairwise distance matrices: the core building blocks for phylogenetic inference and comparison.
  • Multiple sequence alignments — store and manipulate sequence data with efficient NumPy-backed arrays, including bootstrapping and site-pattern extraction.
  • Flexible visualization — plot networks with different layouts and fine-grained control over styling, labels, and coloring via Matplotlib.
  • Standard file formats — read and write common phylogenetic formats including eNewick, FASTA, NEXUS, and PHYLIP, making it easy to integrate with existing workflows.

Installation

To install the recommended version that includes vizualization, do:

pip install phylozoo[viz]

Quickstart

Build a small rooted network with a hybrid node, inspect it, save it and plot it:

import phylozoo as pz

# A rooted network on four taxa with one hybrid node (edges are parent-child tuples)
network = pz.DirectedPhyNetwork(
    edges=[
        ("root", "u1"), ("root", "u2"),
        ("u1", "A"), ("u1", "x"), ("x", "B"),
        ("x", "h"), ("u2", "h"),        # the two edges into the hybrid node h
        ("u2", "D"), ("h", "C"),
    ],
)

print(network.leaves)                            # {'A', 'B', 'C', 'D'}
print(pz.dnetwork.classifications.level(network))  # 1

# Save network to file (eNewick format)
network.save("my_network.enewick")               # ((A,(B,(C)#H1)),(D,#H1));

# Draw it as text (no matplotlib needed)
network.preview()
#         ┌───────────────────────● A
#         │
# ┌───────●       ┌───────────────● B
# │       └───────●
# ○               └┄┄┄┄┄┄>◆───────● C
# │                       ^
# └───────────────────────●───────● D

# Plot the network
from phylozoo.viz import plot

plot(network, show=True)

See the quickstart tutorial for a longer tour of what PhyloZoo can do.

Documentation

For detailed documentation, installation instructions, tutorials, and API reference, visit the PhyloZoo docs.

Citation

If you use PhyloZoo in your research, please cite:

Niels Holtgrefe. PhyloZoo: a unified framework for phylogenetic network analysis in Python. bioRxiv:10.64898/2026.06.09.731120, 2026.

Metadata

Release files for phylozoo 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for phylozoo 0.4.0
File Size Uploaded
phylozoo-0.4.0.tar.gz 315.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for phylozoo 0.4.0
File Interpreter ABI Platform
phylozoo-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 707.7 kB

Release files / phylozoo-0.4.0.tar.gz

Download URL phylozoo-0.4.0.tar.gz
Size 315.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d9a21dad96d80625f3e684daf9e797173232ad5b6e47f97debe8898c9e34ddc3
BLAKE2b-256 checksum
How to use checksums
7d47e8ac9cde99c3cde98e9a7b9e66b7eebfc186f136988e061801a425a6685f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release files / phylozoo-0.4.0-py3-none-any.whl

Download URL phylozoo-0.4.0-py3-none-any.whl
Size 392.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
10df3faaf7490a6f3c019c7112f7c53c5cc25f4438784b67ee95c2f8725c5826
BLAKE2b-256 checksum
How to use checksums
42395093266bdecdb553f89da55932edfa3021afcc0c564dea7ab12ee50824f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release history Release notifications | RSS feed

0.4.1

2 release files

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page