snp_test: Calculate genotype-phhenotype associations

View source: R/scones.R

snp_testR Documentation

Calculate genotype-phhenotype associations

Description

Calculate the association between genotypes and a phenotype, adjusting by covariates.

Usage

snp_test(gwas, covars, score, family, link)

Arguments

gwas

A SnpMatrix object with the GWAS information.

covars

A data frame with the covariates. It must contain a column 'sample' containing the sample IDs, and an additional columns for each covariate.

score

Association score to measure association between genotype and phenotype. Possible values: chi2 (default), glm.

family

A string defining the generalized linear model family. This should match one of "binomial", "poisson", "gaussian" or "gamma". See snp.rhs.tests for details.

link

A string defining the link function for the GLM. This should match one of "logit", "log", "identity" or "inverse". See snp.rhs.tests for details.

Value

A named vector with the association scores.


hclimente/martini documentation built on Feb. 26, 2024, 6:23 p.m.