nuget server logo nuget api documents
↑

API Docs / SMRUCC.genomics.Interops.Visualize.Phylip / PhyloTree

PhyloTree

Full name SMRUCC.genomics.Interops.Visualize.Phylip.Evolview.PhyloTree Assembly SMRUCC.genomics.Interops.Visualize.Phylip Members 40

01 Syntax

SMRUCC.genomics.Interops.Visualize.Phylip.Evolview.PhyloTree

02 Methods

NameOverloadsSummary
.ctor 2 由算法直接构建的 PhyloNode 拓扑构建一棵系统发育树对象。 该构造函数会重建节点的关键变量(距离根的距离、到叶节点的最大距离、水平/垂直层级以及内部哈希索引), 从而使得由算法生成的树同样可以使用 PhyloTree.toTreeString()) 输出 Newick 文本。
__normalizeNode 1 规范化由算法构建的节点:补全空白的内部编号,并依据子节点关系修正 PhyloNode.IsLeaf / PhyloNode.IsRoot 以及父节点引用。
MarkBootstrapScores 1 标记当前树包含 bootstrap 支持度数据,从而允许 PhyloTree.toTreeString()) 输出内部节点的支持度。
FromNodes 1 由算法计算得到的树拓扑(PhyloNode 根节点)构建 PhyloTree 对象。
InternalReCalcLevels 1 some important methods; I set them 'protected/private' * so that they are invisible to users * calculate horizontal and vertical levels for internal nodes, vertical *…
reCalcDistanceToRoot 1 recalculate distance_to_root for each node; distance to root is the * total branch length from a given node to the root I use a nested * function to do the calculation…
reCalcMaxDistanceToTip 1 recalculate height for each node; height is the max branchlength to * get to the tip; start with leaf nodes; calculate accumulative branch * length from it to internal node…
MakeNewInternalNode 1 Dec 5, 2011; can be used to make rootnode
reMakeEssentialVariables 1 Oct 25, 2013; this is a recursive function the four global variables will be changed in this function: allNodes, leafNodes, hashID2Nodes, hsInternalID2externalID also fix the p…
newickParser 2 created: Oct 20, 2013 : a better and easier to maintain parser for newick and nexus trees NOTE: this is a recursive function
parseInforAndMakeNewLeafNode 1 created on Oct 20, 2013 input: the leafstr to be parsed, the internal node the leaf node has to be added to
nhxParser 1 ' * Nov 28, 2011; nhx format see here for more details: * http://phylosoft.org/NHX/ please note that using nhx is now discoraged; * use phyloXML instead * * nhx form…
NexusParser 1 Dec 1-2, 2011; nexus format; note only the tree part will be processed; * other data will be ignored see : * http://molecularevolution.org/resources/treeformats for more deta…
hasBootstrapScores 1
getNodeByID 1
getAllAncestors 1
rerootTree 1
getLCA 1
toTreeString 1
ToString 1
getExternalIDbyInternalID 1

03 Properties

04 Members

method .ctor overload 2 #
#ctor(String, String, String)
Parameters
NameTypeDescription
treenameString

ϵͳ������������

TreestrDataString

�������������ļ����ı�����

formatString

�ļ���ʽ��nhx, newick, nexus��Ĭ�ϸ�ʽΪphylip��Ĭ�������ʽnewick

method .ctor #
#ctor(String, PhyloNode)

由算法直接构建的 PhyloNode 拓扑构建一棵系统发育树对象。 该构造函数会重建节点的关键变量(距离根的距离、到叶节点的最大距离、水平/垂直层级以及内部哈希索引), 从而使得由算法生成的树同样可以使用 PhyloTree.toTreeString() 输出 Newick 文本。

Parameters
NameTypeDescription
nameString

树的名称

rootPhyloNode

算法计算得到的根节点(内部节点或者无根树的三叉根节点)

method __normalizeNode #
__normalizeNode(PhyloNode, PhyloNode)

规范化由算法构建的节点:补全空白的内部编号,并依据子节点关系修正 PhyloNode.IsLeaf / PhyloNode.IsRoot 以及父节点引用。

method MarkBootstrapScores #
MarkBootstrapScores

标记当前树包含 bootstrap 支持度数据,从而允许 PhyloTree.toTreeString() 输出内部节点的支持度。

method FromNodes #
FromNodes(String, PhyloNode)

由算法计算得到的树拓扑(PhyloNode 根节点)构建 PhyloTree 对象。

Parameters
NameTypeDescription
nameString

树的名称

rootPhyloNode

算法计算得到的根节点

method InternalReCalcLevels #
InternalReCalcLevels

>>>>>>>> >>>>>>>>> some important methods; I set them 'protected/private' so that they are invisible to users

calculate horizontal and vertical levels for internal nodes, vertical level = (min(levels of all descendents) + max(levels of all descendents)) / 2; horizontal level = max(levels of all descendents) + 1; therefore root has the max horizontal level jan 7, 2011; add level_vertical_slanted = (min(levels of all * descendents) + (max(levels of all descendents)) - min) / 2;

parameters are: node, array ref to hold horizontal levels of all its descendents array ref to hold vertical levels of all its descendents array ref to hold horizontal levels of its parent array ref to hold vertical levels of its parent array ref to hold vertical levels of all its leaf descendents of the parent node array ref to hold vertical levels of all its leaf descendents of the current node

