Add function to cluster SNPs