Folks often use tests for Hardy-Weinberg equilibrium (HWE) to evaluate random mating in a population. In diploids this makes sense, as HWE is fulfilled after one or two rounds of random mating. However, in autopolyploids, it can take many rounds of random mating before a population is close to equilibrium, which drives the need to create separate tests for random mating.

That’s what I did in my new preprint (Gerard, 2022). I created new Bayesian approaches to random mating. Why Bayes? Well, (i) Bayesian approaches often do not rely on asymptotic approximations of some data generating process, so can work for small samples, (ii) it is easy to modify Bayesian methods to account for added variability, such as that caused by genotype uncertainty, and (iii) Bayes factors automatically calibrate themselves with increasing sample size so that under the null the Type I error rate goes to zero as the sample size increases. To do this in a frequentist approach, you would need to decrease the significance level as the sample size increases, but this is rarely done in practice.

Let me show you one cool use of these methods. In diploids, HWE tests are often used to detect genotyping errors, so I tried to see if in autopolyploids random mating tests could also be used this way. In the following figure, I have two fits from my {updog} software applied to some tetraploid sturgeon data. The x-axis denotes alternative counts, the y-axis denotes reference counts, the lines denote expected counts under the model fit, and the colors represent genotype estimates. The left plot is the maximum likelihood estimate, and the right plot is a local mode.

Folks would typically use the left plot’s genotype estimates. But, if you run the random mating test on these two fits, the left one would indicate violations from random mating while the right one would indicate no violations from random mating. Since the rest of the loci in these data also indicate that there is random mating, I would actually use the right plot’s fits.

Check out my preprint:

Gerard D (2022). Bayesian tests for random mating in autopolyploids. *bioRxiv*. <doi:10.1101/2022.08.11.503635>.