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.7.0-cp313-cp313-win_amd64.whl (6.8 MB view details)

Uploaded CPython 3.13Windows x86-64

piqtree-0.7.0-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.7.0-cp313-cp313-macosx_15_0_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.13macOS 15.0+ x86-64

piqtree-0.7.0-cp313-cp313-macosx_15_0_arm64.whl (4.0 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

piqtree-0.7.0-cp312-cp312-win_amd64.whl (6.8 MB view details)

Uploaded CPython 3.12Windows x86-64

piqtree-0.7.0-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.7.0-cp312-cp312-macosx_15_0_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.12macOS 15.0+ x86-64

piqtree-0.7.0-cp312-cp312-macosx_15_0_arm64.whl (4.0 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

piqtree-0.7.0-cp311-cp311-win_amd64.whl (6.8 MB view details)

Uploaded CPython 3.11Windows x86-64

piqtree-0.7.0-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.7.0-cp311-cp311-macosx_15_0_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.11macOS 15.0+ x86-64

piqtree-0.7.0-cp311-cp311-macosx_15_0_arm64.whl (4.0 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for piqtree-0.7.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 b1e7f2402aaa670831e7a9b2ba38df31ec804eaeb34bf74f049d1b9ce92f90dc
MD5 54955bb6218c9bad4645d166e5325c13
BLAKE2b-256 6a07b379e8f5772aae312bd0bfe8508eacdab1c9aef58fd7189df187d2510e17

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.7.0-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.7.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for piqtree-0.7.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 92980e414c8ccfd357682e50111a11cb3d348887193312e853d3f64249216fa7
MD5 3367ff41b02a67ddf3073fad20ae260b
BLAKE2b-256 324378a86a2a626f35086cf1b4b6bc03e90be63058a72be8a3bf9549b9905d98

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.7.0-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.7.0-cp313-cp313-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for piqtree-0.7.0-cp313-cp313-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 e8914d4bc68f59211afbb053f6fcf4062dfb2e91807c59d84bd630af612e75b4
MD5 9e33e6b70ec0631ef56161e8ecbcc637
BLAKE2b-256 0609e136023a39588fbc3069a6ec2a814074f03d220cdcda688217cfeaf89941

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.7.0-cp313-cp313-macosx_15_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.7.0-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for piqtree-0.7.0-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 270a0961f5933891750e3cd8c6a4eba1094575cc0137fc828e86e71c9db9b148
MD5 b2f63e9c9e776011ddb359dc74ef3e99
BLAKE2b-256 d7f9ead75cc21dc27d13b8e3cf62440a28ea3bf9b57e9874019bc441612004fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.7.0-cp313-cp313-macosx_15_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.7.0-cp312-cp312-win_amd64.whl.

File metadata

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

File hashes

Hashes for piqtree-0.7.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1091ed215e75c6ae11e078ce82cfe679a660037c2457523afd00714acbafdb38
MD5 12cf6948446b100d1e10f572a03a07e0
BLAKE2b-256 17b473bf2216c366f2b24b834b7cbce33b2a3ee4d7dd21d9d7550a82e565b195

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.7.0-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.7.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for piqtree-0.7.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3a21dc8dff7c54a4084e4dca72760c6f1bd1659a5d94c2c07f474598a7ac492e
MD5 cc616232400ff8ccbfd55c2804297605
BLAKE2b-256 2a3fbee824c402dcd14dd379044369b881110b160fd1e20e640e79e04db25cbe

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.7.0-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.7.0-cp312-cp312-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for piqtree-0.7.0-cp312-cp312-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 83c750d23f963cd3fd87bb1f42605c13a48df321fec34b8ea0bec67f5ff09009
MD5 0b6752c42ebde192213761f620ead2be
BLAKE2b-256 befc44b4f1da447388c737e0d484ca07691d32d645c91e545d49d26080c45ce9

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.7.0-cp312-cp312-macosx_15_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.7.0-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for piqtree-0.7.0-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 1f9bc6cfd4a3f08032ba4218d6a4448e24b709f2c4ac87ace39665da617dd346
MD5 154c09b72de9ffe1bb180adfc459d1cb
BLAKE2b-256 ddd32ea48b134e08544417326f1415f390c421bde12e771e5dfb1585727eb354

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.7.0-cp312-cp312-macosx_15_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.7.0-cp311-cp311-win_amd64.whl.

File metadata

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

File hashes

Hashes for piqtree-0.7.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 84f883a0b4d7f5f105a53cc63397a046ed3c88298f3cfc51cd447cd5481be168
MD5 d4b977ab56e78dde11a0d6c09d0d08ec
BLAKE2b-256 ddf5d99d343a86e222b7fdca24bbb86ed3af22de820e3a122973ac7f3ce462cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.7.0-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.7.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for piqtree-0.7.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fc402dc1b3cf4c0b085c6ab80b2e845f16bbe444c5dd94405f4999c461a730c7
MD5 67a1faf39444cfd2be797fd809e2a515
BLAKE2b-256 15073e4a023a2ea6c7b65adc2396082eb56afa7204809904fd3d9445667c01b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.7.0-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.7.0-cp311-cp311-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for piqtree-0.7.0-cp311-cp311-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 e128cd57123ee09177ceab6688eab6de1a57412f12367974504cf9b4aeedf644
MD5 f0a721b1ac6d3c9390847f439bc292c9
BLAKE2b-256 c38f7ea13f935ec3cb1ac3669cd7151f5f3a4f812b1db739c6171135dda5f44c

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.7.0-cp311-cp311-macosx_15_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.7.0-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for piqtree-0.7.0-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 3d244e6a39bc88c09d316040e7c3b0394085b09270f7951083aa20fc0545e434
MD5 67ec80ccaa10539ccf3cfcc211637497
BLAKE2b-256 cbf270366ff740707bdbff5d5ed2dc6857c49a6479025c4f3042dcfbb1e0c5e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.7.0-cp311-cp311-macosx_15_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.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page