calculate allele frequencies of groups in hapmap