This function implements rare variant test with full MIRAGE model with both variant and gene level

mirage(
  data,
  n1,
  n2,
  gamma = 3,
  sigma = 2,
  eta.init = 0.1,
  delta.init = 0.1,
  estimate.delta = TRUE,
  max.iter = 10000,
  tol = 1e-05,
  verbose = TRUE
)

Arguments

data

variant count data, a 5 column data frame for 1) locus ID, 2) Gene 3) count in cases, 4) count in controls and 5) variant category index for a variant. The 1st column is optional.

n1

sample size in cases.

n2

sample size in controls.

gamma

a list of category specific hyper prior shape parameter in Beta distribution for effect size, or a numeric value if all category share the same effect size.

sigma

a list of category specific hyper prior scale parameter in Beta distribution for effect size, or a numeric value if all category share the same effect size.

eta.init

initial value for prior on proportion of risk variants in a variant set.

delta.init

initial value for prior on proportion of risk genes. Must be a positive number between 0 and 1.

estimate.delta

When TRUE delta is to be estimated and FALSE delta is fixed at delta.init

max.iter

maximum number of iterations enforcing EM algorithm to stop

tol

threshold of parameter estimate difference to determine the convergence of EM algorithm

Value

BF.PP.gene

Bayes factor and posterior probability of genes

delta.est

Estimate for proportion of risk genes

delta.pvalue

Significant test for delta = 0

eta.est

Estimate for proportion of risk variants in a variant group

eta.pvalue

Significant test for eta = 0

BF.all

a list of Bayes factor for all variants in a gene

Examples

# see example at https://xinhe-lab.github.io/mirage/articles/mwe.html