本文整理汇总了Python中ete3.TreeStyle.min_leaf_separation方法的典型用法代码示例。如果您正苦于以下问题:Python TreeStyle.min_leaf_separation方法的具体用法?Python TreeStyle.min_leaf_separation怎么用?Python TreeStyle.min_leaf_separation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ete3.TreeStyle
的用法示例。
在下文中一共展示了TreeStyle.min_leaf_separation方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_example_tree
# 需要导入模块: from ete3 import TreeStyle [as 别名]
# 或者: from ete3.TreeStyle import min_leaf_separation [as 别名]
def get_example_tree():
t = Tree()
ts = TreeStyle()
ts.layout_fn = layout
ts.mode = "c"
ts.show_leaf_name = True
ts.min_leaf_separation = 15
t.populate(100)
return t, ts
示例2: print
# 需要导入模块: from ete3 import TreeStyle [as 别名]
# 或者: from ete3.TreeStyle import min_leaf_separation [as 别名]
except IOError:
print ("Unknown file: ", treefile)
sys.exit()
lines = ""
for l in f:
lines = lines+l
f.close()
t = Tree(lines, format=1 )
#"((HalmarSJ:59,(BdeexoJS:7,(BdebacW:6,(Bdebacst:4,Bdebac:4)64:2)65:1)66:52)853:1,((((SorcelSoe7:5,SorcelSo:5)87:11,HalochDS:16)97:1,(((((MyxxanDK:8,MyxfulHW:8)86:2,(MyxstiDS:9,Myxful12:9)85:1)96:1,CorcorDS:11)103:1,Arcgep:12)106:3,(AnaspFw:13,(Anadeh2Ca8:2,(Anadeh2C:1,AnaspK:1)61:1)62:11)63:2)109:2)112:41,(((PelcarDS:31,Geosub:31)81:1,((PelproDS:22,GeolovSZ:22)79:8,((Geopic:24,((GeosulPC:3,GeosulKN:3)82:20,GeometGS:23)94:1)101:5,((GeouraRf:27,GeodalFR:27)78:1,(GeospM1:18,(GeospM2:14,GeobemBe:14)77:4)80:10)93:1)104:1)107:2)110:25,(((SynaciSB:54,DestieDS:54)75:1,((((DesoleHx:35,(DestolTo:34,DesautHR:34)70:1)72:1,DesalkAK:36)89:14,((((DessulDS:37,DespsyLS:37)73:5,DesproDS:42)90:1,DesalkAH:43)98:6,((DesretDS:44,DesbacDS:44)71:4,((((Desvulstn6:26,((Desvulst:21,DesvulRC:21)76:4,DesvulDP:25)92:1)100:12,((LawintPH:19,LawintN3:19)84:14,Desdessu:33)95:5)102:1,DesalaG2:39)105:8,(DesmagRS:46,(Desafrst:45,(DessalDS:41,(DesdesND:40,DesaesAs:40)69:1)74:4)91:1)99:1)108:1)111:1)113:1)114:3,(SynfumMP:52,(DesbaaDS:51,DesaceDS:51)68:1)88:1)115:2)116:1,(HipmarDS:20,DesaceA6:20)67:36)117:1)118:1)119:2);", format=1 )
ts = TreeStyle()
ts.min_leaf_separation= 0
#ts.scale = 88
nstyle = NodeStyle()
nstyle["size"] = 0.0001
for n in t.traverse():
n.set_style(nstyle)
#t.render("tree.png", tree_style=ts)
coord = t.render(outputfile+".png", tree_style=ts, w=183, units="mm")
#coord = t.render("tree.png")
#print(coord)
# Map between node name and node id