filter_subset: Subset Dataset Based on Filter Results

Description Usage Arguments Value

Description

filter_subset uses the original genotypes and the vector returned by snp_filter to create a new dataset that contains only the variables that pass through the user-specified threshold for p-values or distance correlations. If a window is used, the returned dataset will include all of the SNPs in a window for a SNP that meets the threshold.

Usage

1
filter_subset(x, results, type = "dc", threshold, window = 1)

Arguments

x

A matrix or dataset containing the genotypes for each observation. The number of variables must match the number of elements in the results vector.

results

A vector of p-values or distance correlations, preferably the output vector from the snp_filter function. The length of results must be equal to the number of variables in x.

type

The type of measure in the results vector. The default is "dc" for distance correlations. If a different string is used it is assumed that the vector contains p-values.#'

threshold

This value can either be decimal less than 1 or a positive integer. If a number less than 1 and if the results are p-values, all SNPs with a p-value less than the threshold will be retained. If the results are distance correlations, all SNPs with a value greater than the threshold will be retained. A positive integer indicates how many SNP should pass through the filter.

window

This is the size of the window used in the initial filter. If a window was used in the snp_filter function. The dataset that is returned will contain the selected SNP and the SNPs in the window around the SNP.

Value

Returns a dataset that contains the SNPs that pass through the user specified threshold. The output can be used directly as an input into the elasticnet function in this package.


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