@goldingn
I am referring to the ploidy.R script, # 90
Where the main lines are trying to define the proportion of homozygous resistant and susceptible and heterozygous of phenotype.
According to the HWE, the phenotype proportion of homozygous susceptible is p^2, and q^2, and here we are trying to get the proportion of the phenotype that express the heterozygote which is 2pq (p^2+q^2+2pq = 1)
why I added 2 *
The code was:
proportion_het <- proportion_resistant_allele * proportion_susceptible_allele
Actually the code should be :
proportion_het <- 2* proportion_resistant_allele * proportion_susceptible_allele