-
Notifications
You must be signed in to change notification settings - Fork 2
/
modelsGAIT1.Rmd
286 lines (214 loc) · 8.26 KB
/
modelsGAIT1.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
---
title: "SOLAR models applied to GAIT1 data set"
author: "Helena Brunel, Andrey Ziyatdinov"
date: "`r Sys.Date()`"
output:
html_document:
theme: united
toc: true
toc_depth: 3
number_sections: true
pdf_document:
toc: true
toc_depth: 3
number_sections: true
bibliography: gait.bib
---
```{r, echo = FALSE}
#opts_chunk$set(eval = TRUE, dev = "png")
#opts_chunk$set(fig.path = "figures-modelsGAIT1/")
```
```{r inc_hidden, echo = FALSE, message = FALSE}
library(devtools)
load_all("~/git/ugcd/solarius")
#library(solarius)
```
```{r inc, message = FALSE}
library(gait)
library(plyr)
```
```{r load_hidden_andrey, echo = FALSE, eval = TRUE, cache = TRUE}
load("~/Results/packages/solarius/GAIT1/gait1.bmi.A.RData")
load("~/Results/packages/solarius/GAIT1/resultsF11HH.Rdata")
load("~/Results/packages/solarius/GAIT1/gait1.L.univar.RData")
load("~/Results/packages/solarius/GAIT1/gait1.L.twopass.RData")
load("~/Results/packages/solarius/GAIT1/gait1.L12.bivar.RData")
A.F11 <- A
L.F11 <- L3
A.bmi <- A2
L.bmi <- L1
L.bmi.twopass <- L1.2
A.aff <- A3
L.aff <- L2
L.aff.bmi <- L12
rm(list = c("A", "A1", "A2", "A3", "L1", "L2", "L3", "L12", "L1.2"))
```
```{r load_hidden_helena, echo = FALSE, eval = FALSE}
```
# About
These pages show particular examples to illustrate the 'solarius' package's behaviour with large datasets. In particular, these examples were generated with the GAIT (Genetic Analysis of Idiopathic Thrombophilia) dataset. The GAIT Project included 397 individuals from 21 extended Spanish families (mean pedigree size = 19) (@Souto2000). A genome-wide set of 307,984 SNPs was typed in all of the participants using the Infinium 317 k Beadchip on the Illumina platform (San Diego, CA, USA).
We selected 3 specific examples where we could compare the results obtained with the 'solarius' package with those previously obtained and published in Sabater2012 and Souto2014. The 3 selected phenotypes were the FXI levels in blood, the BMI and the Thrombosis affection.
# Load packages
```{r inc_fake, eval = FALSE}
library(solarius)
library(gait)
```
# Load GAIT1 data
We first load our data and properly transform the phenotypes under study.
```{r load}
pdat <- gait1.phen()
pdat <- mutate(pdat,
tr_FXI = FXI_T * 5.1,
ln_bmi = log(bmi),
tr_bmi = 6.1 * ln_bmi)
gait1.snpfiles <- gait1.snpfiles()
mibddir <- gait1.mibddir()
```
```{r par}
cores <- 64
```
# FXI
We first applied the main models of association and linkage of the package to the FXI levels in blood. The FXI phenotype has already been studied in the same dataset as described in @Sabater2012. This example aims to illustrate the proper behaviour of the solarius package by replicating these former results.
The polygenic model that estimates the heritability of the FXI levels in blood is described by M.F11.
```{r h2r.F11, echo=T, cache = TRUE}
# trait previously transformed, only significant covariates
M.F11 <- solarPolygenic(tr_FXI ~ AGE, pdat, covtest=T)
M.F11
```
The model of association is described by A.F11
```{r assoc.F11, eval = FALSE}
A.F11 <- solarAssoc(tr_FXI ~ AGE, pdat,
genocov.files = gait1.snpfiles$genocov.files,
snplists.files = gait1.snpfiles$snplists.files,
snpmap.files = gait1.snpfiles$snpmap.files,
cores = cores)
```
```{r sum_A.F11}
summary(A.F11)
```
```{r A_F11_manh, cache=T}
plot(A.F11)
```
```{r A_F11_qq, cache=T}
plot(A.F11, "qq")
```
We observe that 3 significant SNPs are found. These results are in concordance with those previously reported on the FXI phenotype of the GAIT1 project (@Sabater2012). There are three significant loci: rs710446 and rs4253399 located in the structural F11 gene, and rs4241824, located in the kininogen 1 (KNG1) gene. Both rs710446 and rs4241824 were reported in our previous GWAS published in (@Sabater2012).
```{r linkage.F11, eval = FALSE}
L.F11 <- solarMultipoint(tr_FXI ~ AGE, data = pdat,
mibdir = mibdir,
chr = 1:22, interval = 5,
cores = cores, verbose = 1)
```
The linkage model is described by L.F11.
```{r sum_L.F11}
summary(L.F11)
```
```{r L_F11, cache=T, fig.height = 9}
plot(L.F11)
```
We observe that no significant loci are found using the linkage model.
# BMI
The second example consists on applying the same models to the Body Mass Index (BMI). In this case, we also have a reference publication to compare with (@Souto2014). In contrast with the previous example, in @Souto2014, only linkage signals showed significant peaks for the BMI phenotype.
M.bmi estimates the BMI heritability
```{r h2r1, cache = TRUE}
# trait previously transformed, only significant covariates
M.bmi <- solarPolygenic(tr_bmi ~ AGE, pdat, covtest = TRUE)
M.bmi
```
The model of asscociation between GAIT SNPs and the BMI phenotype is described by A.bmi.
```{r assoc1, eval = FALSE}
A.bmi <- solarAssoc(tr_bmi ~ AGE, pdat,
genocov.files = gait1.snpfiles$genocov.files,
snplists.files = gait1.snpfiles$snplists.files,
snpmap.files = gait1.snpfiles$snpmap.files,
cores = cores)
```
```{r A1_sum}
summary(A.bmi)
```
```{r A1_manh, cache=T, message = FALSE}
plot(A.bmi)
```
```{r A1_qq, cache=T}
plot(A.bmi, "qq")
```
As expected we do not detect any significantly associated SNPs.
The model of linkage for the BMI phenotype is described by L.bmi.
```{r linkage1, eval = FALSE}
L.bmi <- solarMultipoint(formula = tr_bmi ~ AGE, data = dat,
mibddir = mibddir,
chr = 1:22, interval = 5, cores = cores, verbose = 1)
```
```{r L1_sum}
summary(L.bmi)
```
```{r L1, cache=T, message = FALSE, fig.height = 9}
plot(L.bmi)
```
We obtain a significant peak of linkage at chromosome 13. This replicates the result reported in @Souto2014 with a linkage multiploint analysis of the bmi in the GAIT1.
## Two-pass linkage
In order to evaluate the impact of this finding in related loci, we applied a second univariate linkage analysis, conditioned on the linkage signal obtained at 13q34 locus, as in @Souto2014.
```{r, eval = FALSE}
# parallel computation of multi-pass linkage is not implemented in `solarius` yet
L.bmi.twopass <- solarMultipoint(tr_bmi ~ AGE, pdat,
mibddir = mibddir,
interval = 5, multipoint.options = "3")
```
```{r L_bmi2, fig.height = 9, cache = TRUE}
plot(L.bmi.twopass, pass = 2)
```
We observe that in this second linkage analysis, conditioned on the former significant LOD score, the signal on chromosome 13q34 dropped dramatically to 0, as expected.
# Throm
In order to illustrate the behaviour of the described models with dichotomous phenotypes, we finally applied them to the Thrombosis affection status.
The heritability of Thrombosis is estimated with M.aff.
```{r h2r.aff, echo=T, cache=T}
M.aff <- solarPolygenic(aff ~ AGE, pdat, covtest = TRUE)
M.aff
```
The model of association is described by A.aff.
``` {r assoc3, eval = FALSE}
A.aff <- solarAssoc(aff ~ AGE, pdat,
genocov.files = gait1.snpfiles$genocov.files,
snplists.files = gait1.snpfiles$snplists.files,
snpmap.files = gait1.snpfiles$snpmap.files,
cores = cores)
```
```{r A_aff_manh, cache=T}
plot(A.aff)
```
```{r A_aff_qq, cache=T}
plot(A.aff, "qq")
```
The model of linkage is described by L.aff.
```{r linkage.aff, eval = FALSE}
L.aff <- solarMultipoint(aff ~ AGE, data = dat,
mibdir = mibdir,
chr = 1:22, interval = 5,
cores = cores, verbose = 1)
```
```{r sum_L.aff}
summary(L.aff)
```
```{r L_aff, cache=T, fig.height = 9, cache = TRUE}
plot(L.aff)
```
We observe that no significant findings are obtained neither in association nor in linkage analyses.
# Bivariate analysis of BMI and Throm
We applied the bivariate linkage analysis with BMI and thrombosis affection, under the hypothesis of pleiotropy between BMI and liability to thrombosis.
```{r, eval = FALSE}
L.aff.bmi <- solarMultipoint(aff + bmi ~ AGE, pdat,
mibddir = mibddir,
chr = 1:22, interval = 5,
cores = cores, verbose = 1)
```
```{r sum_Lbi}
summary(L.aff.bmi)
```
```{r L_aff_bmi, fig.height = 9, cache = TRUE}
plot(L.aff.bmi)
```
We observe, again, a significant peak of linkage at the 13q34 locus. This supports the hyposthesis proposed in @Souto2014 of combined linkage between that region and BMI/thrombosis risk.
# License
This document is licensed under the Creative Commons Attribution 4.0 International Public License.
[![Creative Commons License](http://i.creativecommons.org/l/by/4.0/88x31.png)](http://creativecommons.org/licenses/by/4.0/)
# References