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.1

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.1
File Size Uploaded
phylozoo-0.4.1.tar.gz 316.2 kB Details

Built distribution (wheel)

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

Total release size: 709.1 kB

Release files / phylozoo-0.4.1.tar.gz

Download URL phylozoo-0.4.1.tar.gz
Size 316.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0a85d40244204cd8245ea28eb888c4d73b239243acc5a97f96667f214851c93b
BLAKE2b-256 checksum
How to use checksums
fdc1e9cdca1bb1dbe65ad3de2b3f75b5338d72fff25ddd913415ebaefbf52466
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.1-py3-none-any.whl

Download URL phylozoo-0.4.1-py3-none-any.whl
Size 392.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd406395ab58169e740fb89ede1db4e38b1297ad5b9b269b99e36c62ccdfc51e
BLAKE2b-256 checksum
How to use checksums
23b2a2331f65df738cfb606971016dd427d5661a76b88b4dce02ec17d441158d
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

This release

0.4.1 This release

2 release files

0.4.0

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