Description Usage Arguments Value
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.
1 | filter_subset(x, results, type = "dc", threshold, window = 1)
|
x |
A matrix or dataset containing the genotypes for each
observation. The number of variables must match the number of
elements in the |
results |
A vector of p-values or distance correlations,
preferably the output vector from the |
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 |
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.