-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGenomics Paper.Rmd
More file actions
118 lines (99 loc) · 7.62 KB
/
Genomics Paper.Rmd
File metadata and controls
118 lines (99 loc) · 7.62 KB
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
```{r}
#Read data for Core and Genomics values
Genomics_values<- read_csv("~/Documents/MSc Bioinformatics/Projects/Genomics paper_HNSCC/Genomics_values.csv")
Genomics_values <- replace(Genomics_values, Genomics_values=='', NA)
Genomics_Margin_value<-read.csv("~/Documents/MSc Bioinformatics/Projects/Genomics paper_HNSCC/Margin_Genomics_Values.csv")
Genomics_Margin_value <- replace(Genomics_Margin_value, Genomics_Margin_value=='', NA)
Genomics_2<-Genomics_values[-62,]
Genomics_M<-Genomics_Margin_value[-62,]
#Gene specific data for core and margin samples
AJUBA<-Genomics_values[1:9,]
CASP8<-Genomics_values[10:18,]
CDKN2A<-Genomics_values[19:27,]
CUL3<-Genomics_values[28:36,]
FAT1<-Genomics_values[37:45,]
FBXW7<-Genomics_values[46:54,]
HLA.A<-Genomics_values[55:63,]
KMT2D<-Genomics_values[64:72,]
NFE2L2<-Genomics_values[73:81,]
NOTCH1<-Genomics_values[82:90,]
NSD1<-Genomics_values[91:99,]
PIK3CA<-Genomics_values[100:108,]
PIK3R1<-Genomics_values[109:117,]
PTEN<-Genomics_values[118:126,]
RB1<-Genomics_values[127:135,]
TGFBR2<-Genomics_values[136:144,]
TP53<-Genomics_values[145:153,]
TRAF3<-Genomics_values[154:162,]
HIRAS<-Genomics_values[163:171,]
list_of_genes<-c("AJUBA", "CASP8", "CDKN2A", "CUL3", "FAT1", "FBXW7", "HLA.A","KMT2D", "NFE2L2","NOTCH1","NSD1","PIK3CA","PIK3R1","PTEN","RB1","TGFBR2","TP53","TRAF3","HIRAS")
library(ggplot2)
genenomicsplt<-function(gene_name){
ggplot(data = gene_name, aes(x=Margin, y= Core, color=gene_name$Gene),xlim=c(0,0.7), ylim=c(0,0.7)) +
geom_point()
}
pdf("~/Documents/MSc Bioinformatics/Projects/Genomics paper_HNSCC/Genebased_Dot PLot.pdf",height = 10, width=20)
ggplot(data = AJUBA, aes(x=Margin, y= Core, color=AJUBA$Gene),xlim=c(0,0.7), ylim=c(0,0.7)) +
geom_point(size=3)+theme(legend.key.size = unit(2, "lines"),
legend.text = element_text(size = 12))+ labs(title = "AJUBA",
x = "Margin",
y = "Core")
ggplot(data = CASP8, aes(x=Margin, y= Core, color=CASP8$Gene),xlim=c(0,0.7), ylim=c(0,0.7)) +
geom_point(size=3)+theme(legend.key.size = unit(2, "lines"), legend.text = element_text(size = 12))+ labs(title = "CASP8", x = "Margin", y = "Core")
ggplot(data = CDKN2A, aes(x=Margin, y= Core, color=CDKN2A$Gene),xlim=c(0,0.7), ylim=c(0,0.7)) +
geom_point(size=3)+theme(legend.key.size = unit(2, "lines"), legend.text = element_text(size = 12))+ labs(title = "CDKN2A", x = "Margin", y = "Core")
ggplot(data = CUL3, aes(x=Margin, y= Core, color=CUL3$Gene),xlim=c(0,0.7), ylim=c(0,0.7)) +
geom_point(size=3)+theme(legend.key.size = unit(2, "lines"), legend.text = element_text(size = 12))+ labs(title = "CUL3", x = "Margin", y = "Core")
ggplot(data = FAT1, aes(x=Margin, y= Core, color=FAT1$Gene),xlim=c(0,0.7), ylim=c(0,0.7)) +
geom_point(size=3)+theme(legend.key.size = unit(2, "lines"), legend.text = element_text(size = 12))+ labs(title = "FAT1", x = "Margin", y = "Core")
ggplot(data = FBXW7, aes(x=Margin, y= Core, color=FBXW7$Gene),xlim=c(0,0.7), ylim=c(0,0.7)) +
geom_point(size=3)+theme(legend.key.size = unit(2, "lines"), legend.text = element_text(size = 12))+ labs(title = "FBXW7", x = "Margin", y = "Core")
ggplot(data = HLA.A, aes(x=Margin, y= Core, color=HLA.A$Gene),xlim=c(0,0.7), ylim=c(0,0.7)) +
geom_point(size=3)+theme(legend.key.size = unit(2, "lines"), legend.text = element_text(size = 12))+ labs(title = "HLA.A", x = "Margin", y = "Core")
ggplot(data = KMT2D, aes(x=Margin, y= Core, color=KMT2D$Gene),xlim=c(0,0.7), ylim=c(0,0.7)) +
geom_point(size=3)+theme(legend.key.size = unit(2, "lines"), legend.text = element_text(size = 12))+ labs(title = "KMT2D", x = "Margin", y = "Core")
ggplot(data = NFE2L2, aes(x=Margin, y= Core, color=NFE2L2$Gene),xlim=c(0,0.7), ylim=c(0,0.7)) +
geom_point(size=3)+theme(legend.key.size = unit(2, "lines"), legend.text = element_text(size = 12))+ labs(title = "NFE2L2", x = "Margin", y = "Core")
ggplot(data = NOTCH1, aes(x=Margin, y= Core, color=NOTCH1$Gene),xlim=c(0,0.7), ylim=c(0,0.7)) +
geom_point(size=3)+theme(legend.key.size = unit(2, "lines"), legend.text = element_text(size = 12))+ labs(title = "NOTCH1", x = "Margin", y = "Core")
ggplot(data = NSD1, aes(x=Margin, y= Core, color=NSD1$Gene),xlim=c(0,0.7), ylim=c(0,0.7)) +
geom_point(size=3)+theme(legend.key.size = unit(2, "lines"), legend.text = element_text(size = 12))+ labs(title = "NSD1", x = "Margin", y = "Core")
ggplot(data = PTEN, aes(x=Margin, y= Core, color=PTEN$Gene),xlim=c(0,0.7), ylim=c(0,0.7)) +
geom_point(size=3)+theme(legend.key.size = unit(2, "lines"), legend.text = element_text(size = 12))+ labs(title = "PTEN", x = "Margin", y = "Core")
ggplot(data = PIK3R1, aes(x=Margin, y= Core, color=PIK3R1$Gene),xlim=c(0,0.7), ylim=c(0,0.7)) +
geom_point(size=3)+theme(legend.key.size = unit(2, "lines"), legend.text = element_text(size = 12))+ labs(title = "PIK3R1", x = "Margin", y = "Core")
ggplot(data = PIK3CA, aes(x=Margin, y= Core, color=PIK3CA$Gene),xlim=c(0,0.7), ylim=c(0,0.7)) +
geom_point(size=3)+theme(legend.key.size = unit(2, "lines"), legend.text = element_text(size = 12))+ labs(title = "PIK3CA", x = "Margin", y = "Core")
ggplot(data = RB1, aes(x=Margin, y= Core, color=RB1$Gene),xlim=c(0,0.7), ylim=c(0,0.7)) +
geom_point(size=3)+theme(legend.key.size = unit(2, "lines"), legend.text = element_text(size = 12))+ labs(title = "RB1", x = "Margin", y = "Core")
ggplot(data = TGFBR2, aes(x=Margin, y= Core, color=TGFBR2$Gene),xlim=c(0,0.7), ylim=c(0,0.7)) +
geom_point(size=3)+theme(legend.key.size = unit(2, "lines"), legend.text = element_text(size = 12))+ labs(title = "TGFBR2", x = "Margin", y = "Core")
ggplot(data = TP53, aes(x=Margin, y= Core, color=TP53$Gene),xlim=c(0,0.7), ylim=c(0,0.7)) +
geom_point(size=3)+theme(legend.key.size = unit(2, "lines"), legend.text = element_text(size = 12))+ labs(title = "TP53", x = "Margin", y = "Core")
ggplot(data = TRAF3, aes(x=Margin, y= Core, color=TRAF3$Gene),xlim=c(0,0.7), ylim=c(0,0.7)) +
geom_point(size=3)+theme(legend.key.size = unit(2, "lines"), legend.text = element_text(size = 12))+ labs(title = "TRAF3", x = "Margin", y = "Core")
ggplot(data = HIRAS, aes(x=Margin, y= Core, color=HIRAS$Gene),xlim=c(0,0.7), ylim=c(0,0.7)) +
geom_point(size=3)+theme(legend.key.size = unit(2, "lines"), legend.text = element_text(size = 12))+ labs(title = "HIRAS", x = "Margin", y = "Core")
dev.off()
pdf("~/Documents/MSc Bioinformatics/Projects/Genomics paper_HNSCC/GenomePLot.pdf",height = 10, width=20)
ggplot(data = gene_name, aes(x=Margin, y= Core, color=gene_name$Gene),xlim=c(0,0.7), ylim=c(0,0.7)) +
geom_point()
dev.off()
plot(Genomics_2$Core,Genomics_2$Margin)
```
```{r}
#Plot for Gene vs Values without annotation
g_vs_val<-ggplot()+geom_point(data = Genomics_2, aes(x = Core, y = Gene, color = Tissue),size=5) +theme(axis.text=element_text(size=12),
axis.title=element_text(size=14,face="bold"),legend.text=element_text(size=15))+
geom_point(data = Genomics_M, aes(x = Margin, y = Gene, color = Tissue),size=5)
g_vs_val
```
```{r}
#Plot for Gene vs Values with annotation
g_vs_val_ann<-ggplot() +
geom_point(data = Genomics_2, aes(x = Core, y = Gene, color = Tissue)) +
geom_text(data = Genomics_2, aes(x = Core, y = Gene, label = Patient), vjust = -0.5) +
geom_point(data = Genomics_M, aes(x = Margin, y = Gene, color = Tissue)) +
geom_text(data = Genomics_M, aes(x = Margin, y = Gene, label = Patient), vjust = -0.5)
g_vs_val_ann
```