本文整理汇总了Python中ete_dev.Tree.get_ascii方法的典型用法代码示例。如果您正苦于以下问题:Python Tree.get_ascii方法的具体用法?Python Tree.get_ascii怎么用?Python Tree.get_ascii使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ete_dev.Tree
的用法示例。
在下文中一共展示了Tree.get_ascii方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Tree
# 需要导入模块: from ete_dev import Tree [as 别名]
# 或者: from ete_dev.Tree import get_ascii [as 别名]
from ete_dev import Tree
# Loads a tree. Note that we use format 1 to read internal node names
t = Tree('((((H,K)D,(F,I)G)B,E)A,((L,(N,Q)O)J,(P,S)M)C);', format=1)
print "original tree looks like this:"
# This is an alternative way of using "print t". Thus we have a bit
# more of control on how tree is printed. Here i print the tree
# showing internal node names
print t.get_ascii(show_internal=True)
#
# /-H
# /D-------|
# | \-K
# /B-------|
# | | /-F
# /A-------| \G-------|
# | | \-I
# | |
# | \-E
#-NoName--|
# | /-L
# | /J-------|
# | | | /-N
# | | \O-------|
# \C-------| \-Q
# |
# | /-P
# \M-------|
# \-S
# Get pointers to specific nodes
G = t.search_nodes(name="G")[0]
J = t.search_nodes(name="J")[0]