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. Bioinformatics, 42(10):btag748, 2026. doi:10.1093/bioinformatics/btag748

Metadata

Release files for phylozoo 0.4.2

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.2
File Size Uploaded Provenance
phylozoo-0.4.2.tar.gz 316.6 kB With provenance Details

Built distribution (wheel)

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

Total release size: 709.8 kB

Release files / phylozoo-0.4.2.tar.gz

Download URL phylozoo-0.4.2.tar.gz
Size 316.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c6fbbb2c069f8478891bcbd8646c44c50038da26924c40eca069a0f26eaf44ea
BLAKE2b-256 checksum
How to use checksums
313a7bbe43527a8ceea69e9e805800b6f49efd0c3acb6f8b2436b8b36bcd9ff5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 23, 2026.

Transparency log

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

Download URL phylozoo-0.4.2-py3-none-any.whl
Size 393.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
551b3d35e77c5303ea5917b0ee4364d3d122e15e54d4b7bb87d893c26500d298
BLAKE2b-256 checksum
How to use checksums
5722425d95b9b7c390abcb6c5058ed1fc8b99c7c37007482f9a1b024bd4c6115
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 23, 2026.

Transparency log

Security for phylozoo 0.4.2

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for phylozoo-0.4.2.tar.gz

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 Oct 23, 2026.

Transparency log

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.

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