This function implements rare variant test only at variant level

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

Arguments

data

variant count data, a 4 column data frame for column 1: variant ID 2: No.variant in cases 3 No.variant in control 4 variant group index

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.

estimate.eta

When TRUE eta is to be estimated and FALSE eta is fixed.eta MUST be provided and BF per gene will be reported.

fixed.eta

fixed.eta must be provided when estimate.eta is false

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

eta.est

Estimate for proportion of risk variants in a variant group and p values

PP

Posterior probabilities

Examples

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