Description Usage Arguments Value
snp_filter
performs the preliminary filter calculations. Filters can
be either distance correlation or linear/logistic regression. The function
will determine if the phenotype is binary and will select the correct
model type for the user when the linear/logistic regression option
is selected. Although the documentation is written in terms of GWAS
data, the function can be used on any dataset with numeric variables.
1 | snp_filter(x, y, type = "dc", window = 1, fdr = TRUE)
|
x |
A matrix or dataset containing the genotypes for each observation. |
y |
A numeric vector containing the phenotypes. Can be binary or continuous. |
type |
The type of filter to perform. The default is distance correlation. If any string is insterted other than "dc", either linear regression or logistic regression will be used as the filter. |
window |
The size of the window, or neighborhood, around each SNP that will be used to compute the linear or logistic regression model. If a window of 10 is chosen, the five SNPs on either side of the selected SNPs will be used to compute the distance correlation or linear model. The default is single SNP analysis. |
fdr |
If TRUE, the false-discovery rate correction for the p-value is returned instead of the raw p-values. If type = "dc", this is ignored. |
Returns a vector that contains the distance correlations or p-values for each observation. If window = 1, the p-value is the p-value for the coefficient of the SNP. If window > 1 the p-value is from the likelihood ratio test for the model.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.