calculate ad hoc distance thresholds for DNA barcoding