-
Notifications
You must be signed in to change notification settings - Fork 1
/
m6Apick.R
195 lines (163 loc) · 8.85 KB
/
m6Apick.R
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
source("https://raw.githubusercontent.com/Shicheng-Guo/GscRbasement/master/OROSmerge.R")
source("https://raw.githubusercontent.com/Shicheng-Guo/GscRbasement/master/pancancermetadge.R")
source("https://raw.githubusercontent.com/Shicheng-Guo/GscRbasement/master/pancancermetaOsHr.R")
# breast cancer
m6A<-read.csv("/home/guosa/hpc/project/m6A/GTEx_Analysis_v8_eQTL/Breast_Mammary_Tissue.v8.signif_variant_gene_pairs.txt.rsid.txt.m6A.txt.pick.csv")
brcagwas1<-read.csv("cminput.1.csv",as.is=T)
brcagwas2<-read.csv("cminput.2.csv",as.is=T)
brcagwas3<-read.csv("cminput.3.csv",as.is=T)
out1<-merge(brcagwas1,m6A,by.x="SNP",by.y="V9")
out2<-merge(brcagwas2,m6A,by.x="SNP",by.y="V9")
out3<-merge(brcagwas3,m6A,by.x="SNP",by.y="V9")
rlt1<-subset(out1,as.numeric(trait1)<0.01)
rlt2<-subset(out2,as.numeric(trait1)<0.01)
rlt3<-subset(out3,as.numeric(trait1)<0.01)
rlt<-rbind(rlt1,rlt2,rlt3)
write.csv(rlt,file="brcaGwas.m6A.eQTL.csv",quote=F)
write.table(rlt,file="brcaGwas.m6A.eQTL.txt",quote=F,col.names = NA,row.names = T,sep="\t")
source("https://raw.githubusercontent.com/Shicheng-Guo/GscRbasement/master/pancancermetadge.R")
source("https://raw.githubusercontent.com/Shicheng-Guo/GscRbasement/master/pancancermetaOsHr.R")
symbolist<-as.character(unique(rlt[,ncol(rlt)]))
pancancermetadge(symbolist,memo="brca.m6A.eQTL.pancancer.dge")
pancancermetaOsHr(symbolist,memo="brca.m6A.eQTL.pancancer.hr.os")
# esophagus cancer
setwd("/home/guosa/hpc/project/m6A/esophagus")
m6A1<-read.csv("/home/guosa/hpc/project/m6A/GTEx_Analysis_v8_eQTL/Esophagus_Gastroesophageal_Junction.v8.signif_variant_gene_pairs.txt.rsid.txt.m6A.txt.pick.csv")
m6A2<-read.csv("/home/guosa/hpc/project/m6A/GTEx_Analysis_v8_eQTL/Esophagus_Mucosa.v8.signif_variant_gene_pairs.txt.rsid.txt.m6A.txt.pick.csv")
m6A3<-read.csv("/home/guosa/hpc/project/m6A/GTEx_Analysis_v8_eQTL/Esophagus_Muscularis.v8.signif_variant_gene_pairs.txt.rsid.txt.m6A.txt.pick.csv")
rlt<-rbind(m6A1,m6A2,m6A3)
write.csv(rlt,file="esophagus.m6A.eQTL.csv",quote=F)
write.table(rlt,file="esophagus.m6A.eQTL.txt",quote=F,col.names = NA,row.names = T,sep="\t")
symbolist<-as.character(unique(rlt[,ncol(rlt)]))
pancancermetadge(symbolist,memo="esophagus.m6A.eQTL.pancancer.dge")
pancancermetaOsHr(symbolist,memo="esophagus.m6A.eQTL.pancancer.hr.os")
OROSmerge(memo="HCC")
# liver cancer
memo="HCC"
setwd("/home/guosa/hpc/project/m6A/")
wdir<-paste("/home/guosa/hpc/project/m6A/",memo,sep="")
dir.create(wdir)
setwd(wdir)
m6A1<-read.csv("/home/guosa/hpc/project/m6A/GTEx_Analysis_v8_eQTL/Liver.v8.signif_variant_gene_pairs.txt.rsid.txt.m6A.txt.pick.csv")
rlt<-rbind(m6A1)
write.csv(rlt,file=paste(memo,"m6A.eQTL.csv",sep=""),quote=F)
write.table(rlt,file=paste(memo,"m6A.eQTL.txt",sep=""),quote=F,col.names = NA,row.names = T,sep="\t")
symbolist<-as.character(unique(rlt[,ncol(rlt)]))
pancancermetadge(symbolist,memo=paste(memo,".m6A.eQTL.pancancer.dge",sep=""))
pancancermetaOsHr(symbolist,memo=paste(memo,".m6A.eQTL.pancancer.hr.os",sep=""))
OROSmerge(memo)
# thyroid cancer
memo="thyroid"
setwd("/home/guosa/hpc/project/m6A/")
wdir<-paste("/home/guosa/hpc/project/m6A/",memo,sep="")
dir.create(wdir)
setwd(wdir)
m6A1<-read.csv("/home/guosa/hpc/project/m6A/GTEx_Analysis_v8_eQTL/Thyroid.v8.signif_variant_gene_pairs.txt.rsid.txt.m6A.txt.pick.csv")
rlt<-rbind(m6A1)
write.csv(rlt,file=paste(memo,"m6A.eQTL.csv",sep=""),quote=F)
write.table(rlt,file=paste(memo,"m6A.eQTL.txt",sep=""),quote=F,col.names = NA,row.names = T,sep="\t")
symbolist<-as.character(unique(rlt[,ncol(rlt)]))
pancancermetadge(symbolist,memo=paste(memo,".m6A.eQTL.pancancer.dge",sep=""))
pancancermetaOsHr(symbolist,memo=paste(memo,".m6A.eQTL.pancancer.hr.os",sep=""))
OROSmerge(memo)
# lung cancer
memo="lung"
setwd("/home/guosa/hpc/project/m6A/")
wdir<-paste("/home/guosa/hpc/project/m6A/",memo,sep="")
dir.create(wdir)
setwd(wdir)
m6A1<-read.csv("/home/guosa/hpc/project/m6A/GTEx_Analysis_v8_eQTL/Lung.v8.signif_variant_gene_pairs.txt.rsid.txt.m6A.txt.pick.csv")
rlt<-rbind(m6A1)
write.csv(rlt,file=paste(memo,"m6A.eQTL.csv",sep=""),quote=F)
write.table(rlt,file=paste(memo,"m6A.eQTL.txt",sep=""),quote=F,col.names = NA,row.names = T,sep="\t")
symbolist<-as.character(unique(rlt[,ncol(rlt)]))
pancancermetadge(symbolist,memo=paste(memo,".m6A.eQTL.pancancer.dge",sep=""))
pancancermetaOsHr(symbolist,memo=paste(memo,".m6A.eQTL.pancancer.hr.os",sep=""))
OROSmerge(memo)
# pancreatic cancer
memo="pancreatic"
setwd("/home/guosa/hpc/project/m6A/")
wdir<-paste("/home/guosa/hpc/project/m6A/",memo,sep="")
dir.create(wdir)
setwd(wdir)
m6A1<-read.csv("/home/guosa/hpc/project/m6A/GTEx_Analysis_v8_eQTL/Pancreas.v8.signif_variant_gene_pairs.txt.rsid.txt.m6A.txt.pick.csv")
rlt<-rbind(m6A1)
write.csv(rlt,file=paste(memo,"m6A.eQTL.csv",sep=""),quote=F)
write.table(rlt,file=paste(memo,"m6A.eQTL.txt",sep=""),quote=F,col.names = NA,row.names = T,sep="\t")
symbolist<-as.character(unique(rlt[,ncol(rlt)]))
pancancermetadge(symbolist,memo=paste(memo,".m6A.eQTL.pancancer.dge",sep=""))
pancancermetaOsHr(symbolist,memo=paste(memo,".m6A.eQTL.pancancer.hr.os",sep=""))
OROSmerge(memo)
# colon cancer
memo="colon"
setwd("/home/guosa/hpc/project/m6A/")
wdir<-paste("/home/guosa/hpc/project/m6A/",memo,sep="")
dir.create(wdir)
setwd(wdir)
m6A1<-read.csv("/home/guosa/hpc/project/m6A/GTEx_Analysis_v8_eQTL/Colon_Sigmoid.v8.signif_variant_gene_pairs.txt.rsid.txt.m6A.txt.pick.csv")
m6A2<-read.csv("/home/guosa/hpc/project/m6A/GTEx_Analysis_v8_eQTL/Colon_Transverse.v8.signif_variant_gene_pairs.txt.rsid.txt.m6A.txt.pick.csv")
m6A3<-read.csv("/home/guosa/hpc/project/m6A/GTEx_Analysis_v8_eQTL/Small_Intestine_Terminal_Ileum.v8.signif_variant_gene_pairs.txt.rsid.txt.m6A.txt.pick.csv")
rlt<-rbind(m6A1,m6A2,m6A3)
write.csv(rlt,file=paste(memo,"m6A.eQTL.csv",sep=""),quote=F)
write.table(rlt,file=paste(memo,"m6A.eQTL.txt",sep=""),quote=F,col.names = NA,row.names = T,sep="\t")
symbolist<-as.character(unique(rlt[,ncol(rlt)]))
pancancermetadge(symbolist,memo=paste(memo,".m6A.eQTL.pancancer.dge",sep=""))
pancancermetaOsHr(symbolist,memo=paste(memo,".m6A.eQTL.pancancer.hr.os",sep=""))
OROSmerge(memo)
# Stomach cancer
memo="Stomach"
setwd("/home/guosa/hpc/project/m6A/")
wdir<-paste("/home/guosa/hpc/project/m6A/",memo,sep="")
dir.create(wdir)
setwd(wdir)
m6A1<-read.csv("/home/guosa/hpc/project/m6A/GTEx_Analysis_v8_eQTL/Stomach.v8.signif_variant_gene_pairs.txt.rsid.txt.m6A.txt.pick.csv")
rlt<-rbind(m6A1)
write.csv(rlt,file=paste(memo,"m6A.eQTL.csv",sep=""),quote=F)
write.table(rlt,file=paste(memo,"m6A.eQTL.txt",sep=""),quote=F,col.names = NA,row.names = T,sep="\t")
symbolist<-as.character(unique(rlt[,ncol(rlt)]))
pancancermetadge(symbolist,memo=paste(memo,".m6A.eQTL.pancancer.dge",sep=""))
pancancermetaOsHr(symbolist,memo=paste(memo,".m6A.eQTL.pancancer.hr.os",sep=""))
OROSmerge(memo)
# Ovary cancer
memo="Ovary"
setwd("/home/guosa/hpc/project/m6A/")
wdir<-paste("/home/guosa/hpc/project/m6A/",memo,sep="")
dir.create(wdir)
setwd(wdir)
m6A1<-read.csv("/home/guosa/hpc/project/m6A/GTEx_Analysis_v8_eQTL/Ovary.v8.signif_variant_gene_pairs.txt.rsid.txt.m6A.txt.pick.csv")
rlt<-rbind(m6A1)
write.csv(rlt,file=paste(memo,"m6A.eQTL.csv",sep=""),quote=F)
write.table(rlt,file=paste(memo,"m6A.eQTL.txt",sep=""),quote=F,col.names = NA,row.names = T,sep="\t")
symbolist<-as.character(unique(rlt[,ncol(rlt)]))
pancancermetadge(symbolist,memo=paste(memo,".m6A.eQTL.pancancer.dge",sep=""))
pancancermetaOsHr(symbolist,memo=paste(memo,".m6A.eQTL.pancancer.hr.os",sep=""))
OROSmerge(memo)
# Ovary cancer
memo="Prostate"
setwd("/home/guosa/hpc/project/m6A/")
wdir<-paste("/home/guosa/hpc/project/m6A/",memo,sep="")
dir.create(wdir)
setwd(wdir)
m6A1<-read.csv("/home/guosa/hpc/project/m6A/GTEx_Analysis_v8_eQTL/Prostate.v8.signif_variant_gene_pairs.txt.rsid.txt.m6A.txt.pick.csv")
rlt<-rbind(m6A1)
write.csv(rlt,file=paste(memo,"m6A.eQTL.csv",sep=""),quote=F)
write.table(rlt,file=paste(memo,"m6A.eQTL.txt",sep=""),quote=F,col.names = NA,row.names = T,sep="\t")
symbolist<-as.character(unique(rlt[,ncol(rlt)]))
pancancermetadge(symbolist,memo=paste(memo,".m6A.eQTL.pancancer.dge",sep=""))
pancancermetaOsHr(symbolist,memo=paste(memo,".m6A.eQTL.pancancer.hr.os",sep=""))
OROSmerge(memo)
# Skin cancer
memo="skin"
setwd("/home/guosa/hpc/project/m6A/")
wdir<-paste("/home/guosa/hpc/project/m6A/",memo,sep="")
dir.create(wdir)
setwd(wdir)
m6A1<-read.csv("/home/guosa/hpc/project/m6A/GTEx_Analysis_v8_eQTL/Skin_Not_Sun_Exposed_Suprapubic.v8.signif_variant_gene_pairs.txt.rsid.txt.m6A.txt.pick.csv")
m6A2<-read.csv("/home/guosa/hpc/project/m6A/GTEx_Analysis_v8_eQTL/Skin_Sun_Exposed_Lower_leg.v8.signif_variant_gene_pairs.txt.rsid.txt.m6A.txt.pick.csv")
rlt<-rbind(m6A1,m6A2)
write.csv(rlt,file=paste(memo,"m6A.eQTL.csv",sep=""),quote=F)
write.table(rlt,file=paste(memo,"m6A.eQTL.txt",sep=""),quote=F,col.names = NA,row.names = T,sep="\t")
symbolist<-as.character(unique(rlt[,ncol(rlt)]))
pancancermetadge(symbolist,memo=paste(memo,".m6A.eQTL.pancancer.dge",sep=""))
pancancermetaOsHr(symbolist,memo=paste(memo,".m6A.eQTL.pancancer.hr.os",sep=""))
OROSmerge(memo)