This protocol template was contributed by Jeff Leek.
The goal of an eQTL analysis is to identify associations between gene expression features (exons, genes, transcripts) and genetic variation (typically single nucleotide polymorphisms). The usual approach to this problem is to fit a linear model where the outcome is gene expression and the covariates are genetic variants.
Eij = bikj0 + bikjsSkj + ∑mbikjccmj + eikj
where Eij is the expression of feature i on transcript j, Skj is the value of SNP k on sample j, cmj is the value for confounder m on sample j, and e is (hopefully) independent noise. This type of model can be easily fit in R
with the MatrixEQTL package. In this protocal we will cover:
We will be using data from the GEUVADIS project as an example for this protocol. You can obtain the GEUVADIS data from the code for our Ballgown paper. I am going to distribute a subset of this (relatively large) data set to illustrate the protocol. If you download the GEUVADIS ballgown
object from the Ballgown code site, you can get the subset I will be using by running the following code:
# Load data and set seed
load("geuvadisbg.rda")
set.seed(123)
## Remove transcripts with mean FPKM < 5
highexpr = exprfilter(geuvadis,cutoff=5)
index = sample(1:334206,size=1000) %in% 1:334206
smallbg = subset(geuvadisbg,1:1000 %in% index,genomesubset=TRUE)
This data set consists of a little over 600 samples from multiple populations. We will use these data to peform a simple eQTL analysis using Ballgown.
TODO list:
R
code, include the session information using devtools::session_info()
. This is specially important if you have any packages installed from GitHub. You might want to use options(width = 120)
before devtools::session_info()
.Citations made with knitcitations
(Boettiger, 2014).
[1] C. Boettiger. knitcitations: Citations for knitr markdown files. R package version 1.0.5. 2014. URL: http://CRAN.R-project.org/package=knitcitations.
R
information (delete this if no R
code was used)
## setting value
## version R version 3.1.1 (2014-07-10)
## system x86_64, darwin10.8.0
## ui X11
## language (EN)
## collate en_US.UTF-8
## tz America/New_York
## package * version date source
## bibtex 0.3.6 2013-07-29 CRAN (R 3.1.0)
## bitops 1.0.6 2013-08-17 CRAN (R 3.1.0)
## devtools * 1.6.1 2014-10-07 CRAN (R 3.1.1)
## digest 0.6.4 2013-12-03 CRAN (R 3.1.0)
## evaluate 0.7 2015-04-21 CRAN (R 3.1.1)
## formatR 1.0 2014-08-25 CRAN (R 3.1.1)
## htmltools 0.2.6 2014-09-08 CRAN (R 3.1.1)
## httr 0.6.1 2015-01-01 CRAN (R 3.1.2)
## knitcitations * 1.0.5 2014-11-26 CRAN (R 3.1.2)
## knitr 1.10.5 2015-05-06 CRAN (R 3.1.1)
## knitrBootstrap 1.0.0 2015-06-23 Github (jimhester/knitrBootstrap@76c41f0)
## lubridate 1.3.3 2013-12-31 CRAN (R 3.1.0)
## magrittr 1.5 2014-11-22 CRAN (R 3.1.2)
## markdown 0.7.4 2014-08-24 CRAN (R 3.1.1)
## memoise 0.2.1 2014-04-22 CRAN (R 3.1.0)
## plyr 1.8.1 2014-02-26 CRAN (R 3.1.0)
## Rcpp 0.11.6 2015-05-01 CRAN (R 3.1.3)
## RCurl 1.95.4.5 2014-12-06 CRAN (R 3.1.2)
## RefManageR 0.8.40 2014-10-29 CRAN (R 3.1.2)
## RJSONIO 1.3.0 2014-07-28 CRAN (R 3.1.1)
## rmarkdown 0.7 2015-06-23 Github (rstudio/rmarkdown@82fde67)
## rstudioapi 0.1 2014-03-27 CRAN (R 3.1.0)
## stringi 0.4.1 2014-12-14 CRAN (R 3.1.2)
## stringr 1.0.0 2015-04-30 CRAN (R 3.1.3)
## XML 3.98.1.1 2013-06-20 CRAN (R 3.1.0)
## yaml 2.1.13 2014-06-12 CRAN (R 3.1.0)