DESPOTA: a permutation test algoritm to detect a partition from a dendrogram