Skip to main content

cogent3 plugin for ete3

Project description

A plugin for converting a cogent3 tree to ete3 tree object

Coverage Status Release

Developed an app that takes a cogent3 PhyloNode then returns an ete3 PhyloTree, plus an app for edge colouring.

cogent3 to ete3 tree

from cogent3 import load_tree, get_app
from cogent3_ete3.style import show_legend

tree = load_tree("data/tree_large_scale.newick")

conv = get_app("cogent3_to_ete3")
t = conv(tree)

t is an ete3 PhyloTree.

colour edges by a mapping

The ete3_colour_edge app allows you to colour information on selected edges. The app applies a colour to named edges. This means for colouring internal edges the node must have names.

edge_to_cat = {"Vombatidae_Vombatus_ursinus": "A",
 "Dasyuridae_Sarcophilus_harrisii": "B",
 "Peramelidae_Echymipera_kalubu" : "C",
 "Pseudochiridae_Pseudochirulus_forbesi": "D"}

cat_to_colour={"A":"blue", 
 "B":"blue", 
 "C":"red", 
 "D":"orange"}

cl = get_app("ete3_colour_edge", edge_to_cat=edge_to_cat, cat_to_colour=cat_to_colour)
t = cl(t)

You can use the convenient function to show a legend.

show_legend(t, cat_to_colour, legend_title="Your Category")

In the pop-up window, you can explore further and render the tree in a file as you progress:

tree1

Project details


Download files

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

Source Distribution

cogent3_ete3-2025.7.3.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

cogent3_ete3-2025.7.3-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file cogent3_ete3-2025.7.3.tar.gz.

File metadata

  • Download URL: cogent3_ete3-2025.7.3.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for cogent3_ete3-2025.7.3.tar.gz
Algorithm Hash digest
SHA256 00bdea60b7dd1593afea84e1b3c150c88a63bbc7dfe3b616aa91f714c89d61ba
MD5 048eed13bd1373ea3a73ab1ac65dd398
BLAKE2b-256 903b0c7d6af355a9ffe82c19d27c06665e15d8cda5345ccefde749cc9ae2ecda

See more details on using hashes here.

Provenance

The following attestation bundles were made for cogent3_ete3-2025.7.3.tar.gz:

Publisher: release.yml on YapengLang/cogent3-ete3

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

File details

Details for the file cogent3_ete3-2025.7.3-py3-none-any.whl.

File metadata

File hashes

Hashes for cogent3_ete3-2025.7.3-py3-none-any.whl
Algorithm Hash digest
SHA256 06a456842d2d7dda115901dad359c00a74564d97a907334b266586b3043bcc1b
MD5 2a1f23c4a4fb37325ef3184a5dcb0e4c
BLAKE2b-256 73eb55093538fa17554ba8fcea9da629369b1e69cf3593cf4766d65ad1b071a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for cogent3_ete3-2025.7.3-py3-none-any.whl:

Publisher: release.yml on YapengLang/cogent3-ete3

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