Question: Phylogenetics:How to Generate a binary newick tree from a list of species
0
gravatar for View7
27 days ago by
View70
View70 wrote:

I have a list of species from which I would like to generate a collapsed binary newick tree. I have tried in ete3, but it does not work. (PhyloT has this feature, but cannot be used as it is not free anymore )

ex)

poly_1 = Test_tree.get_common_ancestor("Larimichthys crocea - 215358", "Takifugu rubripes - 31033")
print(poly_1)
poly_2 = poly_1.resolve_polytomy(recursive=True)
print(poly_2)

gives "None", whereas it has following three nodes. ( Larimichthys crocea - 215358 ,Gasterosteus aculeatus - 69293 ,Takifugu rubripes - 31033 )

have tried with polytomy of four, but does not work either. (Nipponia nippon - 128390 , Columba livia - 8932 , Ficedula albicollis - 59894 , Haliaeetus leucocephalus - 52644 )

Also, is there any way to retrieve simple newick format from ete3's ncbi.get_topology() method?

from ete3 import NCBITaxa
ncbi = NCBITaxa()

tree = ncbi.get_topology([9606, 9598, 10090, 7707, 8782])
print tree.get_ascii(attributes=["sci_name", "rank"])

Any recommendations would be appreciated. referenced the following: http://etetoolkit.org/docs/latest/tutorial/tutorial_trees.html#understanding-ete-trees http://etetoolkit.org/docs/latest/tutorial/tutorial_trees.html#basic-tree-attributes http://etetoolkit.org/docs/latest/tutorial/tutorial_trees.html#reading-newick-trees http://evomicsorg.wpengine.netdna-cdn.com/wp-content/uploads/2019/01/ete_tutorial.pdf http://etetoolkit.org/documentation/ete-ncbiquery/#ncbi_tree

ADD COMMENTlink modified 27 days ago • written 27 days ago by View70
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1248 users visited in the last hour