I tried to create a new module under src/dendropy/calculate/. However, after rebuilding DendroPy from source code, I can not find my module, so I put my code in src/dendropy/calculate/treemeasure.py temporarily.
I put the testing data in Bandelt_Test_Data under the project root directory temporarily.
I write tests in Test_Bandelt_Encoding.ipynb to check that the distance between the original tree and the decoded tree is zero.
I need your help in Tree checking conditions should be added HERE !! section in my code. Can you help me with adding input checking conditions of a valid tree of my Bandelt_encode function because I am not so familiar with built-in functions in Dendropy. Basically, Bandelt algorithm can be used to encode and decode all bifurcating trees. After reading IQ-TREE output, which must be a bifurcating tree, into dendropy, the tree will look like Tree 1 below. What I want to do is to construct a tree like Tree 2 below with my own auxiliary BandeltNode class so that I can do the remaining encoding steps.
(1) Tree 1
/---------------------------------------------------- A
|
+---------------------------------------------------- B
|
| /----------------------------------- C
\----------------+
| /----------------- D
\-----------------+
\----------------- E
(2) Tree 2
/-------------------------------------------------B
A ------+
| /----------------------------------- C
\-----------+
| /----------------- D
\------------+
\----------------- E
If there are any problems that I need to fix, please let me know. And thank you for your help!
src/dendropy/calculate/
. However, after rebuilding DendroPy from source code, I can not find my module, so I put my code insrc/dendropy/calculate/treemeasure.py
temporarily.Bandelt_Test_Data
under the project root directory temporarily.Test_Bandelt_Encoding.ipynb
to check that the distance between the original tree and the decoded tree is zero.Tree checking conditions should be added HERE !!
section in my code. Can you help me with adding input checking conditions of a valid tree of myBandelt_encode
function because I am not so familiar with built-in functions in Dendropy. Basically, Bandelt algorithm can be used to encode and decode all bifurcating trees. After reading IQ-TREE output, which must be a bifurcating tree, into dendropy, the tree will look likeTree 1
below. What I want to do is to construct a tree likeTree 2
below with my own auxiliary BandeltNode class so that I can do the remaining encoding steps.(1) Tree 1
(2) Tree 2
If there are any problems that I need to fix, please let me know. And thank you for your help!
Howard Chao