-
Notifications
You must be signed in to change notification settings - Fork 0
/
figure4.R
73 lines (65 loc) · 1.43 KB
/
figure4.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
library(tidyverse)
library(RColorBrewer)
library(gplots)
library(reshape2)
order <-
rev(c(
"Carbetocin",
"Hydroxychloroquine",
"Desmopressin",
"Lopinavir",
"Bupropion"
))
inf_genes <- c(
"IL6",
"TNF",
"IL2",
"IL2RA",
"IL2RB"
)
imm_genes <- c("ARG1",
"TLR9",
"CD40",
"CD46",
"CEACAM1",
"CD83",
"CCL20",
"TGFB1",
"TGFBR1",
"TGFBR2")
all_genes <- c(inf_genes, imm_genes)
all_results_cross <- read_csv("results/all_results_cross.csv") %>%
column_to_rownames("Perturbagen") %>%
as.matrix() %>%
t()
all_results_cross <- all_results_cross[all_genes,]
side_color <- c(rep("Blue", length(inf_genes)), rep("Red", length(imm_genes)))
colors <- colorRampPalette(c("red", "black", "green"))(n = 100)
png(filename = "figures/max-concordance-heatmap-all-annotated.png",
width = 1920,
height = 1384)
heatmap.2(
all_results_cross,
dendrogram = "none",
col = colors,
colsep = 1:5,
rowsep = 1:15,
trace = "none",
cexRow = 3,
cexCol = 3,
Rowv = FALSE,
Colv = FALSE,
density.info = "none",
keysize = 1,
margins = c(15, 25),
notecex = 1.5,
key.title = NA,
key.xlab = NA,
key.par = list(cex = 1.3),
cellnote = all_results_cross,
notecol = "white",
RowSideColors = side_color,
srtCol = 45,
labCol = c("BUP", "LOP", "DES", "HCQ", "CAB")
)
dev.off()