Closed danrans123 closed 1 year ago
Hi, would you provide the example tree? It seems to be a tree with format 1, so try using
Tree(inputfile, format=1)
or Tree(inputfile, format=1, quoted_node_names=True) if the internal names are quoted
Hi, thanks for the reply! It is indeed format 1. Using Tree(inputfile, format=1), it worked!
Hi, I try to extract the subset tree by ete3, but i get a ERROR: ete3.parser.newick.NewickError: Unexpected newick format 'Cycadaceae:10.322225'
My command as below: from ete3 import Tree t=Tree("/gss2/data_sri5k20x/a_a_hjb20181119/jiangfenfen/GERP/tree/Vascular_Plants_rooted.dated.tre") subtree_taxa=["Arabidopsis_thaliana","Cajanus_cajan","Lupinus_angustifolius","Medicago_truncatula", "Oryza_sativa","Phaseolus_vulgaris", "Populus_trichocarpa","Prunus_persica","Vigna_radiata", "Zea_mays","Vitis_vinifera","Glycine_max"]
t.prune(subtree_taxa,preserve_branch_length=True) t.write()
Could you please give me help? Thanks!