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.6.27.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.6.27-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cogent3_ete3-2025.6.27.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.6.27.tar.gz
Algorithm Hash digest
SHA256 91cdddb9ebd086e5e8696b270df0740736129e965ece068311aed314a593ee49
MD5 377a7e490f86d87ac84b549d20ee29ee
BLAKE2b-256 e69cce042afee0dc0cc231c6fba6287ef1c2e8a5b030605cc2405e3c1b97f5cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for cogent3_ete3-2025.6.27.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.6.27-py3-none-any.whl.

File metadata

File hashes

Hashes for cogent3_ete3-2025.6.27-py3-none-any.whl
Algorithm Hash digest
SHA256 7efc8dffe6d42f339c02b1e7913c03f11ebb5d4e6a081c77aec947b4de500a23
MD5 cd904bda3264ff271482bcda60b0073c
BLAKE2b-256 ba09fad74c9965e89c3c0f5d0b5b938cb27db8dad3f745fbcfd877b81d1e3147

See more details on using hashes here.

Provenance

The following attestation bundles were made for cogent3_ete3-2025.6.27-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