Students made the connection to why you would get a good approximation of a normal distribution when you have a large number of loci. However, I thought though that it would be pretty easy to make a web page with the R package Shiny that would recapitulate this graph and let your students see how things change as a function of the different parameters involved. The solution that I wrote up includes parameters for:
a: genotypic value - this is just the phenotypic measure of the homozygous A2A2 in contrast, the A1A1 homozygote will have a phenotypic measure of -a.
d: degree of dominance- the measure of how the heterozygous individual deviates from the expected value of 0 (a-a).
mean p: mean allele frequency- unlike in the example I want to allow allele frequency at each locus to be a random draw from a truncated normal distribution with a minimum value of 0 and a maximum value of 1.
var p: variance in allele frequency- just describes the distribution that we are drawing allele frequencies from.
loci: the number of loci affecting the trait of interest.
samp: sample size- rather than calculating the probabilities I want to take samples from a population to reinforce the importance and impact of sample size on our ability to understand a system.
Finally, I have a resample button that lets us go take another sample from the population.
Here is a link to the web app: https://popgensim.shinyapps.io/loci_num/
I should probably get back to writing papers and applying for faculty positions!
cheers
Add a comment