This function identifies SNP markers whose Hardy-Weinberg equilibrium (HWE) chi-square p-values indicate significant deviation beyond a specified threshold. It uses the p-values computed by get.hwe.chi2 on the input summary data frame.

check.snp.hwe.chi2(snp.summary, max.dev)

Arguments

snp.summary

A data frame or matrix containing summary statistics for SNP markers. The row names should correspond to SNP identifiers. It must be compatible with the function get.hwe.chi2.

max.dev

A numeric value specifying the maximum acceptable p-value threshold. SNPs with p-values below this threshold are considered as deviating from HWE.

Value

A character vector of SNP identifiers (rownames) that fail the HWE test (p-value < max.dev). If no SNPs fail, an empty vector is returned.

Details

Any SNP with missing p-value (NA) is treated as not failing (returned as FALSE).

See also

Examples

# Example usage (assuming snp.summary is precomputed and get.hwe.chi2 is defined)
# snps_failed <- check.snp.hwe.chi2(snp.summary, max.dev = 0.05)