gcat | R Documentation |
Performs the GCAT association test between SNPs and trait, returning p-values.
gcat(X, LF, trait, adjustment = NULL) gcatest(X, LF, trait, adjustment = NULL) gcat.stat(X, LF, trait, adjustment = NULL)
X |
A matrix of SNP genotypes, i.e. an integer matrix of 0's,
1's, 2's and |
LF |
matrix of logistic factors from |
trait |
vector |
adjustment |
matrix of adjustment variables |
vector of p-values
gcatest
: Alias of gcat
gcat.stat
: returns the association statistics instead of the
p-value.
Song, M, Hao, W, Storey, JD (2015). Testing for genetic associations in arbitrarily structured populations. Nat. Genet., 47, 5:550-4.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.