hierarchical clustering for philogenetic trees