当前位置: 首页>>代码示例>>Python>>正文


Python TreeStyle.guiding_lines_type方法代码示例

本文整理汇总了Python中ete3.TreeStyle.guiding_lines_type方法的典型用法代码示例。如果您正苦于以下问题:Python TreeStyle.guiding_lines_type方法的具体用法?Python TreeStyle.guiding_lines_type怎么用?Python TreeStyle.guiding_lines_type使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ete3.TreeStyle的用法示例。


在下文中一共展示了TreeStyle.guiding_lines_type方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_tree_style

# 需要导入模块: from ete3 import TreeStyle [as 别名]
# 或者: from ete3.TreeStyle import guiding_lines_type [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
开发者ID:phylotastic,项目名称:phylo_webservices,代码行数:11,代码来源:tree_config.py

示例2: run_action_change_style

# 需要导入模块: from ete3 import TreeStyle [as 别名]
# 或者: from ete3.TreeStyle import guiding_lines_type [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
开发者ID:phylotastic,项目名称:phylo_webservices,代码行数:15,代码来源:tree_config.py

示例3: TreeStyle

# 需要导入模块: from ete3 import TreeStyle [as 别名]
# 或者: from ete3.TreeStyle import guiding_lines_type [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)

     
    
开发者ID:mossmatters,项目名称:MJPythonNotebooks,代码行数:30,代码来源:phypartspiecharts.py

示例4: EvolTree

# 需要导入模块: from ete3 import TreeStyle [as 别名]
# 或者: from ete3.TreeStyle import guiding_lines_type [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.'
开发者ID:fmaguire,项目名称:ete,代码行数:32,代码来源:6_ancestral_sequence.py


注:本文中的ete3.TreeStyle.guiding_lines_type方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。