etetoolkit / ete

Python package for building, comparing, annotating, manipulating and visualising trees. It provides a comprehensive API and a collection of command line tools, including utilities to work with the NCBI taxonomy tree.
http://etetoolkit.org
GNU General Public License v3.0
768 stars 216 forks source link

Implement ladderize method to avoid maximum recursion depth error #715

Closed harryrichman closed 8 months ago

harryrichman commented 8 months ago

The current ladderize method in the Tree class uses pure recursion, which can result in a RecursionError for a sufficiently large tree. If the implementation is modified to use memoization, then this recursion error could be avoided.

jordibc commented 8 months ago

Closed thanks to https://github.com/etetoolkit/ete/pull/716