-
Notifications
You must be signed in to change notification settings - Fork 0
/
step1-tis-spec-uniq.R
executable file
·43 lines (30 loc) · 1.04 KB
/
step1-tis-spec-uniq.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
load("tis.spec.uniq.570.RData")
load("tis.spec.uniq.RData")
#tis<-tis.gpl570
source("step1-funcs.R")
####################
L.label<-tis.label(tis)
L.ind<-L.label$L.ind
mat.tis<-L.label$mat.tis
sapply(L.ind,length)
#write.csv(mat.tis,file="mat.tis.gpl570.csv")
####################
dis.cat<-rep(-1,nrow(tis))
for(i in 1:length(L.ind)){
dis.cat[L.ind[[i]]]<-cat.names[i]
}
table(dis.cat)
####################
str1<-sapply(strsplit(tis[,1],"/"),function(x)x[3])
prefix<-sapply(strsplit(str1,"_"),function(x)x[1])
geo.acc<-sapply(strsplit(prefix,"-"),function(x)x[1])
####################
tab.tis<-table(dis.cat)
gz.1<-gsub("matrix.txt.gz ","matrix.txt.gz",tis[,1])
tis.spec.annot<-data.frame(gz.1,dis.cat,geo.acc,prefix,tis)
tis.spec.annot<-tis.sepc.annot[order(tis.sepc.annot$dis.cat),][-1,]
write.csv(tis.spec.annot,file="tissue-categorization.csv")
save(tis.spec.annot,L.pat,file="tissue-categorization.RData")
####################
#tis.left<-tis[dis.cat==-1,]
#sort(table(tis.left[,3]),decreasing=T)[11:20]