emmanuelparadis / ape

analysis of phylogenetics and evolution
http://ape-package.ird.fr/
GNU General Public License v2.0
52 stars 11 forks source link

Cannot compute distance #86

Closed fullertonhe closed 1 year ago

fullertonhe commented 1 year ago

I have an ape generated tree for ASV data, but when I try to calculate the distance, it fails with "Error in dist.nodes(x) : tree too big"

emmanuelparadis commented 1 year ago

There is a hard limit for computing the total cophenetic matrix of a tree. This limit applies to the number of tips + number of (internal) nodes and is set to 46,340. It's not possible to go beyond this limit without modifying the internal code (and recompiling/installing ape). How big is your tree?

emmanuelparadis commented 1 year ago

I've improved the internal code so that there is no more this limit. But dist.nodes builds a square matrix which will require a lot of memory with big trees. This new code has been pushed on GH.