RWAS: RWAS: Rare-Variant Weighted Aggregate Statistic

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/RWAS.R

Description

The RWAS method has been proposed by Sul et al (2011) as a pooling method that groups variants and computes a weighted sum of differences between case and control mutation counts where weights are estimated from data. Under the null hypothesis the RWAS statistic has an asymptotic standard normal distribution, but a permutation procedure can also be applied to assess statistical significance

Usage

1
  RWAS(y, X, maf = 0.05, perm = NULL)

Arguments

y

numeric vector with phenotype status: 0=controls, 1=cases. No missing data allowed

X

numeric matrix or data frame with genotype data coded as 0, 1, 2. Missing data is allowed

maf

numeric value indicating the minor allele frequency threshold for rare variants (ma f=0.05 by default)

perm

positive integer indicating the number of permutations (NULL by default)

Details

There is no imputation for the missing data. Missing values are simply ignored in the computations.

Value

An object of class "assoctest", basically a list with the following elements:

rwas.stat

rwas statistic

asym.pval

asymptotic p-value

perm.pval

permuted p-value, only when perm is used

args

descriptive information with number of controls, cases, variants, rare variants, maf and permutations

name

name of the statistic

Author(s)

Gaston Sanchez

References

Sul JH, Han B, He D, Eskin E (2011) An Optimal Weighted Aggregated Association Test for Identification of Rare Variants Involved in Common Diseases. Genetics, 188: 181-188

See Also

CMC

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  ## Not run: 
  
  # number of cases
  cases = 500

  # number of controls 
  controls = 500

  # total (cases + controls)
  total = cases + controls

  # phenotype vector
  phenotype = c(rep(1, cases), rep(0, controls))

  # genotype matrix with 10 variants (random data)
  set.seed(1234)  
  genotype = matrix(rbinom(total*10, 2, 0.051), nrow=total, ncol=10)

  # apply RWAS with maf=0.05 and 500 permutations
  myrwas = RWAS(phenotype, genotype, maf=0.05, perm=500)
  myrwas
  
## End(Not run)

Example output

Loading required package: mvtnorm

 	 RWAS: Rare-Variant Weighted Aggregate Statistic 

Info: 
   cases  controls  variants   rarevar       maf   n.perms  
     500       500        10         5      0.05       500  

rwas.stat   asym.pval   perm.pval   
-0.875581    0.809371    0.828000   

AssotesteR documentation built on May 2, 2019, 3:55 a.m.