Starting gl.report.hwe
Processing genlight object with SNP data
Analysing each population separately
`geom_line()`: Each group consists of only one observation.
ℹ Do you need to adjust the group aesthetic?
Reporting significant departures from Hardy-Weinberg
Equilibrium
No significant departures
Completed: gl.report.hwe
There were 50 or more warnings (use warnings() to see the first 50)
> warnings()
Warning messages:
1: In HardyWeinberg::HWChisq(X[i, ], verbose = FALSE) :
Expected counts below 5: chi-square approximation may be incorrect
2: In HWf(X) : Monomorphic marker, f set to zero.
3: In HardyWeinberg::HWChisq(X[i, ], verbose = FALSE) :
Expected counts below 5: chi-square approximation may be incorrect
4: In HardyWeinberg::HWChisq(X[i, ], verbose = FALSE) :
Expected counts below 5: chi-square approximation may be incorrect
Hi Gabriella,
This is a warning from the chi2 test as it requires that your counts (genotypes, estimated and observed) need to be above 5 to be valid. You could use an exact fisher test if a particular loci is in doubt.
It depends a bit on your sample sizes if I would trust the test (e.g. do you have more like 10 or 100 individuals on your (sub) populations.
Regards, Bernd
--
You received this message because you are subscribed to the Google Groups "dartR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
dartr+un...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/dartr/b2567421-3a5c-4b80-ab17-9495acca014en%40googlegroups.com.
final_dataset,
subset = "each",
method_sig = "Exact",
multi_comp = TRUE,
multi_comp_method = "BY",
alpha_val = 0.05,
pvalue_type = "midp",
cc_val = 0.5,
sig_only = TRUE,
min_sample_size = 5,
plot.out = TRUE,
max_plots = 4,
save2tmp = FALSE,
verbose = NULL
)
>
Outcome messages:
< Starting gl.report.hwe
Processing genlight object with SNP data
Analysing each population separately
Reporting significant departures from Hardy-Weinberg
Equilibrium
No significant departures
Completed: gl.report.hwe
There were 50 or more warnings (use warnings() to see the first 50)
warnings()
Warning messages:
1: In HardyWeinberg::HWChisq(X[i, ], verbose = FALSE) :
Expected counts below 5: chi-square approximation may be incorrect
2: In HWf(X) : Monomorphic marker, f set to zero.
3: In HardyWeinberg::HWChisq(X[i, ], verbose = FALSE) :
Expected counts below 5: chi-square approximation may be incorrect
... (ALL THE SAME warnings) ...
>
With this dataset (with all populations min sample size = 20 individuals), I don't seem to get anymore the warning (?) message "geom_line()`: Each group consists of only one observation. ℹ Do you need to adjust the group aesthetic?". However, I keep getting the warnings "Expected counts below 5: chi-square approximation may be incorrect".
So, I am wondering whether this is normal, if it's an issue with the function or with my data, but with this dataset the sample size of each population is quite good (20) and the MAF threshold applied is quite high (0.05)...so I am not sure why I would incur in the issue of "expected counts below 5" for HWE?
Is there something I am missing? Also, does this message really apply to me as I did not use ChiSquare but Fisher Exact test?
Thanks a lot for any assistance you can provide!
I just need to understand if I can trust the results, I guess.
Thanks!
Gabriella