single_snp_association: Calculate genotype-phhenotype associations

Description Usage Arguments Value

View source: R/scones.R

Description

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

Usage

1
2
3
4
5
6
single_snp_association(
  gwas,
  covars,
  score,
  samples = rep(TRUE, nrow(gwas[["fam"]]))
)

Arguments

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

String with the association test to perform. Possible values: chi2, glm.

genotypes

A SnpMatrix object with the genotype information.

phenotypes

A numeric vector with the phenotypes.

Value

A named vector with the association scores.


martini documentation built on Nov. 8, 2020, 5:39 p.m.