Skip to main content

PyPI License: MIT CI Docs Bioinformatics

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.5.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.5.0
File Size Uploaded Provenance Actions
phylozoo-0.5.0.tar.gz 320.2 kB With provenance Details for phylozoo-0.5.0.tar.gz

Built distribution (wheel)

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

Total release size: 716.9 kB

Release files / phylozoo-0.5.0.tar.gz

Download URL phylozoo-0.5.0.tar.gz
Size 320.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c5e5c4f99b6fc74417e32610b7b3d78b62d330bb40e6f68b89330418d06da437
BLAKE2b-256 checksum
How to use checksums
1bdd651daacbbe059a520eaea94986c968b52816abd78128f0717d5cbfcfeb65
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 Dec 2, 2026.

Transparency log

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

Download URL phylozoo-0.5.0-py3-none-any.whl
Size 396.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1c33e8c64d0f8cfe8bd2ac07c348f27e38bcfa9c4bef75d06018530abcbd6bc0
BLAKE2b-256 checksum
How to use checksums
5e6c4bf55303fadfd16a143cc04ea1c0ee0b889fd6fb61eb8a2fac2db4bc5d61
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 Dec 2, 2026.

Transparency log

Security for phylozoo 0.5.0

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for phylozoo-0.5.0.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 Dec 2, 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