commfish / GCLr

Gene Conservation Lab R package repository
3 stars 0 forks source link

plot_freq_fis_4snps is broken #94

Closed awbarclay closed 3 weeks ago

awbarclay commented 3 weeks ago

This function is using a deprecated function from the HardyWeinberg package (HWExactMat). The package defaults to the new function (HWEXactStats) which returns a vector instead of a data frame causing the function to throw and error. Another issue is the way the allele frequencies are added to the HWE_df object in the function. The vector of allele 1 proportions is added to HWE_df by assigning it directly to a column; however, the two objects may not be in the same order. I noticed this in a plot when a population had only hets, but the allele frequency was 100% to one allele. This needs a hot fix soon.