shawnlaffan / biodiverse

A tool for the spatial analysis of diversity
http://shawnlaffan.github.io/biodiverse/
GNU General Public License v3.0
75 stars 19 forks source link

Indices - Local PD fails when there are no branches in the sample #873

Closed shawnlaffan closed 1 year ago

shawnlaffan commented 1 year ago

To reproduce, run a spatial analysis with at least one group that has no labels on the tree. A spatial analysis will die without completing.

The root cause is in get_last_shared_ancestor_from_subtree as it does not check for no branches in the sample.

First reported at https://groups.google.com/g/biodiverse-users/c/CqJEZOd2y8U

The workaround for now is to trim the basedata to match the tree (under the basedata menu).