testHardyWeinberg(sizes, bestConf,
polyCent = generatePolyCenters(ploidy="di"),
afList = seq(0, 0.5, 0.05))polyCentgeneratePolyCenters At duplicated loci, the observed B allele frequency (BAF) is in
fact the mean BAF across both paralogues. For MSV-5 markers, which are
segregating in both paralogs, the individual BAFs may be estimated
assuming different candidate values at one paralogue. Several values
of BAF for one paralogue are set in afList, such that
the BAF for the other paralogue is given. A value of 0.5 means
the BAF is the same at both loci. All values are tested for HW, and
the most likely BAF at both paralogs are those resulting in the
highest p-value. The accuracy of these estimates increases with the
degree of HW equilibrium.
callGenotypes#Arbitrary MSV-5 marker
sizes <- c(30, 200, 1600, 700, 400)
polyCent <- generatePolyCenters(ploidy='tetra')
HWstats <- testHardyWeinberg(sizes,'MSV-5',polyCent=polyCent)
print(HWstats)Run the code above in your browser using DataLab