
Perform Statistical Test for Gene-Phenotype Association
perform_pheno_test.RdThis function takes a dataframe containing mean SHAP values for a gene and a phenotypic variable, checks for normality, and automatically selects the appropriate statistical test (correlation for numeric variables, t-test or ANOVA for normally distributed groups, and non-parametric tests otherwise). It also reports an effect size and, where applicable, the direction of the association.