View source: R/jackstraw_alstructure.R
jackstraw_alstructure | R Documentation |
Test association between the observed variables and population structure estimated by ALStructure.
jackstraw_alstructure(
dat,
r,
FUN,
r1 = NULL,
s = NULL,
B = NULL,
covariate = NULL,
verbose = TRUE
)
dat |
a genotype matrix with |
r |
a number of significant LFs. |
FUN |
a function to ALStructure |
r1 |
a numeric vector of LFs of interest (implying you are not interested in all |
s |
a number of “synthetic” null variables. Out of |
B |
a number of resampling iterations. There will be a total of |
covariate |
a data matrix of covariates with corresponding |
verbose |
a logical specifying to print the computational progress. |
This function uses ALStructure from Cabreros and Storey (2019). A deviation dev
in logistic regression
(the full model with r
LFs vs. the intercept-only model) is used to assess association.
This function also requires the Bioconductor gcatest
package to be installed.
jackstraw_alstructure
returns a list consisting of
p.value |
|
obs.stat |
|
null.stat |
|
Neo Christopher Chung nchchung@gmail.com
Chung and Storey (2015) Statistical significance of variables driving systematic variation in high-dimensional data. Bioinformatics, 31(4): 545-554 \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1093/bioinformatics/btu674")}
jackstraw_pca jackstraw
## Not run:
# load genotype data to analyze (not shown) into this variable
X
# choose the number of ancestries
r <- 3
# load alstructure package (install from https://github.com/StoreyLab/alstructure)
library(alstructure)
# define the function this way, a function of the genotype matrix only
FUN <- function(x) t( alstructure(x, d_hat = r)$Q_hat )
# calculate p-values (and other statistics) for each SNP
out <- jackstraw_alstructure( X, r, FUN )
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.