-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path23-explore_AAV_recount_LVs.Rmd
212 lines (157 loc) · 4.02 KB
/
23-explore_AAV_recount_LVs.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
---
title: "recount2 LVs in more severe or active ANCA-associated vasculitis"
output: html_notebook
---
**J. Taroni 2018**
In `21-AAV_DLVE`, we identified LVs that are differentially expressed in all
the ANCA-associated vasculitis datasets.
In this notebook, we'll do exploratory analyses of some of the recount2 PLIER
model LVs that look like they show consistent directionality across the 3
tissues.
## Functions and directory set up
```{r}
# magrittr pipe
`%>%` <- dplyr::`%>%`
```
```{r}
# plot and result directory setup for this notebook
plot.dir <- file.path("plots", "23")
dir.create(plot.dir, recursive = TRUE, showWarnings = FALSE)
results.dir <- file.path("results", "23")
dir.create(results.dir, recursive = TRUE, showWarnings = FALSE)
```
## Read in data
### recount2 PLIER model
```{r}
recount.plier <- readRDS(file.path("data", "recount2_PLIER_data",
"recount_PLIER_model.RDS"))
```
## Upregulated
LVs that are consistently upregulated in severe or active AAV as compared to
controls.
### Explore LV10
Let's look at all the pathways associated with this LV.
```{r}
recount.plier$summary %>%
dplyr::filter(`LV index` == 10,
FDR < 0.05)
```
```{r}
data.frame(loadings = sort(recount.plier$Z[, 10], decreasing = TRUE))
```
### Explore LV53
```{r}
recount.plier$summary %>%
dplyr::filter(`LV index` == 53,
FDR < 0.05)
```
```{r}
data.frame(loadings = sort(recount.plier$Z[, 53], decreasing = TRUE))
```
### Explore LV63
```{r}
recount.plier$summary %>%
dplyr::filter(`LV index` == 63,
FDR < 0.05)
```
```{r}
data.frame(loadings = sort(recount.plier$Z[, 63], decreasing = TRUE))
```
### Explore LV524
```{r}
recount.plier$summary %>%
dplyr::filter(`LV index` == 524,
FDR < 0.05)
```
This is certainly capturing something about the myeloid lineage.
Recall that this LV was correlated with neutrophil count from the
Banchereau, et al. dataset when we analyzed it in
`07-sle_cell_type_recount2_model`.
Let's take a look at the genes contributing to this signal.
```{r}
data.frame(loadings = sort(recount.plier$Z[, 524], decreasing = TRUE))
```
### Explore LV624
```{r}
recount.plier$summary %>%
dplyr::filter(`LV index` == 624,
FDR < 0.05)
```
```{r}
data.frame(loadings = sort(recount.plier$Z[, 624], decreasing = TRUE))
```
### Explore LV937
```{r}
recount.plier$summary %>%
dplyr::filter(`LV index` == 937,
FDR < 0.05)
```
```{r}
data.frame(loadings = sort(recount.plier$Z[, 937], decreasing = TRUE))
```
## Downregulated
LVs that are consistently downregulated in severe or active AAV as compared to
controls.
### Explore LV139
```{r}
recount.plier$summary %>%
dplyr::filter(`LV index` == 139,
FDR < 0.05)
```
```{r}
data.frame(loadings = sort(recount.plier$Z[, 139], decreasing = TRUE))
```
### Explore LV332
```{r}
recount.plier$summary %>%
dplyr::filter(`LV index` == 332,
FDR < 0.05)
```
```{r}
data.frame(loadings = sort(recount.plier$Z[, 332], decreasing = TRUE))
```
### Explore LV346
```{r}
recount.plier$summary %>%
dplyr::filter(`LV index` == 346,
FDR < 0.05)
```
```{r}
data.frame(loadings = sort(recount.plier$Z[, 346], decreasing = TRUE))
```
### Explore LV631
```{r}
recount.plier$summary %>%
dplyr::filter(`LV index` == 631,
FDR < 0.05)
```
```{r}
data.frame(loadings = sort(recount.plier$Z[, 631], decreasing = TRUE))
```
### Explore LV793
```{r}
recount.plier$summary %>%
dplyr::filter(`LV index` == 793,
FDR < 0.05)
```
```{r}
data.frame(loadings = sort(recount.plier$Z[, 793], decreasing = TRUE))
```
### Explore LV887
```{r}
recount.plier$summary %>%
dplyr::filter(`LV index` == 887,
FDR < 0.05)
```
```{r}
data.frame(loadings = sort(recount.plier$Z[, 887], decreasing = TRUE))
```
### Explore LV909
```{r}
recount.plier$summary %>%
dplyr::filter(`LV index` == 909,
FDR < 0.05)
```
```{r}
data.frame(loadings = sort(recount.plier$Z[, 909], decreasing = TRUE))
```