specifysystems / lmpy

A library of tools useful for Lifemapper and related computations
GNU General Public License v3.0
2 stars 0 forks source link

Implement a tree matrix that can be used for computing statistics #98

Closed cjgrady closed 3 years ago

cjgrady commented 3 years ago

Is your feature request related to a problem? Please describe. Dendropy is too slow and uses too much memory for some statistics. I have roughly designed a method for quickly generating some of these statistics and subsetting a tree by using a matrix of tip rows and node columns where the value of each cell is the distance from the tip to the node.

Implement and thoroughly test this method to ensure that it can be used for metric computations and is fast enough to use for large projects like ancient angiosperms.

cjgrady commented 3 years ago

It may be appropriate to keep this code in a Biotaphy repository instead of including it in the next lmpy release. If so, move this issue to a different repo or take it out of the 3.0 release milestone. This does need to be sorted out for the ancient angiosperms project to move forward.

cjgrady commented 3 years ago

At this time, I don't know that this needs to be its own class so I've added a tool to encode a Tree into a couple of Matrix objects for computations. It can be moved into main modules later if desired.