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
I want to generate a binary tree from a list of species. in ete3 it is possible to generate a tree but it contains polytomies, which need to be resolved manually. I would like to know if there is a method to do this automatically for all the polytomies in a tree. since there are a lot of polytomies in some cases, it is time consuming to resolve one by one. After I asked the above question, I have used the following. As you see, it has to be done for every polytomy.
Thanks for the tips!