SNP.category {milorGWAS} | R Documentation |
SNP.category
Description
SNP.category
Usage
SNP.category(bed, Z, threshold = 0.8)
Arguments
bed |
A bed matrix |
Z |
A vector of length |
threshold |
Variance thresholds |
Details
This function determines a SNP Category from a covariable Z
,
which can be for example an indicator variable for a population strata,
or the first genomic principal component.
Value
A factor giving the category of each SNP
See Also
Examples
# a random vector of categories
ca <- sample(c("A","B","C"), 1e6, TRUE, c(0.05, 0.9, 0.05))
# a vector of p-values, with different distribution depending on the strata
p <- runif(1e6)**ifelse(ca == "A", .8, ifelse(ca == "B", 1, 1.2))
qqplot.pvalues(p, ca)
[Package milorGWAS version 0.7 Index]