本文整理汇总了Python中ete3.TreeStyle.guiding_lines_color方法的典型用法代码示例。如果您正苦于以下问题:Python TreeStyle.guiding_lines_color方法的具体用法?Python TreeStyle.guiding_lines_color怎么用?Python TreeStyle.guiding_lines_color使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ete3.TreeStyle
的用法示例。
在下文中一共展示了TreeStyle.guiding_lines_color方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_tree_style
# 需要导入模块: from ete3 import TreeStyle [as 别名]
# 或者: from ete3.TreeStyle import guiding_lines_color [as 别名]
def get_tree_style(self):
ts = TreeStyle()
ts.layout_fn = self.custom_layout
ts.show_leaf_name = False
ts.draw_guiding_lines = True
ts.guiding_lines_type = 0
ts.guiding_lines_color = "#000000"
self._treestyle = ts
return ts
示例2: run_action_change_style
# 需要导入模块: from ete3 import TreeStyle [as 别名]
# 或者: from ete3.TreeStyle import guiding_lines_color [as 别名]
def run_action_change_style(self, tree, a_data):
#print "action change style called.."
if tree.tree_style == self._treestyle:
ts2 = TreeStyle()
ts2.layout_fn = self.custom_layout
ts2.show_leaf_name = False
ts2.draw_guiding_lines = True
ts2.guiding_lines_type = 0 #solid line
ts2.guiding_lines_color = a_data
tree.tree_style = ts2
self._treestyle = ts2
else:
tree.tree_style = self._treestyle
示例3: TreeStyle
# 需要导入模块: from ete3 import TreeStyle [as 别名]
# 或者: from ete3.TreeStyle import guiding_lines_color [as 别名]
F = faces.TextFace(mynode.name,fsize=20)
faces.add_face_to_node(F,mynode,0,position="aligned")
#Plot Pie Chart
ts = TreeStyle()
ts.show_leaf_name = False
ts.layout_fn = phyparts_pie_layout
nstyle = NodeStyle()
nstyle["size"] = 0
for n in plot_tree.traverse():
n.set_style(nstyle)
n.img_style["vt_line_width"] = 0
ts.draw_guiding_lines = True
ts.guiding_lines_color = "black"
ts.guiding_lines_type = 0
ts.scale = 30
ts.branch_vertical_margin = 10
plot_tree.convert_to_ultrametric()
plot_tree.ladderize(direction=1)
my_svg = plot_tree.render(args.svg_name,tree_style=ts,w=595,dpi=300)
if args.show_nodes:
node_style = TreeStyle()
node_style.show_leaf_name=False
node_style.layout_fn = node_text_layout
plot_tree.show(tree_style=node_style)
示例4: EvolTree
# 需要导入模块: from ete3 import TreeStyle [as 别名]
# 或者: from ete3.TreeStyle import guiding_lines_color [as 别名]
from ete3 import faces
tree = EvolTree ("data/S_example/measuring_S_tree.nw")
tree.link_to_alignment ('data/S_example/alignment_S_measuring_evol.fasta')
print tree
print '\n Running free-ratio model with calculation of ancestral sequences...'
tree.run_model ('fb_anc')
#tree.link_to_evol_model('/tmp/ete3-codeml/fb_anc/out', 'fb_anc')
I = TreeStyle()
I.force_topology = False
I.draw_aligned_faces_as_table = True
I.draw_guiding_lines = True
I.guiding_lines_type = 2
I.guiding_lines_color = "#CCCCCC"
for n in sorted (tree.get_descendants()+[tree],
key=lambda x: x.node_id):
if n.is_leaf(): continue
anc_face = faces.SequenceFace (n.sequence, 'aa', fsize=10, bg_colors={})
I.aligned_foot.add_face(anc_face, 1)
I.aligned_foot.add_face(faces.TextFace('node_id: #%d '%(n.node_id),
fsize=8), 0)
print 'display result of bs_anc model, with ancestral amino acid sequences.'
tree.show(tree_style=I)
print '\nThe End.'