Skip to main content

piqtree

PyPI Version Python Version License

CI Coverage Status Documentation Status Ruff

piqtree is a library which allows you 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, to making rapid neighbour-joining trees, or randomly generated trees be sure to check out the documentation!

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

piqtree-0.6.1-cp313-cp313-win_amd64.whl (6.7 MB view details)

Uploaded CPython 3.13Windows x86-64

piqtree-0.6.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

piqtree-0.6.1-cp313-cp313-macosx_14_0_arm64.whl (4.1 MB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

piqtree-0.6.1-cp313-cp313-macosx_13_0_x86_64.whl (5.4 MB view details)

Uploaded CPython 3.13macOS 13.0+ x86-64

piqtree-0.6.1-cp312-cp312-win_amd64.whl (6.7 MB view details)

Uploaded CPython 3.12Windows x86-64

piqtree-0.6.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

piqtree-0.6.1-cp312-cp312-macosx_14_0_arm64.whl (4.1 MB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

piqtree-0.6.1-cp312-cp312-macosx_13_0_x86_64.whl (5.4 MB view details)

Uploaded CPython 3.12macOS 13.0+ x86-64

piqtree-0.6.1-cp311-cp311-win_amd64.whl (6.7 MB view details)

Uploaded CPython 3.11Windows x86-64

piqtree-0.6.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

piqtree-0.6.1-cp311-cp311-macosx_14_0_arm64.whl (4.1 MB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

piqtree-0.6.1-cp311-cp311-macosx_13_0_x86_64.whl (5.4 MB view details)

Uploaded CPython 3.11macOS 13.0+ x86-64

File details

Details for the file piqtree-0.6.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: piqtree-0.6.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 6.7 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for piqtree-0.6.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 7f9736ede4ccd870af25418e2f574eb1acd43ebdb98fd178172b6d296491e920
MD5 8f0f8e587b9d60d5b8c9bdc4d5711784
BLAKE2b-256 66ca360231f9105a5b76e18af85855b0a6a7e6164ea2ce6e6c9f03157dc5126f

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.6.1-cp313-cp313-win_amd64.whl:

Publisher: release.yml on iqtree/piqtree

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file piqtree-0.6.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for piqtree-0.6.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 aacead4bf55d0971d9dbd9935f426f8400d6b8bdf2082e6f6a34c31ca45448d9
MD5 18bd15632ea1d57858b442b89aa02fe0
BLAKE2b-256 c8256ae4b99f850c6d5382467283b070bbd81b1886090c2499d9ac4d979b9d01

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.6.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on iqtree/piqtree

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file piqtree-0.6.1-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for piqtree-0.6.1-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 7e73052a50b2b6cb3038434a59851c1acfcddc432bccb6ea61369d051f229896
MD5 16df758e9531c7ffab858bcf3b55920b
BLAKE2b-256 65909bea2031e92d629658f7f160b4d6ca3d4e211f91651e01c0a361b5466784

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.6.1-cp313-cp313-macosx_14_0_arm64.whl:

Publisher: release.yml on iqtree/piqtree

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file piqtree-0.6.1-cp313-cp313-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for piqtree-0.6.1-cp313-cp313-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 78e62718f83603b9d771d81c58e567a88a1e0022602c6ebc4f33c605761beb25
MD5 4a0f34a38afa5f9ce6c658a619f3e568
BLAKE2b-256 740e5a0b568e5c8080b47431bedad9846d60268ef5f41fc92b7239b2a9720449

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.6.1-cp313-cp313-macosx_13_0_x86_64.whl:

Publisher: release.yml on iqtree/piqtree

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file piqtree-0.6.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: piqtree-0.6.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 6.7 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for piqtree-0.6.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 58d82b67eecb4edae35239ce8f5709eef964e7d4951fac6013d407445d7fd01b
MD5 ba6d0fa313139675143a71db25287d65
BLAKE2b-256 074a8e8388902b246fe98c62eef8937db0b7584e5741f7156feacb576ac17040

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.6.1-cp312-cp312-win_amd64.whl:

Publisher: release.yml on iqtree/piqtree

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file piqtree-0.6.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for piqtree-0.6.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 510d11809be8e5c2d43f826c199523f5dafa967f02aed3d22f7eb9503e3d55d6
MD5 a485374d4a02618e89004878861058de
BLAKE2b-256 a20efc8b23f20105c0bbf037c1ca786a69ba9d5094263afd0bf702236afa272f

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.6.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on iqtree/piqtree

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file piqtree-0.6.1-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for piqtree-0.6.1-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 8b31ab7e669ecc7b4ef4f38e0d5506d531a44418e9fc38689cd900ae4fbf09f4
MD5 efc1dea0fd9d31eacf1b0d82311f860e
BLAKE2b-256 0dcf3d937785217efd61594290c75e68d1501d9e412b2cd1e3ab449f5c3f4d33

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.6.1-cp312-cp312-macosx_14_0_arm64.whl:

Publisher: release.yml on iqtree/piqtree

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file piqtree-0.6.1-cp312-cp312-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for piqtree-0.6.1-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 5f3dd92152a02979889febe78a3bf7b9d7bee271497c9c06c0c037bd6803a6c7
MD5 cc91203a9a1dda72b6ba52faa0c2c77c
BLAKE2b-256 94445720de9cb1ddf99fa90b0d2610d81507a210f10b6c73bddea58dfb37c80d

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.6.1-cp312-cp312-macosx_13_0_x86_64.whl:

Publisher: release.yml on iqtree/piqtree

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file piqtree-0.6.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: piqtree-0.6.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 6.7 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for piqtree-0.6.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 014a1d70a0f0114b6d9ac3c9ea10e381ef010782e52efdfccf3df0365592775f
MD5 c6708ad75f5d2bde85564378c8373109
BLAKE2b-256 93ccd4d8b0b026c24f5c0621e9423a6fba5df7d499c0656708b7519816f4a981

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.6.1-cp311-cp311-win_amd64.whl:

Publisher: release.yml on iqtree/piqtree

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file piqtree-0.6.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for piqtree-0.6.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0b38244f2595e08763de24aef3bc0e7a480e48e138a753ac8db4806d38adf55e
MD5 38524025699541e385ce27abb236acbc
BLAKE2b-256 f4a02af03235b6cb16a85f5e454259800f4dfeb855b58f52be0837e8e94887be

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.6.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on iqtree/piqtree

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file piqtree-0.6.1-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for piqtree-0.6.1-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 252eb77ffae4375c42923522675761240925ebdb58f1fa144311c146613f0ad0
MD5 d0fb48d5dcabf17dfb8c1c9992b57a58
BLAKE2b-256 fef90f856ee31b3be94d609fdaa4711b117214caa618fabd75e51d0d24cf1f85

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.6.1-cp311-cp311-macosx_14_0_arm64.whl:

Publisher: release.yml on iqtree/piqtree

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file piqtree-0.6.1-cp311-cp311-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for piqtree-0.6.1-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 9eca2d9196eb79ca886105d23bb594f242cd380bf27645bc550feddf802b8a47
MD5 2442ce63b3c47fe968040561e02186aa
BLAKE2b-256 4ba429bf3c27172df0c9a22f69a82ad7bd2c632c86358f1b73f3031cc6ada5a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.6.1-cp311-cp311-macosx_13_0_x86_64.whl:

Publisher: release.yml on iqtree/piqtree

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.8.3

9 files

0.8.2

9 files

0.8.1

9 files

0.8.0

9 files

0.7.0

12 files

This release

0.6.1 This release

12 files

0.6.0

12 files

0.5.0

9 files

0.4.0

9 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