gcat: Genotype Conditional Association TEST

View source: R/gcat.R

gcatR Documentation

Genotype Conditional Association TEST

Description

Performs the GCAT association test between SNPs and trait, returning p-values.

Usage

gcat(X, LF, trait, adjustment = NULL)

gcatest(X, LF, trait, adjustment = NULL)

gcat.stat(X, LF, trait, adjustment = NULL)

Arguments

X

A matrix of SNP genotypes, i.e. an integer matrix of 0's, 1's, 2's and NAs. BEDMatrix is supported. Sparse matrices of class Matrix are not supported (yet).

LF

matrix of logistic factors from lfa::lfa()

trait

vector

adjustment

matrix of adjustment variables

Value

vector of p-values

Functions

  • gcatest(): Alias of gcat

  • gcat.stat(): returns the association statistics instead of the p-value.

References

Song, M, Hao, W, Storey, JD (2015). Testing for genetic associations in arbitrarily structured populations. Nat. Genet., 47, 5:550-4.

Examples

library(lfa)

# make example data smaller so example is fast
# goes from 1000 to 100 individuals
indexes <- sample.int( ncol(sim_geno), 100 )
sim_geno <- sim_geno[ , indexes ]
sim_trait <- sim_trait[ indexes ]

# now run LFA and GCATest
LF <- lfa(sim_geno, 3)
gcat_p <- gcat(sim_geno, LF, sim_trait)
gcat_stat <- gcat.stat(sim_geno, LF, sim_trait)

StoreyLab/gcatest documentation built on March 7, 2024, 9:59 p.m.