Skip to main content

Python bindings for IQTree

Project description

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!

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

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

Uploaded CPython 3.13Windows x86-64

piqtree-0.6.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.6.0-cp313-cp313-macosx_14_0_arm64.whl (4.1 MB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

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

Uploaded CPython 3.13macOS 13.0+ x86-64

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

Uploaded CPython 3.12Windows x86-64

piqtree-0.6.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.6.0-cp312-cp312-macosx_14_0_arm64.whl (4.1 MB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

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

Uploaded CPython 3.12macOS 13.0+ x86-64

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

Uploaded CPython 3.11Windows x86-64

piqtree-0.6.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.6.0-cp311-cp311-macosx_14_0_arm64.whl (4.1 MB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

piqtree-0.6.0-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.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: piqtree-0.6.0-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.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 8a001ef9c0c1add9d9485d7259bd07c22cfe5b176174bb3b43f77ef66ee255cd
MD5 e25e2855a43a189ed66eac8c9be63378
BLAKE2b-256 95942e4203c97f61bfb3f9f9603d8a8edb8a887e6bd936438a95f9b7cac04950

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for piqtree-0.6.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 23c999490772a6294bfae5455f3077afd429c536b196f5ea904d2cf04292759e
MD5 e315acb49e5d5edd75b691180fe10568
BLAKE2b-256 496450614f39c40a580fa54a6f4ae464de4e30a605c1b2ba25c9ed0b21b06b17

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.6.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.6.0-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for piqtree-0.6.0-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 e0605a67d51603c6a7880f9bb673e4e16703853ab0933761b2badde3c7afa420
MD5 036b1db035f13f4fa546b29f9bc5dfd6
BLAKE2b-256 14f4bdad6dedfb46727b397133fa586abf150a0f19fefbac4527995ae0685ef3

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.6.0-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.0-cp313-cp313-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for piqtree-0.6.0-cp313-cp313-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 009fd41393fea707e24146dfff403dcb895037a827094358095c197184f1e4b2
MD5 a828cc4447bc245af2c74011d9e7596a
BLAKE2b-256 fe64059a2a75e157242d51b36181207230f4ce36c2d18308dde69ad53099f41f

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: piqtree-0.6.0-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.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8c945bc7ae9e0181956e88c4aebd86b3103f7394b6186cf62f316c4fb1aa6f93
MD5 772ca19836bc32609cc9def204616ce4
BLAKE2b-256 14dbcdb1fa4584b9e7f264d3d91f3e593141d07d6c4dd1f9edb34fb08c045c14

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for piqtree-0.6.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f7d063a58c2b5431497a44ec6e73976c1c1fc424c6b1ea3894550429fc3022ed
MD5 3d38d8ced80164bdfda4978b98e33825
BLAKE2b-256 6772ea2b6849b358fc105d452b4dc9c68879140fcf6627fa1598024313fad2f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.6.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.6.0-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for piqtree-0.6.0-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 dd38a6b6b6a60d5ab7265eeba0fe6d9d0816ae21d6373acd30a35039ba179269
MD5 93eb643bc955b9fc28a2ba0f3eb217fb
BLAKE2b-256 eefb8eec0ecd36b4596a152205d409e9d9b79746f0a7eb9482feec869002fbae

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.6.0-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.0-cp312-cp312-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for piqtree-0.6.0-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 a1b54c38c258cae213057fcd3905278a1e3de6ede2b7508b7b902e5fe94bd9bf
MD5 b5083ed324fe8edf98769e306780918e
BLAKE2b-256 caad15690690509372663f3ef8940f3d2a9189e785cde2baf9e97f21ce1e3bd3

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.6.0-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.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: piqtree-0.6.0-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.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 dc71f9fa4296747951b0cd336a859d904607efb7336f769f39193b3f45dc50a9
MD5 1c447bc4685ed61e29ca87b022420033
BLAKE2b-256 fa8c96af875d647ca432f18ca3a7cca9b8d5bd98116111249131b399782e3b83

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for piqtree-0.6.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e06399d92b7b45c26065d858d766fc98c8378abaf6f91d6d06e1a8831a1232a4
MD5 468700488e23e68c6de6bc6b70302a7d
BLAKE2b-256 cd71e40defa0539e6f1791e815a8e3655a51d626ca225e5603805f62b174e779

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.6.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.6.0-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for piqtree-0.6.0-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 d1261471d5fdfa6c4c2762087237c96856369315ae68d68fd60e293f108d54a1
MD5 5799168fd390bb03aeed2bd3e2e6fbb0
BLAKE2b-256 19081160bf6cd2bddf045f61bc3162b4bb992bd0a2fc89174f7b127ddad4ca5c

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqtree-0.6.0-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.0-cp311-cp311-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for piqtree-0.6.0-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 81af20e398da4ed7ada8bfd58cd5d03512c9d19d88b120732eab9dccaf3aef50
MD5 87b1f0c50d36dad5be5b9d36aa7f25ca
BLAKE2b-256 6322de10cf89ae461d20398933f6d5ff3ffa2bfac6ac5314131dac67ad6f1cd2

See more details on using hashes here.

Provenance

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

Supported by

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