This is traditional chisq_test.
chisq_test(z_vector, cov_mat)
Column vectorized data matrix with rows represent phenotype and columns represent genotype.
Estimated covariance matrix of z_vector.
A numeric value represent the p value of chi-square test.