compute$single.variant.associations

Perform GWAS for Model Variants

Description

Executes genome-wide association tests for PRS variants against one or more phenotypes. Optional covariates (e.g., principal components) can be included to correct for population stratification.

Usage

`compute$single.variant.associations`(data, phenotypes, variants = NULL, covariates = NULL)

Arguments

data

A PolyGeniusData object.

phenotypes

Unquoted expression(s) resolved via data$fetch() on the observation side. These must evaluate to numeric or binary-factor vectors aligned with data$obs_names.

variants

Optional data.frame with columns chr and position. If NULL, variants are derived from data$mod$models.

covariates

Optional unquoted expression(s) resolved via data$fetch() on the observation side. These are passed as covariates to the association models.

Value

A data.frame of single-variant association results. The returned object carries log metadata accessible via slotLog().