Return the p-value from an exact test of HWE.

loci_hwe(.x, ...)

# S3 method for class 'tbl_df'
loci_hwe(.x, mid_p = TRUE, ...)

# S3 method for class 'vctrs_bigSNP'
loci_hwe(.x, mid_p = TRUE, ...)

# S3 method for class 'grouped_df'
loci_hwe(.x, ...)

Arguments

.x

a vector of class vctrs_bigSNP (usually the genotypes column of a gen_tibble object), or a gen_tibble.

...

not used.

mid_p

boolean on whether the mid-p value should be computed. Default is TRUE, as in PLINK.

Value

a vector of probabilities from HWE exact test, one per locus

Details

This function uses the original C++ algorithm from PLINK 1.90.

NOTE There are no tests for this function yet! Unit tests are needed.

Author

the C++ algorithm was written by Christopher Chang for PLINK 1.90, based on original code by Jan Wigginton (the code was released under GPL3).