-
Notifications
You must be signed in to change notification settings - Fork 0
/
Brain Graph Analysis
63 lines (51 loc) · 1.83 KB
/
Brain Graph Analysis
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
library(ggplot2)
library(gridExtra)
data <- read.table("GSE197868_Brain_dataset.txt",header = TRUE)
expression_values <- data[,c(2:7)]
row.names(expression_values) <- data[,1]
colnames(expression_values) <- c('Control_1', 'Control_2', 'Control_3',
'RSV_1','RSV_2', 'RSV_3')
control <- expression_values[1:3]
infected <- expression_values[4:6]
#Control Graphs
C1 <- ggplot(data = control) +
geom_histogram(mapping = aes(x = Control_1), colour = 5, fill = 1) +
scale_x_continuous(trans = 'log10') +
xlab("log10(Expression Values)") +
ylab("Frequency") +
ggtitle("Control_1")
C2 <- ggplot(data = control) +
geom_histogram(mapping = aes(x = Control_2), colour = 5, fill = 1) +
scale_x_continuous(trans = 'log10') +
xlab("log10(Expression Values)") +
ylab("Frequency") +
ggtitle("Control_2")
C3 <- ggplot(data = control) +
geom_histogram(mapping = aes(x = Control_3), colour = 5, fill = 1) +
scale_x_continuous(trans = 'log10') +
xlab("log10(Expression Values)") +
ylab("Frequency") +
ggtitle("Control_3")
grid.arrange(C1, C2, C3)
#Infected Graphs
I1 <- ggplot(data = infected) +
geom_histogram(mapping = aes(x = RSV_1), colour = 7, fill = 2) +
scale_x_continuous(trans = 'log10') +
xlab("log10(Expression Values)") +
ylab("Frequency") +
ggtitle("RSV_1")
I2 <- ggplot(data = infected) +
geom_histogram(mapping = aes(x = RSV_2),colour = 7, fill = 2) +
scale_x_continuous(trans = 'log10') +
xlab("log10(Expression Values)") +
ylab("Frequency") +
ggtitle("RSV_2")
I3 <- ggplot(data = infected) +
geom_histogram(mapping = aes(x = RSV_3), color = 7, fill = 2) +
scale_x_continuous(trans = 'log10') +
xlab("log10(Expression Values)") +
ylab("Frequency") +
ggtitle("RSV_3")
grid.arrange(I1,I2,I3)
#All sample graph
grid.arrange(C1,C2,C3,I1,I2,I3, nrow(2))