PhyloTree
01 Syntax
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| .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
| Name | Overloads | Summary |
|---|---|---|
| LeafNodes | 1 | leaf nodes and leaf node names. |
| AllNodes | 1 | all nodes |
| treeFormat | 1 | |
| ID | 1 | |
| InternalID | 1 | |
| Description | 1 | |
| RootNode | 1 | |
| maxVerticalLevel | 1 | |
| maxHorizontalLevel | 1 | |
| HasBranchLength | 1 | |
| AllLeafLabels | 1 | |
| FirstLeafNode | 1 | |
| LastLeafNode | 1 | |
| treeDataValid | 1 | |
| errorMessage | 1 | |
| maxTotalBranchLengthFromRootToAnyTip | 1 | |
| treeString | 1 |
04 Members
String, String, String)| Name | Type | Description |
|---|---|---|
treename | String | ϵͳ������������ |
TreestrData | String | �������������ļ����ı����� |
format | String | �ļ���ʽ��nhx, newick, nexus��Ĭ�ϸ�ʽΪphylip��Ĭ�������ʽnewick |
String, PhyloNode)由算法直接构建的 PhyloNode 拓扑构建一棵系统发育树对象。 该构造函数会重建节点的关键变量(距离根的距离、到叶节点的最大距离、水平/垂直层级以及内部哈希索引), 从而使得由算法生成的树同样可以使用 PhyloTree.toTreeString() 输出 Newick 文本。
| Name | Type | Description |
|---|---|---|
name | String | 树的名称 |
root | PhyloNode | 算法计算得到的根节点(内部节点或者无根树的三叉根节点) |
规范化由算法构建的节点:补全空白的内部编号,并依据子节点关系修正 PhyloNode.IsLeaf / PhyloNode.IsRoot 以及父节点引用。
标记当前树包含 bootstrap 支持度数据,从而允许 PhyloTree.toTreeString() 输出内部节点的支持度。
String, PhyloNode)| Name | Type | Description |
|---|---|---|
name | String | 树的名称 |
root | PhyloNode | 算法计算得到的根节点 |
>>>>>>>> >>>>>>>>> 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
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
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
Dec 5, 2011; can be used to make rootnode
| Name | Type | Description |
|---|---|---|
id | String | - |
internal_id | String | - |
isroot | Boolean | - |
parentnode | 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
| Name | Type | Description |
|---|---|---|
node | PhyloNode | - |
created: Oct 20, 2013 : a better and easier to maintain parser for newick and nexus trees NOTE: this is a recursive function
| Name | Type | Description |
|---|---|---|
inputstr | String | : input tree string |
hashTranslate | Dictionary(Of String, String) | : aliases for lead nodes (for nexsus format) |
iNode | PhyloNode | : current internal node; == rootNode the first time 'newickParser' is called |
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:
created on Oct 20, 2013 input: the leafstr to be parsed, the internal node the leaf node has to be added to
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];
| Name | Type | Description |
|---|---|---|
treestr | String | - |
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;
| Name | Type | Description |
|---|---|---|
treestr | String | - |
leaf nodes and leaf node names.
all nodes *******************************************************
the treeFormat
String)List(Of String))String, Boolean, Boolean, Boolean)String)