Skip to main content

piqtree

PyPI Version Python Version License

CI Coverage Status Documentation Status Ruff

piqtree (pronounced 'pie-cue-tree') is a library which allows you to use IQ-TREE directly from Python! The interface with Python is through cogent3 objects. For usage, please refer to the documentation or the examples below.

If you encounter any problems or have any feature requests feel free to raise an issue!

Contributing

If you would like to help out by contributing to the piqtree project, please check out our contributor guide!

Examples

Phylogenetic Reconstruction

from piqtree import build_tree
from cogent3 import load_aligned_seqs # Included with piqtree!

# Load Sequences
aln = load_aligned_seqs("tests/data/example.fasta", moltype="dna")
aln = aln.take_seqs(["Human", "Chimpanzee", "Rhesus", "Mouse"])

# Reconstruct a phylogenetic tree with IQ-TREE!
tree = build_tree(aln, "JC", rand_seed=1) # Optionally specify a random seed.

print("Tree topology:", tree) # A cogent3 tree object
print("Log-likelihood:", tree.params["lnL"])
# In a Jupyter notebook, try tree.get_figure() to see a dendrogram

Note See the cogent3 docs for examples on what you can do with cogent3 trees.

Fit Branch Lengths to Tree Topology

from piqtree import fit_tree
from cogent3 import load_aligned_seqs, make_tree

# Load Sequences
aln = load_aligned_seqs("tests/data/example.fasta", moltype="dna")
aln = aln.take_seqs(["Human", "Chimpanzee", "Rhesus", "Mouse"])

# Construct tree topology
tree = make_tree("(Human, Chimpanzee, (Rhesus, Mouse));")

# Fit branch lengths with IQ-TREE!
tree = fit_tree(aln, tree, "JC")

print("Tree with branch lengths:", tree)
print("Log-likelihood:", tree.params["lnL"])

More

For more examples ranging from using ModelFinder and AliSim, to making rapid neighbour-joining trees, or randomly generated trees be sure to check out the documentation!

Citation

Please cite

