weightFuncs: Weighting Functions

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

Description

Functions for computing SNV weights from minor allele frequences (MAF)

Usage

1
2
3
betaWeights(x, shape1=1, shape2=25)
logisticWeights(x, th=0.07, slope=150)
invSdWeights(x)

Arguments

x

a numeric vector of minor allele frequencies (MAFs); see details below

shape1,shape2

shape parameters of Beta distribution weighting function (see dbeta for details)

th,slope

parameters of the logistic weighting function (see details below)

Details

The function betaWeights is a wrapper around the dbeta function. It uses the same parameters shape1 and shape2, but does not support the non-centrality parameter ncp. The defaults are shape1=1 and shape2=25 as suggested by Wu et al. (2011) and implemented in the SKAT package. If called without argument x, a function with a single argument x is returned that can directly be used as weighting function, e.g. passed as weightFunc argument to the assocTest method.

The function logisticWeights provides a logistic weighting that corresponds to a soft threshold function. The th parameter corresponds to the threshold and the slope parameter corresponds to the steepness of the soft threshold. Like betaWeights, this function can be called without x argument to produce a parameter-free weighting function.

The function invSdWeights computes weights as suggested by Madsen and Browning (2009). For consistency, this function also returns a single-argument function if called without x argument.

For mathematical details, see Subsection 9.3 of the package vignette.

Value

a numeric vector with weights as long as the argument x, a function if x was missing;

Author(s)

Ulrich Bodenhofer bodenhofer@bioinf.jku.at

References

http://www.bioinf.jku.at/software/podkat

Wu, M. C., Lee, S., Cai, T., Li, Y., Boehnke, M., and Lin, X. (2011) Rare-variant association testing for sequencing data with the sequence kernel association test. Am. J. Hum. Genet. 89, 82-93. DOI: 10.1016/j.ajhg.2011.05.029.

Madsen, B. E. and Browning, S. R. (2009) A groupwise association test for rare mutations using a weighted sum statistic. PLoS Genetics 5, e1000384. 10.1371/journal.pgen.1000384

See Also

GenotypeMatrix, dbeta, assocTest

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## create a toy example
A <- matrix(rbinom(50, 2, prob=0.2), 5, 10)
MAF <- colSums(A) / (2 * nrow(A))

## compute some weight vectors
betaWeights(MAF, 1, 25)
betaWeights(MAF, 1, 30)
logisticWeights(MAF)
invSdWeights(MAF)

## plot weighting functions (note the missing 'x' arguments)
plot(betaWeights(shape2=30), xlim=c(0, 1))
plot(logisticWeights(), xlim=c(0, 1))
plot(invSdWeights, xlim=c(0, 1))

UBod/podkat documentation built on June 18, 2021, 10:01 a.m.