How to calculate allele frequency.