You can calculate the frequency of P and Q by counting the number of each type of allele and subsequently dividing them by the total number of alleles (so the sum of both). Read more