To find p-value of compounds (pairwise)
You can get standardised residuals from chisq.test and convert these to p-values, but it's not recommended. The frequencies of each genotype depend on the counts of all other genotypes, so the p-values aren't independent and they aren't corrected for multiple testing, but if you must:  

pnorm(-abs(chisq.test(tmp[,c('A','B')])$stdres)))