Mercurial > repos > cristian > rbgoa
annotate GO_deltaRanks_correlation.R @ 2:5acf9dfdfa27 draft default tip
planemo upload commit 66a856bcce69986d9a6f1a39820dd9b3f4f6b0db
author | cristian |
---|---|
date | Wed, 09 Nov 2022 08:57:54 +0000 |
parents | 91261b42c07e |
children |
rev | line source |
---|---|
0
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
1 #setwd("~/Dropbox/Documents/dixon_2017_RT-GBM/reciprocal_transplant_methylationV2/clean_july12/scripts") |
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
2 |
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
3 data1=read.table("MWU_MF_heat_lpv.csv",header=T) |
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
4 data2=read.table("MWU_MF_surv_lpv.csv",header=T) |
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
5 |
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
6 goods=intersect(data1$term,data2$term) |
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
7 #goods=unique(as.character(c(data1$term[data1$p.adj<=0.1],data2$term[data2$p.adj<=0.1]))) |
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
8 length(goods) |
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
9 |
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
10 data1=data1[data1$term %in% goods,] |
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
11 data2=data2[data2$term %in% goods,] |
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
12 |
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
13 # all overlapping GO terms |
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
14 ress=merge(data1,data2,by="term") |
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
15 plot(delta.rank.x~delta.rank.y,ress,xlab="GBM", ylab="GE",mgp=c(2.3,1,0)) |
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
16 abline(v=0,lty=3) |
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
17 abline(h=0,lty=3) |
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
18 |
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
19 # GO terms highly signifcant in any of the two datasets |
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
20 sigs=(ress$p.adj.x<=0.01 | ress$p.adj.y<=0.01) |
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
21 sum(sigs) # 71 |
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
22 plot(delta.rank.x~delta.rank.y,ress[sigs,],xlab="GBM", ylab="GE",mgp=c(2.3,1,0)) |
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
23 abline(v=0,lty=3) |
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
24 abline(h=0,lty=3) |
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
25 |
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
26 # GO terms signifcant in both datasets |
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
27 sigs=(ress$p.adj.x<=0.1 & ress$p.adj.y<=0.1) |
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
28 sum(sigs) # 20 |
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
29 plot(delta.rank.x~delta.rank.y,ress[sigs,],xlab="GBM", ylab="GE",mgp=c(2.3,1,0)) |
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
30 abline(v=0,lty=3) |
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
31 abline(h=0,lty=3) |
91261b42c07e
"planemo upload commit 25eebba0c98dd7a5a703412be90e97f13f66b5bc"
cristian
parents:
diff
changeset
|
32 |