method reCalcDistanceToRoot #
reCalcDistanceToRoot

recalculate distance_to_root for each node; distance to root is the total branch length from a given node to the root I use a nested function to do the calculation * NOTE: this program will continue if only there is valid branchlength

method reCalcMaxDistanceToTip #
reCalcMaxDistanceToTip

recalculate height for each node; height is the max branchlength to get to the tip; start with leaf nodes; calculate accumulative branch * length from it to internal nodes

method MakeNewInternalNode #
MakeNewInternalNode(String, String, Boolean, PhyloNode)

Dec 5, 2011; can be used to make rootnode

Parameters
NameTypeDescription
idString

-

internal_idString

-

isrootBoolean

-

parentnodePhyloNode

-

method reMakeEssentialVariables #
reMakeEssentialVariables(PhyloNode, Int32)

Oct 25, 2013; this is a recursive function the four global variables will be changed in this function: allNodes, leafNodes, hashID2Nodes, hsInternalID2externalID

also fix the parent and descendent relationships

Parameters
NameTypeDescription
nodePhyloNode

-

method newickParser #
newickParser(String, Dictionary(Of String, String), PhyloNode)

created: Oct 20, 2013 : a better and easier to maintain parser for newick and nexus trees NOTE: this is a recursive function

Parameters
NameTypeDescription
inputstrString

: input tree string

hashTranslateDictionary(Of String, String)

: aliases for lead nodes (for nexsus format)

iNodePhyloNode

: current internal node; == rootNode the first time 'newickParser' is called

method newickParser overload 2 #
newickParser(String, Dictionary(Of String, String))

April 4, 2013; bug fix; tree like this ((a:1,b):3,(c:1,(d:1,e:3):1):2); causes bootstrap value == true

Sep 10, 2013 : bug fix, tree with bootstrap but no branch length : ((a,b)0.88,(c,d)0.99)0.99;

Oct 19, 2013: nexus tree with bootstrap scores like this:

method parseInforAndMakeNewLeafNode #
parseInforAndMakeNewLeafNode(String, Dictionary(Of String, String), PhyloNode)

created on Oct 20, 2013 input: the leafstr to be parsed, the internal node the leaf node has to be added to

method nhxParser #
nhxParser(String)

' Nov 28, 2011; nhx format see here for more details: http://phylosoft.org/NHX/ please note that using nhx is now discoraged; use phyloXML instead nhx format shares certain similarities with newick, so sode codes were copied from the newick parser a typical nhx tree would look like: (((ADH2:0.1[&&NHX:S=human:E=1.1.1.1], ADH1:0.11[&&NHX:S=human:E=1.1.1.1]):0.05[&&NHX:S=Primates:E=1.1.1.1:D=Y:B=100], ADHY:0.1[&&NHX:S=nematode:E=1.1.1.1],ADHX:0.12[&&NHX:S=insect:E=1.1.1.1]):0.1[&&NHX:S=Metazoa:E=1.1.1.1:D=N], (ADH4:0.09[&&NHX:S=yeast:E=1.1.1.1],ADH3:0.13[&&NHX:S=yeast:E=1.1.1.1], ADH2:0.12[&&NHX:S=yeast:E=1.1.1.1], ADH1:0.11[&&NHX:S=yeast:E=1.1.1.1]):0.1 [&&NHX:S=Fungi])[&&NHX:E=1.1.1.1:D=N];

Parameters
NameTypeDescription
treestrString

-

method NexusParser #
NexusParser(String)

Dec 1-2, 2011; nexus format; note only the tree part will be processed; other data will be ignored see : http://molecularevolution.org/resources/treeformats for more details a typical nexsus tree looks like: #nexus ... begin trees; translate 1 Ephedra, 2 Gnetum, 3 Welwitschia, 4 Ginkgo, 5 Pinus ; tree one = [&U] * (1,2,(3,(4,5)); tree two = [&U] (1,3,(5,(2,4)); end;

Parameters
NameTypeDescription
treestrString

-

property LeafNodes #
LeafNodes

leaf nodes and leaf node names.


property AllNodes #
AllNodes

all nodes *******************************************************

property treeFormat #
treeFormat
Returns

the treeFormat

property ID #
ID
property InternalID #
InternalID
property Description #
Description
property RootNode #
RootNode
property maxVerticalLevel #
maxVerticalLevel
property maxHorizontalLevel #
maxHorizontalLevel
property HasBranchLength #
HasBranchLength
property AllLeafLabels #
AllLeafLabels
property FirstLeafNode #
FirstLeafNode
property LastLeafNode #
LastLeafNode
property treeDataValid #
treeDataValid
property errorMessage #
errorMessage
property maxTotalBranchLengthFromRootToAnyTip #
maxTotalBranchLengthFromRootToAnyTip
property treeString #
treeString
method hasBootstrapScores #
hasBootstrapScores()
method getNodeByID #
getNodeByID(String)
method getAllAncestors #
getAllAncestors(PhyloNode)
method rerootTree #
rerootTree(PhyloNode)
method getLCA #
getLCA(List(Of String))
method toTreeString #
toTreeString(String, Boolean, Boolean, Boolean)
method ToString #
ToString()
method getExternalIDbyInternalID #
getExternalIDbyInternalID(String)