Learn R Programming

AllelicSeries (version 0.1.1.5)

ASBT: Allelic Series Burden Test

Description

Burden test with allelic series weights.

Usage

ASBT(
  anno,
  geno,
  pheno,
  apply_int = TRUE,
  covar = NULL,
  indicator = FALSE,
  is_pheno_binary = FALSE,
  method = "none",
  min_mac = 0,
  return_beta = FALSE,
  score_test = FALSE,
  weights = c(1, 2, 3)
)

Value

If return_beta = TRUE, a list of including the effect size data.frame "betas" and the p-value "pval". If return_beta = FALSE, a numeric p-value.

Arguments

anno

(snps x 1) annotation vector with integer values in 1 through the number of annotation categories L.

geno

(n x snps) genotype matrix.

pheno

(n x 1) phenotype vector.

apply_int

Apply rank-based inverse normal transform to the phenotype? Default: TRUE. Ignored if phenotype is binary.

covar

(n x p) covariate matrix. Defaults to an (n x 1) intercept.

indicator

Convert raw counts to indicators?

is_pheno_binary

Is the phenotype binary? Default: FALSE.

method

Method for aggregating across categories: ("none", "max", "sum"). Default: "none".

min_mac

Minimum minor allele count for inclusion. Default: 0.

return_beta

Return the estimated effect size? Default: FALSE.

score_test

Run a score test? If FALSE, performs a Wald test.

weights

(L x 1) vector of annotation category weights. Note that the number of annotation categories L is inferred from the length of weights.

Examples

Run this code
# Generate data.
data <- DGP(n = 1e3, snps = 1e2)

# Run the Allelic Series Burden Test.
# Note: the output is a scalar p-value.
results <- ASBT(
  anno = data$anno,
  geno = data$geno,
  pheno = data$pheno,
  covar = data$covar
)

Run the code above in your browser using DataLab