burdenPlot: plotting function for rare variant vbdm test

Description Usage Arguments Author(s) References See Also Examples

View source: R/burdenPlot.R

Description

This function produces a plot depicting the phenotype distribution, the distribution of carriers of the rare alleles, and also can include the posterior probaiblity of association as estimated by the vbdm algorithm.

Usage

1
2
3
burdenPlot(y, G, annotation = rep('missense',ncol(G)), title='',
          order='mean', legend='keep', type='lines',
          post=NULL, name.snp=NULL)

Arguments

y

A vector of continuous phenotypes.

G

A matrix of genotypes that are encoded as 0, 1, or 2.

annotation

A vector of SNP annotations for the columns of G. The default is 'missense'. Possible annotations are 'missense', 'nonsense','splice', and 'synonymous'. Default is for all variants to be missense.

title

An optional title for the plot.

order

How the variants should be ordered in the bottom quadrant of the plot. Possible options include order='mean' which orders based on the mean phenotypic value of carriers of the rare variants, order='MAF' which orders the variants based on minor allele frequency, order='MAF.mean' which orders variants first by MAF, then by mean phenotypic value, order='anno' which orders by annotation first, then by mean phenotypic value, and order='' which removes any reordering.

legend

If legend='keep' then a legend is depicted with variant annotations.

type

If type='lines' then the range of phenotype values for carriers are shown with a horizontal lines, with phenotypic values at the vertical tick marks. If type='points' then the phenotypic values are shown with points.

post

Optional vector of posterior probabilities from vbdm result.

name.snp

Optional vector of snp names.

Author(s)

Paul L. Auer (paul.wl.auer@gmail.com), Benjamin A. Logsdon (blogsdon@uw.edu)

References

Logsdon, B.A., et al. (2014) A Variational Bayes Discrete Mixture Test for Rare Variant Association., Genetic Epidemiology, Vol. 38(1), 21-30 2014

See Also

vbdm, vbdmR

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#generate some test data
library(vbdm)
set.seed(1)
n <- 1000
m <- 30
G <- matrix(rbinom(n*m,2,.01),n,m);
beta1 <- rbinom(m,1,.2)
y <- G%*%beta1+rnorm(n,0,2)
res <- vbdm(y=y,G=G,scaling=FALSE);
bp<-burdenPlot(y=y,G=G,post=res$pvec,name.snp=1:30);

vbdm documentation built on May 2, 2019, 2:37 a.m.

Related to burdenPlot in vbdm...