CollapsABEL (version 0.10.11)

runTypeI: Run simulations to control type-I error

Description

Simulate a new phenotype N times and run GCDH with each. The phe_fun function is used to generate new phenotype file. When this function is not given, the phenotype file from the PlGwasC object will be permuted and used as the new phenotype file (permutation analysis). Thus when no phe_fun is supplied, this function can be used to survey p-values under the null distribution. A threshold for Genome-wide significance can be calculated from these p-values by 5 any other alpha-level) quantile.

Usage

runTypeI(pl_gwas, n_shift, n_simu, phe_fun = NULL, dist_threshold = 5e+05, p_threshold = NULL, collapse_matrix = NULL, rm_shifted_files = TRUE)

Arguments

pl_gwas
PlGwasC object
n_shift
integer. n_shift for each GCDH run.
n_simu
integer. Number of simulations to run.
phe_fun
function. Used to generate new phenotype file.
dist_threshold
See runGcdh.
p_threshold
numeric or NULL. When it's not NULL, the PlGwasC object is filtered by assocFilter first.
collapse_matrix
See runGcdh.
rm_shifted_files
See runGcdh.

Value

A list with the following members: (1) tag of this simulation, can be used to remove related files. (2) a list of SNP pairs. If "snp_pair" is a member of the result from phe_fun, then this list will be non-empty, otherwise it will be empty. (3) a list of reports from all the GCDH analysis. (4) global minimal p-values of the single-SNP approach. (4) global minimal p-values of GCDH.