-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGene_clustring_code
101 lines (46 loc) · 2.45 KB
/
Gene_clustring_code
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
scores <- data.frame(pc$x, timepoint)
(pcaplot <- ggplot(scores, aes(x = PC1, y = PC2, col = (factor(timepoint)))))
geom_point(size = 5)
ggtitle("Principal Components")
scale_colour_brewer(name = " ", palette = "Set1")
theme(plot.title = element_text(face = 'bold'),
legend.position = c(.9,.2),
legend.key = element_rect(fill = 'NA'),
legend.text = element_text(size = 10, face = "bold"),
axis.text.y = element_text(colour = "Black"),
axis.text.x = element_text(colour = "Black"),
axis.title.x = element_text(face = "bold"),
axis.title.y = element_text(face = 'bold'),
panel.grid.major.x = element_blank(),
panel.grid.major.y = element_blank(),
panel.grid.minor.x = element_blank(),
panel.grid.minor.y = element_blank(),
panel.background = element_rect(color = 'black',fill = NA)
)
**************************************************************************************************************************
#Gene clustering
library( "genefilter" )
topVarGenes_day3_day0_50 <- head( order( rowVars( assay(vsd.sub_day0_day3) ), decreasing=TRUE ), 50 )
heatmap.2( assay(vsd.sub_day0_day3)[ topVarGenes_day3_day0_50, ], scale="row",
trace="none", dendrogram="column",
col = colorRampPalette( rev(brewer.pal(9, "RdBu")) )(255),
ColSideColors = c( Control="gray", DPN="darkgreen" )[
colData(vsd.sub_day0_day3)$timepoint ] )
#Gene clustering
library( "genefilter" )
topVarGenes_day6_day0_50 <- head( order( rowVars( assay(vsd.sub_day0_day6) ), decreasing=TRUE ), 50 )
heatmap.2( assay(vsd.sub_day0_day6)[ topVarGenes_day6_day0_50, ], scale="row",
trace="none", dendrogram="column",
col = colorRampPalette( rev(brewer.pal(9, "RdBu")) )(255),
ColSideColors = c( Control="gray", DPN="darkgreen" )[
colData(vsd.sub_day0_day6)$timepoint ] )
title("day6_day0")
> #Gene clustering
> library( "genefilter" )
> topVarGenes_day9_day0_50 <- head( order( rowVars( assay(vsd.sub_day0_day9) ), decreasing=TRUE ), 50 )
> heatmap.2( assay(vsd.sub_day0_day9)[ topVarGenes_day9_day0_50, ], scale="row",
+ trace="none", dendrogram="column",
+ col = colorRampPalette( rev(brewer.pal(9, "RdBu")) )(255),
+ ColSideColors = c( Control="gray", DPN="darkgreen" )[
+ colData(vsd.sub_day0_day9)$timepoint ] )
> title("day9_day0")