| 88 | |
| 89 | == Other Analysis == |
| 90 | |
| 91 | * Assess Hardy-Weinberg Equilibrium (HWE) using an exact test, |
| 92 | * Use [[https://vcftools.github.io/index.html | vcftools]] option "--hardy" to report a p-value for each site to assess deviation from HWE. VCF file must have genotypes of individuals explicitly reported. |
| 93 | {{{ |
| 94 | vcftools --vcf myVariants.vcf --hardy --out myVariantsHWE |
| 95 | }}} |
| 96 | * Alternatively, R package [[https://cran.r-project.org/web/packages/genetics/index.html | genetics]] can be utilized with counts for each genotype, |
| 97 | {{{ |
| 98 | library(genetics) |
| 99 | g1 = genotype(c(rep("G/G",1),rep("G/A",47),rep("A/A",6450))) |
| 100 | HWE.exact(g1) |
| 101 | }}} |
| 102 | |