HQ_filter | R Documentation |
This function accepts a QC_GWAS
dataset and
returns a vector of logical values indicating which entries
meet the quality criteria.
HQ_filter(data, ignore_impstatus = FALSE, FRQ_val = NULL, HWE_val = NULL, cal_val = NULL, imp_val = NULL, filter_NA = TRUE, FRQ_NA = filter_NA, HWE_NA = filter_NA, cal_NA = filter_NA, imp_NA = filter_NA)
data |
table to be filtered. |
ignore_impstatus |
logical; if |
FRQ_val, HWE_val, cal_val, imp_val |
numeric; the minimal required value for allele frequency,
HWE p-value, callrate and imputation quality respectively.
Note that the allele-frequency filter is two-sided: for a
filter-value of |
filter_NA |
logical; if |
FRQ_NA, HWE_NA, cal_NA, imp_NA |
logical; variable-specific
settings for |
A SNP is considered high-quality if it meets all quality criteria. The thresholds are inclusive; i.e. SNPs that have a value equal or higher than the threshold will be considered high-quality.
To filter missing values only, set the filter argument to
NA
, and the corresponding NA-filter to TRUE
.
To disable filtering entirely, set to NULL
. This
disables the filtering of missing values as well.
When imputation status is missing or invalid (and
ignore_impstatus
is FALSE
), only the
allele-frequency filter will be applied.
A vector of logical values, indicating which values in
data
meet (TRUE
) or fail (FALSE
) the
quality criteria.
The table entered in the data
argument must use the
standard column names of QC_GWAS
. Functions
using HQ_filter
usually allow the user to specify a
translation table. If not, translate_header
can
be used to translate the header manually.
data("gwa_sample") selected_SNPs <- HQ_filter(data = gwa_sample, FRQ_val = 0.01, cal_val = 0.95, filter_NA = FALSE) summary(gwa_sample[selected_SNPs, ]) selected_SNPs <- HQ_filter(data = gwa_sample, FRQ_val = 0.01, cal_val = 0.95, filter_NA = FALSE, ignore_impstatus = TRUE) summary(gwa_sample[selected_SNPs, ])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.