-
Notifications
You must be signed in to change notification settings - Fork 2
/
Chemical_Space.Rmd
139 lines (110 loc) · 5.15 KB
/
Chemical_Space.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
---
title: "Visual representation of Lipinski's descriptors"
author: Saw Simeon, Nuttapat Anuwongcharoen, Watshara Shoombuatong, Aijaz Ahmad Malik,
Virapong Prachayasittikul, Jarl E. S. Wikberg and Chanin Nantasenamat
date: "June 7, 2016"
output: pdf_document
---
## Chemical space of AChE inhibitors
Convert IC50 to pIC50 as well as binning the activity (i.e., Active, Inactive and Intermediate)
```{r}
data <- read.csv("Lipinski_descriptors.csv")
IC50_nm <- data$STANDARD_VALUE
IC50 <- as.numeric(IC50_nm)*10^-9
pIC50 <- -log10(IC50)
descriptors_name <- c("ALogP", "nHBAcc", "nHBDon", "MW")
descriptors <- data[, descriptors_name]
#data_classification <- cbind(pIC50, descriptors)
Activity <- ifelse(pIC50 > 6, "Active",
ifelse((pIC50 <= 6) & (pIC50 < 5), "Inactive",
"Intermediate"))
Activity <- data.frame(Activity)
```
\pagebreak
## Visualization of Lipinski's descriptors
### Chemical space of AChE inhibitors are shown as active (green), inactive (red) and intermediate (blue)
```{r, warning= FALSE, message=FALSE}
library(ggplot2)
library(cowplot)
data_2 <- cbind(Activity, descriptors)
data_2 <- na.omit(data_2)
data_plot <- data.frame(data_2)
p <- ggplot(data_plot, aes(MW, ALogP))
p <- p + geom_point(aes(colour = factor(Activity)), size = 3, alpha = 0.3)
p <- p + theme(legend.position = ("none"),
panel.border = element_rect(linetype = "solid",
colour = "black", fill = NA, size = 1),
axis.text.x = element_text(colour = "black", size = 10),
axis.text.y = element_text(colour = "black", size = 10),
plot.margin = unit(c(1, 1, 1, 1), "cm"),
axis.title.x = element_text(colour = "black", size = 15, face = "bold"),
axis.title.y = element_text(colour = "black", size = 15, face = "bold")
)
print(p)
```
\pagebreak
### Boxplot of Lipinski's rule-of-five descriptors (ALogP)
```{r, warning= FALSE, message=FALSE}
p_1 <- ggplot(data_plot, aes(factor(Activity), ALogP))
p_1 <- p_1 + geom_boxplot(aes(fill = factor(Activity)), alpha = 0.7)
p_1 <- p_1 + theme(legend.position = ("none"),
panel.border = element_rect(linetype = "solid",
colour = "black", fill = NA, size = 1),
axis.text.x = element_text(colour = "black", size = 15),
axis.text.y = element_text(colour = "black", size = 15),
plot.margin = unit(c(1, 1, 1, 1), "cm"),
axis.title.y = element_text(size = 20, face = "bold"),
axis.title.x = element_blank())
print(p_1)
```
\pagebreak
### Boxplot of Lipinski's rule-of-five descriptors (nHBAcc)
```{r, warning= FALSE, message=FALSE}
p_2 <- ggplot(data_plot, aes(factor(Activity), nHBAcc))
p_2 <- p_2 + geom_boxplot(aes(fill = factor(Activity)), alpha = 0.7)
p_2 <- p_2 + theme(legend.position = ("none"),
panel.border = element_rect(linetype = "solid",
colour = "black", fill = NA, size = 1),
axis.text.x = element_text(colour = "black", size = 15),
axis.text.y = element_text(colour = "black", size = 15),
plot.margin = unit(c(1, 1, 1, 1), "cm"),
axis.title.y = element_text(size = 20, face = "bold"),
axis.title.x = element_blank())
print(p_2)
```
\pagebreak
### Boxplot of Lipinski's rule-of-five descriptors (nHBDon)
```{r, warning= FALSE, message=FALSE}
p_3 <- ggplot(data_plot, aes(factor(Activity), nHBDon))
p_3 <- p_3 + geom_boxplot(aes(fill = factor(Activity)), alpha = 0.7)
p_3 <- p_3 + theme(legend.position = ("none"),
panel.border = element_rect(linetype = "solid",
colour = "black", fill = NA, size = 1),
axis.text.x = element_text(colour = "black", size = 15),
axis.text.y = element_text(colour = "black", size = 15),
plot.margin = unit(c(1, 1, 1, 1), "cm"),
axis.title.y = element_text(size = 20, face = "bold"),
axis.title.x = element_blank())
print(p_3)
```
\pagebreak
### Boxplot of Lipinski's rule-of-five descriptors (MW)
```{r, warning= FALSE, message=FALSE}
p_4 <- ggplot(data_plot, aes(factor(Activity), MW))
p_4 <- p_4 + geom_boxplot(aes(fill = factor(Activity)), alpha = 0.7)
p_4 <- p_4 + theme(legend.position = ("none"),
panel.border = element_rect(linetype = "solid",
colour = "black", fill = NA, size = 1),
axis.text.x = element_text(colour = "black", size = 15),
axis.text.y = element_text(colour = "black", size = 15),
plot.margin = unit(c(1, 1, 1, 0.4), "cm"),
axis.title.y = element_text(size = 20, face = "bold"),
axis.title.x = element_blank())
print(p_4)
```
\pagebreak
# Arranging boxplot of Lipinski's rule-of-file descriptors (ALogP, nHBAcc, nHBDon, MW)
```{r, fig.width = 10, fig.height= 10, warning=FALSE, message=FALSE}
library(cowplot)
plot_grid(p_1, p_2, p_3, p_4)
```