Skip to main content

Python bindings for IQTree

Project description

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!

Project details


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

Uploaded CPython 3.14Windows x86-64

piqtree-0.8.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (4.5 MB view details)

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

piqtree-0.8.0-cp314-cp314-macosx_15_0_arm64.whl (4.1 MB view details)

Uploaded CPython 3.14macOS 15.0+ ARM64

piqtree-0.8.0-cp313-cp313-win_amd64.whl (6.8 MB view details)

Uploaded CPython 3.13Windows x86-64

piqtree-0.8.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.8.0-cp313-cp313-macosx_15_0_arm64.whl (4.1 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

piqtree-0.8.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.8.0-cp312-cp312-macosx_15_0_arm64.whl (4.1 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

File details

Details for the file piqtree-0.8.0-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: piqtree-0.8.0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 7.0 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for piqtree-0.8.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 6c423ae36c92e6bcacf28b1360a7c0b0a6ac4c24f90babdd4912bd0a9d962d2d
MD5 911fb26c2117270aaa34d251eb503020
BLAKE2b-256 0ac9daf7f5370e79186c383da9affd8cb73beaf0cd209c35175ea2a35e735361

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.8.0-cp314-cp314-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.8.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for piqtree-0.8.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 22949cb9eb93f8cdc3b852b4c90d5b292a9c802e212ed8129d746099d6aedf59
MD5 2b6e14a7bf578cffbaab5ee5ae5f326f
BLAKE2b-256 bfd07777b2ad74cae32cbf875225dee31e9b976b7553c831d1b58ecbbf41fd6b

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.8.0-cp314-cp314-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.8.0-cp314-cp314-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for piqtree-0.8.0-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 d81513ca5618f4aee8e450aec04cf84f56b9250e8514b5c313ab7409d17feb34
MD5 116ca1069106de498ac9d1c387db3464
BLAKE2b-256 5581e306ddce02989b1cf0b6b802ea187d16dd493fc0e52897eff4e58cc23b63

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.8.0-cp314-cp314-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.8.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: piqtree-0.8.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.8.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 a684e798927f8b75bfda2849b65042ccabe85c0675db51342b1ba7a2f27ce2b5
MD5 c20a1ae61f58e86f408e6c3d10f3c53b
BLAKE2b-256 3fbd9edd7c256d0a9ed2228251e3851dc7c1c694e6d3d16d2d4df748d1aa9a18

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for piqtree-0.8.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 00935aec5999991bc06a7701d9bd00af717ba7a0cba874ff81b110f015fc67da
MD5 6a9e31a410156f0ad424c8d16697db3f
BLAKE2b-256 e55d32237b98ecedf344b919ef3da59f0c3ce6d976a586b215593d8bd4c68e09

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for piqtree-0.8.0-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 c6cad99fa508ae76320c22f044641d80f3fb6abe2e699756a50bf71865c35eb4
MD5 882475c1785d2d4ee4cfbca99ceef36d
BLAKE2b-256 2e17325a08e56f4d18995fa506875debb905bcce2cd2fed11251f92c548956c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.8.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.8.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: piqtree-0.8.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.8.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 41e32dec6c1ec96ca2c47c3439f36fe133308f697906e5de604c98bba88413d5
MD5 2938aff1a380422ffb087a418ce79adc
BLAKE2b-256 891517380e843bb8e983a181e0d8f3e5fd73ccf2d379115b78706dd759a11a8c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for piqtree-0.8.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 58c2c73e780e255bc695bb4ade6abba8d8f496cf03667ab3abdbe9610a7a2528
MD5 8e9cb69445c604e993929c8436fdef4b
BLAKE2b-256 3697bb79dd273719fed51fc8bb48301d7aa98331b0db8d764dee0ebf643559a4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for piqtree-0.8.0-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 03d9b474e4456ebf69c78d7d6172fc794978f9c998bdfa9bbba419f15d3cda24
MD5 375d9678cb6cfaf60f29a3efc0b694fa
BLAKE2b-256 7a3f515e0143da0eca5b6fdf047dcb0dcfecd0fd07c99be035fc29adff0e0c5c

See more details on using hashes here.

Provenance

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

Supported by

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