-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBoxplot
109 lines (86 loc) · 3.63 KB
/
Boxplot
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
# Installation of packages
rm(list=ls())
if (!requireNamespace("BiocManager", quietly = TRUE))
BiocManager::install("scatterplot3d")
BiocManager::install("GGally")
BiocManager::install("ggplot2")
library(scatterplot3d)
library(GGally)
library(ggplot2)
## CMSTYPEs only
data1<-read.table("CMS_manova_input.txt", header=T, sep="\t", na.strings = "NA")
p<-ggpairs(
data1[,c(23, 25)],
mapping = ggplot2::aes(color = CMSTYPE),
upper = list(continuous = wrap("density", alpha = 0.5), combo = "box"),
lower = list(continuous = wrap("points", alpha = 0.3), combo = wrap("dot", alpha = 0.4)),
diag = list(continuous = wrap("densityDiag")),
title = "CMS-Capecitabine"
)
for(i in 1:p$nrow) {
for(j in 1:p$ncol){
p[i,j] <- p[i,j] +
scale_fill_manual(values=c("orange", "deepskyblue4", "deeppink3", "springgreen4", "grey")) +
scale_color_manual(values=c("orange", "deepskyblue4", "deeppink3", "springgreen4", "grey"))
}
}
p
dev.copy(tiff,"CMS_capecitabine.tiff",width=8, height=8, units="in",res=500)
dev.off()
## CMSTYPEs_with KRAS mutational status (data not shown in the article)
p<-ggpairs(
data1[,c(23, 42)],
mapping = ggplot2::aes(color = CMS_KRAS),
upper = list(continuous = wrap("density", alpha = 0.5), combo = "box"),
lower = list(continuous = wrap("points", alpha = 0.3), combo = wrap("dot", alpha = 0.4)),
diag = list(continuous = wrap("densityDiag")),
title = "KRAS-CMS-Cetuximab"
)
for(i in 1:p$nrow) {
for(j in 1:p$ncol){
p[i,j] <- p[i,j] +
scale_fill_manual(values=c("springgreen4", "springgreen4", "deeppink3", "deeppink3", "deepskyblue4", "deepskyblue4", "orange", "orange", "grey")) +
scale_color_manual(values=c("springgreen4", "springgreen4", "deeppink3", "deeppink3", "deepskyblue4", "deepskyblue4", "orange", "orange", "grey"))
}
}
p
dev.copy(tiff,"KRAS_CMS_Cetuximab.tiff",width=14, height=8, units="in",res=200)
dev.off()
## CMSTYPEs_with the Cetuximab response with CultureType (data not shown in the article)
p<-ggpairs(
data1[,c(23, 43)],
mapping = ggplot2::aes(color = CMS_KRAS_CultureType),
upper = list(continuous = wrap("density", alpha = 0.2), combo = "box"),
lower = list(continuous = wrap("points", alpha = 0.3), combo = wrap("dot", alpha = 0.4)),
diag = list(continuous = wrap("densityDiag")),
title = "KRAS-CMS-Cetuximab-CultureType"
)
for(i in 1:p$nrow) {
for(j in 1:p$ncol){
p[i,j] <- p[i,j] +
scale_fill_manual(values=c("springgreen4", "springgreen4", "deeppink3", "deepskyblue4", "orange", "orange", "grey", "springgreen4", "deeppink3", "deeppink3", "deepskyblue4", "deepskyblue4", "orange", "orange", "grey")) +
scale_color_manual(values=c("springgreen4", "springgreen4", "deeppink3", "deepskyblue4", "orange", "orange", "grey", "springgreen4", "deeppink3", "deeppink3", "deepskyblue4", "deepskyblue4", "orange", "orange", "grey"))
}
}
p
dev.copy(tiff,"KRAS_CMS_Cetuximab_CultureType.tiff",width=30, height=12, units="in",res=200)
dev.off()
## The Afatinib response with the mutational status of KRAS (data not shown in the article)
p<-ggpairs(
data1[,c(12, 27)],
mapping = ggplot2::aes(color = KRAS),
upper = list(continuous = wrap("density", alpha = 0.5), combo = "box"),
lower = list(continuous = wrap("points", alpha = 0.3), combo = wrap("dot", alpha = 0.4)),
diag = list(continuous = wrap("densityDiag")),
title = "KRAS-Afatinib"
)
for(i in 1:p$nrow) {
for(j in 1:p$ncol){
p[i,j] <- p[i,j] +
scale_fill_manual(values=c("purple4", "lightsteelblue4")) +
scale_color_manual(values=c("purple4", "lightsteelblue4"))
}
}
p
dev.copy(tiff,"KRAS_Afatinib.tiff",width=8, height=8, units="in",res=200)
dev.off()