biotite
biotite copied to clipboard
`RecursionError` in `TreeNode.from_newick()`
When a Tree
is created from a large number of sequences, the following error occurs:
src/biotite/sequence/phylo/tree.pyx:323: in biotite.sequence.phylo.tree.Tree.from_newick
root, distance = TreeNode.from_newick(newick, labels)
src/biotite/sequence/phylo/tree.pyx:921: in biotite.sequence.phylo.tree.TreeNode.from_newick
child, dist = TreeNode.from_newick(
src/biotite/sequence/phylo/tree.pyx:921: in biotite.sequence.phylo.tree.TreeNode.from_newick
child, dist = TreeNode.from_newick(
RecursionError: maximum recursion depth exceeded while calling a Python object
The reason is that from_newick()
uses recursion to create the tree, which is limited to a certain depth in Python.