-
Notifications
You must be signed in to change notification settings - Fork 1
/
05g-gcb_agirre_common_hervs.R
427 lines (375 loc) · 21.8 KB
/
05g-gcb_agirre_common_hervs.R
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
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
################################################################################
################################################################################
################################################################################
################################################################################
####################### BULK AGIRRE / GCB COMMON HERVS #########################
#################################### SETUP #####################################
library(knitr)
library(tidyverse)
library(matrixStats)
library(data.table)
library(PCAtools)
library(DESeq2)
library(ggplot2)
library(ggsci)
library(ggpubr)
library(edgeR)
library(ashr)
library(cowplot)
library(wesanderson)
library(UpSetR)
library(EnhancedVolcano)
library(ggvenn)
################################### LOAD DATA ##################################
load("r_outputs/05e-gcb_vars.Rdata")
load("r_outputs/05f-agirre_vars.Rdata")
load("r_outputs/05e_gcb_vars_no_gcb.Rdata")
load("r_outputs/05f-agirre_vars_no_pb.Rdata")
load("r_outputs/01-metadata.Rdata")
load("r_outputs/01-refs.Rdata")
load("r_outputs/05f-agirre_vars_naive.Rdata")
load("r_outputs/05_gcb_naive_vars.Rdata")
remove(BL_metadata, DLBCL_metadata, FL_metadata, all_metadata)
################################# COMMON HERVS #################################
common_up_hervs <- list(
"DZ" = intersect(sig_gcb$DZ$display[sig_gcb$DZ$class == "LTR" &
sig_gcb$DZ$log2FoldChange > 0],
sig_agirre$DZ$display[sig_agirre$DZ$class == "LTR" &
sig_agirre$DZ$log2FoldChange > 0]),
"LZ" = intersect(sig_gcb$LZ$display[sig_gcb$LZ$class == "LTR" &
sig_gcb$LZ$log2FoldChange > 0],
sig_agirre$LZ$display[sig_agirre$LZ$class == "LTR" &
sig_agirre$LZ$log2FoldChange > 0]),
"MB" = intersect(sig_gcb$MB$display[sig_gcb$MB$class == "LTR" &
sig_gcb$MB$log2FoldChange > 0],
sig_agirre$MB$display[sig_agirre$MB$class == "LTR" &
sig_agirre$MB$log2FoldChange > 0]),
"NB" = intersect(sig_gcb$NB$display[sig_gcb$NB$class == "LTR" &
sig_gcb$NB$log2FoldChange > 0],
sig_agirre$NB$display[sig_agirre$NB$class == "LTR" &
sig_agirre$NB$log2FoldChange > 0]),
"DZvLZ" = intersect(sig_gcb$DZvLZ$display[sig_gcb$DZvLZ$class == "LTR" &
sig_gcb$DZvLZ$log2FoldChange > 0],
sig_agirre$DZvLZ$display[sig_agirre$DZvLZ$class == "LTR" &
sig_agirre$DZvLZ$log2FoldChange > 0]),
"MBvsNB" = intersect(sig_gcb$MBvsNB$display[sig_gcb$MBvsNB$class == "LTR" &
sig_gcb$MBvsNB$log2FoldChange > 0],
sig_agirre$MBvsNB$display[sig_agirre$MBvsNB$class == "LTR" &
sig_agirre$MBvsNB$log2FoldChange > 0])
)
common_down_hervs <- list(
"DZ" = intersect(sig_gcb$DZ$display[sig_gcb$DZ$class == "LTR" &
sig_gcb$DZ$log2FoldChange < 0],
sig_agirre$DZ$display[sig_agirre$DZ$class == "LTR" &
sig_agirre$DZ$log2FoldChange < 0]),
"LZ" = intersect(sig_gcb$LZ$display[sig_gcb$LZ$class == "LTR" &
sig_gcb$LZ$log2FoldChange < 0],
sig_agirre$LZ$display[sig_agirre$LZ$class == "LTR" &
sig_agirre$LZ$log2FoldChange < 0]),
"MB" = intersect(sig_gcb$MB$display[sig_gcb$MB$class == "LTR" &
sig_gcb$MB$log2FoldChange < 0],
sig_agirre$MB$display[sig_agirre$MB$class == "LTR" &
sig_agirre$MB$log2FoldChange < 0]),
"NB" = intersect(sig_gcb$NB$display[sig_gcb$NB$class == "LTR" &
sig_gcb$NB$log2FoldChange < 0],
sig_agirre$NB$display[sig_agirre$NB$class == "LTR" &
sig_agirre$NB$log2FoldChange < 0]),
"DZvLZ" = intersect(sig_gcb$DZvLZ$display[sig_gcb$DZvLZ$class == "LTR" &
sig_gcb$DZvLZ$log2FoldChange < 0],
sig_agirre$DZvLZ$display[sig_agirre$DZvLZ$class == "LTR" &
sig_agirre$DZvLZ$log2FoldChange < 0]),
"MBvsNB" = intersect(sig_gcb$MBvsNB$display[sig_gcb$MBvsNB$class == "LTR" &
sig_gcb$MBvsNB$log2FoldChange < 0],
sig_agirre$MBvsNB$display[sig_agirre$MBvsNB$class == "LTR" &
sig_agirre$MBvsNB$log2FoldChange < 0])
)
sink(file = "r_outputs/05g-common_up_hervs_gcb_agirre.txt")
for (n in names(common_up_hervs)) {
cat("\n----#Common upregulated HERVs in ", n, "---#\n")
print(common_up_hervs[[n]])
}
sink(file=NULL)
sink(file = "r_outputs/05g-common_down_hervs_gcb_agirre.txt")
for (n in names(common_down_hervs)) {
cat("\n----#Common downregulated HERVs in ", n, "---#\n")
print(common_down_hervs[[n]])
}
sink(file=NULL)
########################## COMMON HERVS NO GCB NO PB ###########################
common_up_hervs_no_gcb_no_pb <- list(
"DZ" = intersect(sig_no_gcb$DZ$display[sig_no_gcb$DZ$class == "LTR" &
sig_no_gcb$DZ$log2FoldChange > 0],
sig_agirre_no_pb$DZ$display[sig_agirre_no_pb$DZ$class == "LTR" &
sig_agirre_no_pb$DZ$log2FoldChange > 0]),
"LZ" = intersect(sig_no_gcb$LZ$display[sig_no_gcb$LZ$class == "LTR" &
sig_no_gcb$LZ$log2FoldChange > 0],
sig_agirre_no_pb$LZ$display[sig_agirre_no_pb$LZ$class == "LTR" &
sig_agirre_no_pb$LZ$log2FoldChange > 0]),
"MB" = intersect(sig_no_gcb$MB$display[sig_no_gcb$MB$class == "LTR" &
sig_no_gcb$MB$log2FoldChange > 0],
sig_agirre_no_pb$MB$display[sig_agirre_no_pb$MB$class == "LTR" &
sig_agirre_no_pb$MB$log2FoldChange > 0]),
"NB" = intersect(sig_no_gcb$NB$display[sig_no_gcb$NB$class == "LTR" &
sig_no_gcb$NB$log2FoldChange > 0],
sig_agirre_no_pb$NB$display[sig_agirre_no_pb$NB$class == "LTR" &
sig_agirre_no_pb$NB$log2FoldChange > 0]),
"DZvLZ" = intersect(sig_no_gcb$DZvLZ$display[sig_no_gcb$DZvLZ$class == "LTR" &
sig_no_gcb$DZvLZ$log2FoldChange > 0],
sig_agirre_no_pb$DZvLZ$display[sig_agirre_no_pb$DZvLZ$class == "LTR" &
sig_agirre_no_pb$DZvLZ$log2FoldChange > 0]),
"MBvsNB" = intersect(sig_no_gcb$MBvsNB$display[sig_no_gcb$MBvsNB$class == "LTR" &
sig_no_gcb$MBvsNB$log2FoldChange > 0],
sig_agirre_no_pb$MBvsNB$display[sig_agirre_no_pb$MBvsNB$class == "LTR" &
sig_agirre_no_pb$MBvsNB$log2FoldChange > 0])
)
common_down_hervs_no_gcb_no_pb <- list(
"DZ" = intersect(sig_no_gcb$DZ$display[sig_no_gcb$DZ$class == "LTR" &
sig_no_gcb$DZ$log2FoldChange < 0],
sig_agirre_no_pb$DZ$display[sig_agirre_no_pb$DZ$class == "LTR" &
sig_agirre_no_pb$DZ$log2FoldChange < 0]),
"LZ" = intersect(sig_no_gcb$LZ$display[sig_no_gcb$LZ$class == "LTR" &
sig_no_gcb$LZ$log2FoldChange < 0],
sig_agirre_no_pb$LZ$display[sig_agirre_no_pb$LZ$class == "LTR" &
sig_agirre_no_pb$LZ$log2FoldChange < 0]),
"MB" = intersect(sig_no_gcb$MB$display[sig_no_gcb$MB$class == "LTR" &
sig_no_gcb$MB$log2FoldChange < 0],
sig_agirre_no_pb$MB$display[sig_agirre_no_pb$MB$class == "LTR" &
sig_agirre_no_pb$MB$log2FoldChange < 0]),
"NB" = intersect(sig_no_gcb$NB$display[sig_no_gcb$NB$class == "LTR" &
sig_no_gcb$NB$log2FoldChange < 0],
sig_agirre_no_pb$NB$display[sig_agirre_no_pb$NB$class == "LTR" &
sig_agirre_no_pb$NB$log2FoldChange < 0]),
"DZvLZ" = intersect(sig_no_gcb$DZvLZ$display[sig_no_gcb$DZvLZ$class == "LTR" &
sig_no_gcb$DZvLZ$log2FoldChange < 0],
sig_agirre_no_pb$DZvLZ$display[sig_agirre_no_pb$DZvLZ$class == "LTR" &
sig_agirre_no_pb$DZvLZ$log2FoldChange < 0]),
"MBvsNB" = intersect(sig_no_gcb$MBvsNB$display[sig_no_gcb$MBvsNB$class == "LTR" &
sig_no_gcb$MBvsNB$log2FoldChange < 0],
sig_agirre_no_pb$MBvsNB$display[sig_agirre_no_pb$MBvsNB$class == "LTR" &
sig_agirre_no_pb$MBvsNB$log2FoldChange < 0])
)
sink(file = "r_outputs/05g-common_up_hervs_gcb_agirre_nogcbpb.txt")
for (n in names(common_up_hervs_no_gcb_no_pb)) {
cat("\n----#Common upregulated HERVs in ", n, "---#\n")
print(common_up_hervs_no_gcb_no_pb[[n]])
}
sink(file=NULL)
sink(file = "r_outputs/05g-common_down_hervs_gcb_agirre_nogcbpb.txt")
for (n in names(common_down_hervs_no_gcb_no_pb)) {
cat("\n----#Common downregulated HERVs in ", n, "---#\n")
print(common_down_hervs_no_gcb_no_pb[[n]])
}
sink(file=NULL)
######################## COMMON HERVS NAIVE AS BASELINE ########################
common_up_hervs_naive <- list(
"DZ" = intersect(sig_naive$DZ$display[sig_naive$DZ$class == "LTR" &
sig_naive$DZ$log2FoldChange > 0],
sig_agirre_naive$DZ$display[sig_agirre_naive$DZ$class == "LTR" &
sig_agirre_naive$DZ$log2FoldChange > 0]),
"LZ" = intersect(sig_naive$LZ$display[sig_naive$LZ$class == "LTR" &
sig_naive$LZ$log2FoldChange > 0],
sig_agirre_naive$LZ$display[sig_agirre_naive$LZ$class == "LTR" &
sig_agirre_naive$LZ$log2FoldChange > 0]),
"MB" = intersect(sig_naive$MB$display[sig_naive$MB$class == "LTR" &
sig_naive$MB$log2FoldChange > 0],
sig_agirre_naive$MB$display[sig_agirre_naive$MB$class == "LTR" &
sig_agirre_naive$MB$log2FoldChange > 0]),
"NB" = intersect(sig_naive$NB$display[sig_naive$NB$class == "LTR" &
sig_naive$NB$log2FoldChange > 0],
sig_agirre_naive$NB$display[sig_agirre_naive$NB$class == "LTR" &
sig_agirre_naive$NB$log2FoldChange > 0])
)
common_down_hervs_naive <- list(
"DZ" = intersect(sig_naive$DZ$display[sig_naive$DZ$class == "LTR" &
sig_naive$DZ$log2FoldChange < 0],
sig_agirre_naive$DZ$display[sig_agirre_naive$DZ$class == "LTR" &
sig_agirre_naive$DZ$log2FoldChange < 0]),
"LZ" = intersect(sig_naive$LZ$display[sig_naive$LZ$class == "LTR" &
sig_naive$LZ$log2FoldChange < 0],
sig_agirre_naive$LZ$display[sig_agirre_naive$LZ$class == "LTR" &
sig_agirre_naive$LZ$log2FoldChange < 0]),
"MB" = intersect(sig_naive$MB$display[sig_naive$MB$class == "LTR" &
sig_naive$MB$log2FoldChange < 0],
sig_agirre_naive$MB$display[sig_agirre_naive$MB$class == "LTR" &
sig_agirre_naive$MB$log2FoldChange < 0]),
"NB" = intersect(sig_naive$NB$display[sig_naive$NB$class == "LTR" &
sig_naive$NB$log2FoldChange < 0],
sig_agirre_naive$NB$display[sig_agirre_naive$NB$class == "LTR" &
sig_agirre_naive$NB$log2FoldChange < 0])
)
##################################### VENN #####################################
################################# DARK ZONE UP #################################
makevenn <- function(clust) {
a <- ggvenn(list(
`GCB` = sig_gcb[[clust]]$display[sig_gcb[[clust]]$class == "LTR" &
sig_gcb[[clust]]$log2FoldChange > 0],
`Agirre` = sig_agirre[[clust]]$display[sig_agirre[[clust]]$class == "LTR" &
sig_agirre[[clust]]$log2FoldChange > 0]),
set_name_size = 3.5,
text_size = 3.5,
c("GCB", "Agirre"),
fill_color = c("#f8766d", "#00bfc4"))
a_down <- ggvenn(list(
`GCB` = sig_gcb[[clust]]$display[sig_gcb[[clust]]$class == "LTR" &
sig_gcb[[clust]]$log2FoldChange < 0 ],
`Agirre` = sig_agirre[[clust]]$display[sig_agirre[[clust]]$class == "LTR" &
sig_agirre[[clust]]$log2FoldChange < 0 ]),
set_name_size = 3.5,
text_size = 3.5,
c("GCB", "Agirre"),
fill_color = c("#f8766d", "#00bfc4"))
a_diff <- ggvenn(list(
`GCB` = sig_gcb[[clust]]$display[sig_gcb[[clust]]$class == "LTR"],
`Agirre` = sig_agirre[[clust]]$display[sig_agirre[[clust]]$class == "LTR"]),
set_name_size = 3.5,
text_size = 3.5,
c("GCB", "Agirre"),
fill_color = c("#f8766d", "#00bfc4"))
a_gene <- ggvenn(list(
`GCB` = sig_gcb[[clust]]$display[sig_gcb[[clust]]$class == "protein_coding" &
sig_gcb[[clust]]$log2FoldChange > 0],
`Agirre` = sig_agirre[[clust]]$display[sig_agirre[[clust]]$class == "protein_coding" &
sig_agirre[[clust]]$log2FoldChange > 0]),
c("GCB", "Agirre"),
set_name_size = 3.5,
text_size = 3.5,
fill_color = c("#f8766d", "#00bfc4"))
a_gene_down <- ggvenn(list(
`GCB` = sig_gcb[[clust]]$display[sig_gcb[[clust]]$class == "protein_coding" &
sig_gcb[[clust]]$log2FoldChange < 0 ],
`Agirre` = sig_agirre[[clust]]$display[sig_agirre[[clust]]$class == "protein_coding" &
sig_agirre[[clust]]$log2FoldChange < 0 ]),
c("GCB", "Agirre"),
set_name_size = 3.5,
text_size = 3.5,
fill_color = c("#f8766d", "#00bfc4"))
a_gene_diff <- ggvenn(list(
`GCB` = sig_gcb[[clust]]$display[sig_gcb[[clust]]$class == "protein_coding"],
`Agirre` = sig_agirre[[clust]]$display[sig_agirre[[clust]]$class == "protein_coding"]),
c("GCB", "Agirre"),
set_name_size = 3.5,
text_size = 3.5,
fill_color = c("#f8766d", "#00bfc4"))
b <- ggvenn(list(
`GCB (no GCB)` = sig_no_gcb[[clust]]$display[sig_no_gcb[[clust]]$class == "LTR" &
sig_no_gcb[[clust]]$log2FoldChange > 0],
`Agirre (no PB)` = sig_agirre_no_pb[[clust]]$display[sig_agirre_no_pb[[clust]]$class == "LTR" &
sig_agirre_no_pb[[clust]]$log2FoldChange > 0]),
c("GCB (no GCB)", "Agirre (no PB)"),
set_name_size = 3.5,
text_size = 3.5,
fill_color = c("#f8766d", "#00bfc4"))
b_down <- ggvenn(list(
`GCB (no GCB)` = sig_no_gcb[[clust]]$display[sig_no_gcb[[clust]]$class == "LTR" &
sig_no_gcb[[clust]]$log2FoldChange < 0 ],
`Agirre (no PB)` = sig_agirre_no_pb[[clust]]$display[sig_agirre_no_pb[[clust]]$class == "LTR" &
sig_agirre_no_pb[[clust]]$log2FoldChange < 0 ]),
c("GCB (no GCB)", "Agirre (no PB)"),
set_name_size = 3.5,
text_size = 3.5,
fill_color = c("#f8766d", "#00bfc4"))
b_diff <- ggvenn(list(
`GCB (no GCB)` = sig_no_gcb[[clust]]$display[sig_no_gcb[[clust]]$class == "LTR"],
`Agirre (no PB)` = sig_agirre_no_pb[[clust]]$display[sig_agirre_no_pb[[clust]]$class == "LTR"]),
c("GCB (no GCB)", "Agirre (no PB)"),
set_name_size = 3.5,
text_size = 3.5,
fill_color = c("#f8766d", "#00bfc4"))
b_gene <- ggvenn(list(
`GCB (no GCB)` = sig_no_gcb[[clust]]$display[sig_no_gcb[[clust]]$class == "protein_coding" &
sig_no_gcb[[clust]]$log2FoldChange > 0],
`Agirre (no PB)` = sig_agirre_no_pb[[clust]]$display[sig_agirre_no_pb[[clust]]$class == "protein_coding" &
sig_agirre_no_pb[[clust]]$log2FoldChange > 0]),
c("GCB (no GCB)", "Agirre (no PB)"),
set_name_size = 3.5,
text_size = 3.5,
fill_color = c("#f8766d", "#00bfc4"))
b_gene_down <- ggvenn(list(
`GCB (no GCB)` = sig_no_gcb[[clust]]$display[sig_no_gcb[[clust]]$class == "protein_coding" &
sig_no_gcb[[clust]]$log2FoldChange < 0],
`Agirre (no PB)` = sig_agirre_no_pb[[clust]]$display[sig_agirre_no_pb[[clust]]$class == "protein_coding" &
sig_agirre_no_pb[[clust]]$log2FoldChange < 0]),
c("GCB (no GCB)", "Agirre (no PB)"),
set_name_size = 3.5,
text_size = 3.5,
fill_color = c("#f8766d", "#00bfc4"))
b_gene_diff <- ggvenn(list(
`GCB (no GCB)` = sig_no_gcb[[clust]]$display[sig_no_gcb[[clust]]$class == "protein_coding"],
`Agirre (no PB)` = sig_agirre_no_pb[[clust]]$display[sig_agirre_no_pb[[clust]]$class == "protein_coding"]),
c("GCB (no GCB)", "Agirre (no PB)"),
set_name_size = 3.5,
text_size = 3.5,
fill_color = c("#f8766d", "#00bfc4"))
c <- ggvenn(list(
`GCB (v naive)` = sig_naive[[clust]]$display[sig_naive[[clust]]$class == "LTR" &
sig_naive[[clust]]$log2FoldChange > 0],
`Agirre (v naive)` = sig_agirre_naive[[clust]]$display[sig_agirre_naive[[clust]]$class == "LTR" &
sig_agirre_naive[[clust]]$log2FoldChange > 0]),
c("GCB (v naive)", "Agirre (v naive)"),
set_name_size = 3.5,
text_size = 3.5,
fill_color = c("#f8766d", "#00bfc4"))
c_down <- ggvenn(list(
`GCB (v naive)` = sig_naive[[clust]]$display[sig_naive[[clust]]$class == "LTR" &
sig_naive[[clust]]$log2FoldChange < 0],
`Agirre (v naive)` = sig_agirre_naive[[clust]]$display[sig_agirre_naive[[clust]]$class == "LTR" &
sig_agirre_naive[[clust]]$log2FoldChange < 0]),
c("GCB (v naive)", "Agirre (v naive)"),
set_name_size = 3.5,
text_size = 3.5,
fill_color = c("#f8766d", "#00bfc4"))
c_diff <- ggvenn(list(
`GCB (v naive)` = sig_naive[[clust]]$display[sig_naive[[clust]]$class == "LTR"],
`Agirre (v naive)` = sig_agirre_naive[[clust]]$display[sig_agirre_naive[[clust]]$class == "LTR"]),
c("GCB (v naive)", "Agirre (v naive)"),
set_name_size = 3.5,
text_size = 3.5,
fill_color = c("#f8766d", "#00bfc4"))
c_gene <- ggvenn(list(
`GCB (v naive)` = sig_naive[[clust]]$display[sig_naive[[clust]]$class == "protein_coding" &
sig_naive[[clust]]$log2FoldChange > 0],
`Agirre (v naive)` = sig_agirre_naive[[clust]]$display[sig_agirre_naive[[clust]]$class == "protein_coding" &
sig_agirre_naive[[clust]]$log2FoldChange > 0]),
c("GCB (v naive)", "Agirre (v naive)"),
set_name_size = 3.5,
text_size = 3.5,
fill_color = c("#f8766d", "#00bfc4"))
c_gene_down <- ggvenn(list(
`GCB (v naive)` = sig_naive[[clust]]$display[sig_naive[[clust]]$class == "protein_coding" &
sig_naive[[clust]]$log2FoldChange < 0],
`Agirre (v naive)` = sig_agirre_naive[[clust]]$display[sig_agirre_naive[[clust]]$class == "protein_coding" &
sig_agirre_naive[[clust]]$log2FoldChange < 0]),
c("GCB (v naive)", "Agirre (v naive)"),
set_name_size = 3.5,
text_size = 3.5,
fill_color = c("#f8766d", "#00bfc4"))
c_gene_diff <- ggvenn(list(
`GCB (v naive)` = sig_naive[[clust]]$display[sig_naive[[clust]]$class == "protein_coding"],
`Agirre (v naive)` = sig_agirre_naive[[clust]]$display[sig_agirre_naive[[clust]]$class == "protein_coding"]),
c("GCB (v naive)", "Agirre (v naive)"),
set_name_size = 3.5,
text_size = 3.5,
fill_color = c("#f8766d", "#00bfc4"))
clust.fig.up <- plot_grid(a, a_gene, b, b_gene, c, c_gene,
labels = "AUTO",
ncol = 2)
clust.fig.down <- plot_grid(a_down, a_gene_down, b_down, b_gene_down, c_down, c_gene_down,
labels = "AUTO",
ncol = 2)
clust.fig.diff <- plot_grid(a_diff, a_gene_diff, b_diff, b_gene_diff, c_diff, c_gene_diff,
labels = "AUTO",
ncol = 2)
pdf(paste0("plots/05g_gcb_v_agirre_", clust, "_up",".pdf"), height=8, width=10)
print(clust.fig.up)
dev.off()
pdf(paste0("plots/05g_gcb_v_agirre_", clust, "_down",".pdf"), height=8, width=10)
print(clust.fig.down)
dev.off()
pdf(paste0("plots/05g_gcb_v_agirre_", clust, "_diff",".pdf"), height=8, width=10)
print(clust.fig.diff)
dev.off()
}
makevenn("DZ")
makevenn("LZ")
makevenn("MB")
makevenn("NB")