-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
70 lines (49 loc) · 2.27 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
title: bvs:\ Bayesian Variable Selection
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```
[![Build Status](https://travis-ci.org/USCbiostats/bvs.svg?branch=master)](https://travis-ci.org/USCbiostats/bvs)
[![Build status](https://ci.appveyor.com/api/projects/status/6pw56o39laqjpx37?svg=true)](https://ci.appveyor.com/project/gmweaver/bvs)
# Introduction
The functions in this package focus on analyzing case-control association studies involving a group of genetic variants.
In particular, we are intersted in modeling the outcome variable as a function of multivariate genetic profile using
Bayesian model uncertainty and variable selection techniques. The package incorporates functions to analyze data sets
involving common variants as well as externsions to model rare variants via the Bayesian Risk Index (Quintana and Conti, 2011),
as well as haplotypes. Finally, allows the incorporation of biological information to inform the marginal inclusion probabilities
via the iBMU (Quintana and Conti (submitted)).
# Setup
1. For Windows users, install [RTools](https://cran.r-project.org/bin/windows/Rtools/) (not an R package)
2. Install the R package [devtools](https://github.com/hadley/devtools)
3. Install bvs package with the install_github function
4. Load the package
```{r, eval = FALSE}
library(devtools)
# Master branch
install_github("USCbiostats/bvs")
```
# Example: Rare Variant Analysis with the Bayesian Risk Index (BRI)
As a first example, below is code to run a rare variant analysis using the "sample" method on a binary outcome.
```{r, eval = FALSE}
# load bvs
library(bvs)
# load the rare variant data set, first column is outcome variable
data(RareData)
# run 2000 iterations of the MH algorithm (rare = TRUE will construct the BRI)
rare_analysis <- bvs(y = RareData$case,
x = RareData[, -1],
family = "binomial",
method = "sample",
rare = TRUE,
iter = 2000)
# summarize results of analysis
rare_results <- summary(rare_analysis)
# plot of top 25 models and top 10 variants
plot(rare_results, num_models = 25, num_snps = 10)
```