a b/Fig5F_VISTA_IHC_boxplot.R
1
2
# Plot IHC percentages of VISTA+ cells in different hematological cancers (Figure 5F)
3
4
library(data.table)
5
library(ggplot2)
6
library(cowplot)
7
library(ComplexHeatmap)
8
library(dplyr)
9
library(ggpubr)
10
11
# read mIHC data
12
data <- fread("vista_ihc.txt", data.table = F)
13
14
# prepare data frame for plotting
15
df <- data %>%
16
  mutate(Disease_2 = gsub("BP CML", "CML", 
17
                          gsub("PH. B-ALL", "pre-B-ALL", 
18
                               gsub("HB", "Healthy BM", Disease))),
19
         VISTA = VISTA.fraction*100) %>%
20
  mutate(Disease_2 = ifelse(FAB %in% c("4", "5"), "AML M4/M5", 
21
                            ifelse(Disease_2 == "AML", "AML other", Disease_2))) %>% 
22
  mutate(Disease_2 = factor(Disease_2, levels = c("AML M4/M5", "AML other", "CML", "pre-B-ALL", "T-ALL", "Healthy BM")))
23
         
24
# boxplot
25
p <- ggplot(df, aes(x=Disease_2, y=VISTA, fill = Disease_2)) +
26
 geom_boxplot(outlier.shape = NA) +
27
 geom_jitter(width = 0.1, color = "grey20") +
28
 scale_size_continuous(range = c(0.1, 2)) +
29
 ylab("% VISTA+ cells") +
30
 xlab("") +
31
 guides(fill = FALSE) +
32
  theme_cowplot() +
33
 theme(axis.text.x = element_text(angle=45, hjust=1)) +
34
 labs(color = "") +
35
 stat_compare_means(aes(label = ..p.signif..),
36
   method = "wilcox.test",
37
   method.args = list(alternative = "two.sided"),
38
   ref.group = "Healthy BM",
39
   label.y = 95)
40
41
# print
42
pdf("Figure5F_VISTA_IHC_boxplot.pdf", width = 3, height = 4)
43
p
44
dev.off()