CollapsABEL (version 0.10.11)

assocFilter: Filter a PlGwasC object by the results of a plink --assoc run

Description

This is meant for reduction in computational burden. The plink --assoc does not accept covariates makes some assumptions accordingly, and thus runs faster than --linear and --logistic. SNPs that does not produce a p-value more significant than a user-set threshold will be filtered out. A new PLINK file is made and a corresponding new PlGwasC object is returned.

Usage

assocFilter(pl_gwas, plink_out_stem = NULL, p_threshold = 0.1, db_setup = FALSE, force = TRUE)

Arguments

pl_gwas
PlGwasC object
plink_out_stem
character. Output plink file stem (without .bed extension). The default is to add a "_filtered_RANDOM_ID" suffix to the original.
p_threshold
numeric. P-value threshold.
db_setup
logical. Whether to setup the PlGwasC object.
force
logical. Overwrite existing PLINK files.

Value

a new PlGwasC object.

Examples

Run this code
## Not run: 
# rbed_info = rbedInfo(bedstem = "mmp13", db_setup = FALSE)
# pl_gwas = plGwas(rbed_info, 
# 		pheno = "mmp13.phe",
# 		pheno_name = "Page", 
# 		gwas_tag = "mmp13_page_sex_age")
# runGwas(pl_gwas)
# x = readGwasOut(pl_gwas, c("SNP", "P"), rmGwasOut = FALSE)
# pl_gwas1 = assocFilter(pl_gwas, p_threshold = 0.001)
# runGwas(pl_gwas1)
# x1 = readGwasOut(pl_gwas1, c("SNP", "P"), rmGwasOut = FALSE)
# y = dplyr::inner_join(x, x1, by = "SNP")
# all(y$P.x == y$P.y)
# all(y$P.y < 0.001)
# ## End(Not run)

Run the code above in your browser using DataCamp Workspace