Learn R Programming

GRSxE (version 1.0.1)

GxE: Testing individual gene-environment interactions

Description

Function for testing univariate GxE interactions, e.g., using single SNPs or a GRS.

Usage

GxE(G, y, E, C = NULL)

Value

An object of class glm is returned, in which G:E

describes the GxE term.

Arguments

G

Numeric vector of a genetic variable such as a GRS (genetic risk score) or a SNP coded as 0-1-2.

y

Numeric vector of the outcome/phenotype. Binary outcomes such as a disease status should be coded as 0-1 (control-case).

E

Numeric vector of the environmental exposure.

C

Optional data frame containing potentially confounding variables to be adjusted for.

Details

This function uses a GLM (generalized linear model) for modelling the marginal genetic effect, marginal environmental effect, the GxE interaction effect, and potential confounding effects. The fitted GLM is returned, which can be, e.g., inspected via summary(...) to retrieve the Wald test p-values for the individual terms. The p-value corresponding to the G:E term is the p-value for testing the presence of a GxE interaction.

References

  • Lau, M., Kress, S., Schikowski, T. & Schwender, H. (2023). Efficient gene--environment interaction testing through bootstrap aggregating. Scientific Reports 13:937. tools:::Rd_expr_doi("https://doi.org/10.1038/s41598-023-28172-4")