@article{10.1093/molbev/msag061,
  author    = {McArthur, Robert Neil and Wong, Thomas King-Fung and Lang, Yapeng and Morris, Richard Andrew and Caley, Katherine and Mallawaarachchi, Vijini and Minh, Bui Quang and Huttley, Gavin},
  title     = {piqtree: A Python Package for Seamless Phylogenetic Inference with IQ-TREE},
  journal   = {Molecular Biology and Evolution},
  year      = {2026},
  pages     = {msag061},
  doi       = {10.1093/molbev/msag061},
  url       = {https://doi.org/10.1093/molbev/msag061},
}

Release files for piqtree 0.8.3

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

Built distributions (wheels)

Table of built distributions (wheels) for piqtree 0.8.3
File
piqtree-0.8.3-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
piqtree-0.8.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details
piqtree-0.8.3-cp314-cp314-macosx_15_0_arm64.whl CPython 3.14 CPython 3.14 macOS 15.0+ ARM64 Details
piqtree-0.8.3-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
piqtree-0.8.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details
piqtree-0.8.3-cp313-cp313-macosx_15_0_arm64.whl CPython 3.13 CPython 3.13 macOS 15.0+ ARM64 Details
piqtree-0.8.3-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
piqtree-0.8.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details
piqtree-0.8.3-cp312-cp312-macosx_15_0_arm64.whl CPython 3.12 CPython 3.12 macOS 15.0+ ARM64 Details

Total release size: 66.9 MB

Release files / piqtree-0.8.3-cp314-cp314-win_amd64.whl

Download URL piqtree-0.8.3-cp314-cp314-win_amd64.whl
Size 14.0 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
326b07cf80d50827e3c8d8738dc70d595be96210b49198e5582e75c1e99ae3b9
BLAKE2b-256 checksum
How to use checksums
292e2c6acab1f0febe6008398dd0cba549f85c3c00f4c900b633dd6233930b66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 9, 2026.

Transparency log

Release files / piqtree-0.8.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL piqtree-0.8.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 4.5 MB
Tags CPython 3.14 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
11710b1d63fc8698e341ce09b8e5ffb4f3eaece11a5dddef75891ff07b67e5c0
BLAKE2b-256 checksum
How to use checksums
10169331c609767dcaf536d0f2618aecec5e50df543e5a66f2c72b69535a39bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 9, 2026.

Transparency log

Release files / piqtree-0.8.3-cp314-cp314-macosx_15_0_arm64.whl

Download URL piqtree-0.8.3-cp314-cp314-macosx_15_0_arm64.whl
Size 4.1 MB
Tags CPython 3.14 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
6bfa46a0f1cb5cd6e43152587be41d8afe610fcf7ec194f93b5a92e2fba688d4
BLAKE2b-256 checksum
How to use checksums
25dbcd4862c2e373057031fe61ad1b203c018456000d003834013253a420194a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 9, 2026.

Transparency log

Release files / piqtree-0.8.3-cp313-cp313-win_amd64.whl

Download URL piqtree-0.8.3-cp313-cp313-win_amd64.whl
Size 13.6 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
fe67aff50bbef79475b29b6dcf58aab0890edbebf0be4367beb8a917df99cd85
BLAKE2b-256 checksum
How to use checksums
9a45762f8b598cba45b736454834c8c744cb0536ee4f8d6c8d8a2276bb043d27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 9, 2026.

Transparency log

Release files / piqtree-0.8.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL piqtree-0.8.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 4.5 MB
Tags CPython 3.13 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
cd4338f3529e8e122cd8576e3e5be0333ed0e2fd8f8fe979371feb6234ed9bb3
BLAKE2b-256 checksum
How to use checksums
5cfda3f03cf8597946fd860874ee9c8565bfd9f51261e4363595b99a4198a042
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 9, 2026.

Transparency log

Release files / piqtree-0.8.3-cp313-cp313-macosx_15_0_arm64.whl

Download URL piqtree-0.8.3-cp313-cp313-macosx_15_0_arm64.whl
Size 4.1 MB
Tags CPython 3.13 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
f74900c18a444c3ff82599399469fba65200f1b235a29b904066b168698608c1
BLAKE2b-256 checksum
How to use checksums
4bdcfc8c8c4ba0314935ce3e178516a210647a5c1bb7c035730245740ec50ab7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 9, 2026.

Transparency log

Release files / piqtree-0.8.3-cp312-cp312-win_amd64.whl

Download URL piqtree-0.8.3-cp312-cp312-win_amd64.whl
Size 13.6 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
0b6629d41b030759646ad6634dfb1a8ead5b6c566ac58f77ca9c6fca4b1122a2
BLAKE2b-256 checksum
How to use checksums
71641e85db2cdfd0985928f2a60da92617ede54fe906090e155d68d079696156
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 9, 2026.

Transparency log

Release files / piqtree-0.8.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL piqtree-0.8.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 4.5 MB
Tags CPython 3.12 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
85602a100e56215a9acdfb54b90f8a32313b3775300f57365e72655acb5a6503
BLAKE2b-256 checksum
How to use checksums
4a80ceb94ebd900d9f755cd260dba07c6728b5f5eac8c8fb15f4778cff378b24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 9, 2026.

Transparency log

Release files / piqtree-0.8.3-cp312-cp312-macosx_15_0_arm64.whl

Download URL piqtree-0.8.3-cp312-cp312-macosx_15_0_arm64.whl
Size 4.1 MB
Tags CPython 3.12 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
95321deaf4d49019c86c0e4ddd128fccda4a12b056ed5798c0bc498d90258a71
BLAKE2b-256 checksum
How to use checksums
524296a5e9301277b41ac18b0ae00c5b7e0e53978312e32e6a61738c702f638f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 9, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.8.3 This release

9 release files

0.8.2

9 release files

0.8.1

9 release files

0.8.0

9 release files

0.7.0

12 release files

0.6.1

12 release files

0.6.0

12 release files

0.5.0

9 release files

0.4.0

9 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