Description Usage Arguments Examples
View source: R/check_zero_pvalues.R
Check zero p-values
1 | check_zero_pvalues(dataset)
|
dataset |
single POEMColoc dataset |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | dataset_full <- list(pos = c(1, 2, 3, 4, 5), MAF = c(0.14, 0.15, 0.25, 0.2, 0.4), N=1000, type ="quant", pvalues = c(2 * 10^-8, 4 * 10^-8, 2 * 10^-4, 0.6, 0.03), chr= "Z")
dataset_top_SNP <- list(pos = 2, N= 10000, s =0.5, type="cc", pvalues = 10^-9, chr = "Z")
dataset_empty <- list(pos = 2, N= 10000, s =0.5, type="cc", pvalues = c(), chr = "Z")
# Should pass
check_zero_pvalues(dataset_full)
check_zero_pvalues(dataset_top_SNP)
# Should fail
dataset_top_SNP_zero_p <- list(pos = 2, N= 10000, s =0.5, type="cc", pvalues = 0, chr = "Z")
dataset_full_zero_p <- list(pos = c(1, 2, 3, 4, 5), MAF = c(0.14, 0.15, 0.25, 0.2, 0.4), N=1000, type ="quant", pvalues = rep(0,5), chr= "Z")
try(check_zero_pvalues(dataset_top_SNP_zero_p))
try(check_zero_pvalues(dataset_full_zero_p))
try(check_zero_pvalues(dataset_empty))
# Should warn
dataset_full_zero_p2 <- list(pos = c(1, 2, 3, 4, 5), MAF = c(0.14, 0.15, 0.25, 0.2, 0.4), N=1000, type ="quant", pvalues = c(0, 0, 10^-5, 0, 0), chr= "Z")
check_zero_pvalues(dataset_full_zero_p2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.