snp_filter: First Phase Filtering

Description Usage Arguments Value

Description

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.

Usage

1
snp_filter(x, y, type = "dc", window = 1, fdr = TRUE)

Arguments

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.

Value

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.


jillbo1000/gwas3 documentation built on June 14, 2019, 3:08 a.m.