Questions tagged [etetoolkit]

Use for questions related to the ETE toolkit, a Python framework to work with trees.

The ETE tookit is a Python framework for working trees.

It features a OO model for trees, visualization and annotation support as well as Jupyter notebook integration.

30 questions
8
votes
3 answers

How to get taxonomic specific ids for kingdom, phylum, class, order, family, genus and species from taxid?

I have a list of taxids that looks like this: 1204725 2162 1300163 420247 I am looking to get a file with taxonomic ids in order from the taxids above: kingdom_id phylum_id class_id order_id family_id genus_id …
aLbAc
  • 337
  • 3
  • 18
7
votes
2 answers

Converting ndarray generated by hcluster into a Newick string for use with ete2 package

I have a list of vectors created by running: import hcluster import numpy as np from ete2 import Tree vecs = [np.array(i) for i in document_list] where document_list is a collection of web documents I am analysing. I then perform hierarchical…
user1221408
  • 71
  • 1
  • 3
4
votes
1 answer

How to change the font orientation on node labels with ETE Toolkit (Python)

I'd like to change the orientation of font faces on the output image that is produced by ETE Toolkit: http://etetoolkit.org For some reason rotation and orientation change does not affect to labels as seen on the picture below: Code to produce this…
MarkokraM
  • 980
  • 1
  • 12
  • 26
4
votes
1 answer

Conversion of distance matrix to Newick format

My ultimate aim is to make a plot which merges a heatmap and a phylogenetic tree. I have accomplished the heatmap and I have also found ETE2 package in BioPython which could help me merge the two kinds of plots, however ETE2 requires Newick…
user2998764
  • 445
  • 1
  • 6
  • 22
3
votes
1 answer

How to color leaves on `ete3` Tree? (Python 3)

I just started using ete3 and it is awesome. How can I color the leaves of an ete3 Tree object using a color dictionary? I made "c":None because I don't want the of c to show up. I want to have better control of the tree render but I can't figure…
O.rka
  • 29,847
  • 68
  • 194
  • 309
3
votes
1 answer

ETE2 - One Child Node with Multiple Parents?

I'm trying to create a tree using the ETE2 module in Python. I'd like to add 1 child node to 2 parent nodes so that they both connect to the child when the tree is displayed. I'm a complete novice with ETE, so please forgive me if this is an easy…
user2740614
  • 285
  • 3
  • 17
3
votes
1 answer

manual adjustement of newick tree and usage of ETE

I have a problem which seems to be too weird for me. I have this newick tree: (((637,5250,607,14782)6942,641)6441)0; when i try to read it using ETE: t=Tree("(((637,5250,607,14782)6942,641)6441)0;", format=8) everything works normally, but now I…
ifreak
  • 1,726
  • 4
  • 27
  • 45
3
votes
2 answers

HTML Parse tree using Python 2.7

I was trying to get configure one parse tree for the below HTML table,but couldn't form it.I want to see how the tree structure looks like!can anyone help me here? # # # # The Dormouse's story # # # …
Arup Rakshit
  • 116,827
  • 30
  • 260
  • 317
2
votes
1 answer

How can I get taxonomic rank names from taxid?

This question is related to: How to get taxonomic specific ids for kingdom, phylum, class, order, family, genus and species from taxid? The solution given there works but I would like to have the names for each taxonomic ids for defined ranks. I…
utritala
  • 61
  • 1
  • 4
2
votes
1 answer

How can I create a tree using the python package ete2 using strings stored in a list?

I am trying to make a phylogenetic tree using the python package ete2 from synthetic data output from a cellular automaton model of mine. The data consists of pairs listed as (parent, child) where each member of the pair is a unique integer…
cancerconnector
  • 1,225
  • 2
  • 14
  • 21
2
votes
1 answer

How to pass variable filename to python ete?

I am trying load newick string from a file using following code: filename = templist[1].lower().replace(" ","") + ".nwk" tt = Tree(filename, format=1) but getting following error: tt = Tree(filename, format=1) # Loads a tree structure from a…
AJINKYA
  • 741
  • 2
  • 9
  • 20
2
votes
0 answers

Is there any better way to display ete2 Tree in Django template?

I am building a WebApplication using Django framework. At server side I am building ete2 tree according to the input given by user using browser. Now my problem is I need to display this tree in client side (browser) in tree format with each node as…
aMa
  • 629
  • 3
  • 10
  • 19
1
vote
0 answers

How to pass a Dendropy object with metadata to ete3 in python3?

If I have a dendropy tree that I annotate with some metadata, for example with some taxonomies, how can I convert the whole tree with metadata into a ete3 object? import dendropy t = dendropy.Tree.get_from_string("(A,(B,(C,D)));",…
aLbAc
  • 337
  • 3
  • 18
1
vote
1 answer

ete3 module on python3 - cannot import TreeStyle, faces, AttrFace, NodeStyle

I a linux user and so far I've using ete3 in python2 succesfully. I installed ete3 for python3 and there are certain modules that python3 can't find. I believe I have all the dependencies installed according to the instructions. I can import ete3,…
aLbAc
  • 337
  • 3
  • 18
1
vote
1 answer

Different guiding_lines_colos for different leaf nodes in ETE3 using TreeStyle class or anything else

How how can I add different colors for guiding line (connecting leaf node with the text using guiding_lines_color in TreeStyle class) in ETE3 python module. Thanks
Manu
  • 325
  • 1
  • 4
  • 10
1
2