1 |
|
2 |
DECOYSETS<-c("4state_reduced", "fisa", "fisa_casp3", "hg_structal", "ig_structal", "ig_structal_hires", "lattice_ssfit", "lmds", "vhp_mcmd","means") |
3 |
TYPES<-c("atomtype","atomcount","atomcomb","restype","rescount","rescomb") |
4 |
COLORS<-c(2,5,3,6,4,8) |
5 |
|
6 |
postscript("plots-means.ps") |
7 |
|
8 |
for (decoySet in DECOYSETS) { |
9 |
data<-read.table(paste(decoySet,".summary",sep=""),header=FALSE) |
10 |
data<-data[order(data$V3),] # sorting by cutoff ascending |
11 |
|
12 |
# zscores |
13 |
xlim<-c(min(data$V3),max(data$V3)) |
14 |
#ylim<-c(min(data$V7),max(data$V7)) |
15 |
ylim<-c(-2,6.5) |
16 |
yspacing<-(ylim[2]-ylim[1])/25 |
17 |
i=1 |
18 |
for (type in TYPES) { |
19 |
if (i==1) { |
20 |
plot(data$V3[data$V2==type],data$V7[data$V2==type],xlim=xlim,ylim=ylim, |
21 |
xlab="cutoff",ylab="zscore",main=paste("Mean native z-scores for decoy set '",decoySet,"' (size ",data$V5[1],")",sep=""), |
22 |
type="b",col=COLORS[i]) |
23 |
} else { |
24 |
points(data$V3[data$V2==type],data$V7[data$V2==type],xlim=xlim,ylim=ylim,type="b",col=COLORS[i]) |
25 |
} |
26 |
legend(x=xlim[2]-3,y=ylim[2]-yspacing*i, type, col=COLORS[i], lty=1 , bty="n", pch=1) |
27 |
i=i+1 |
28 |
|
29 |
} |
30 |
abline(v=6,col=8,lty=2) |
31 |
abline(h=seq(-2,6,2),col=8) |
32 |
|
33 |
# proportion native ranked 1 |
34 |
ylim<-c(0,1) |
35 |
yspacing<-(ylim[2]-ylim[1])/25 |
36 |
i=1 |
37 |
for (type in TYPES) { |
38 |
if (i==1) { |
39 |
plot(data$V3[data$V2==type],data$V6[data$V2==type],xlim=xlim,ylim=ylim, |
40 |
xlab="cutoff",ylab="native ranked 1st",main=paste("Proportion of ranked-1st natives for decoy set '",decoySet,"' (size ",data$V5[1],")",sep=""), |
41 |
type="b",col=COLORS[i]) |
42 |
} else { |
43 |
points(data$V3[data$V2==type],data$V6[data$V2==type],xlim=xlim,ylim=ylim,type="b",col=COLORS[i]) |
44 |
} |
45 |
legend(x=xlim[2]-3,y=ylim[2]-yspacing*i, type, col=COLORS[i], lty=1 , bty="n", pch=1) |
46 |
i=i+1 |
47 |
|
48 |
} |
49 |
abline(v=6,col=8,lty=2) |
50 |
|
51 |
# rank correlation |
52 |
ylim<-c(0,1) |
53 |
yspacing<-(ylim[2]-ylim[1])/25 |
54 |
i=1 |
55 |
for (type in TYPES) { |
56 |
if (i==1) { |
57 |
plot(data$V3[data$V2==type],-data$V8[data$V2==type],xlim=xlim,ylim=ylim, |
58 |
xlab="cutoff",ylab="spearman",main=paste("Mean rank correlation for decoy set '",decoySet,"' (size ",data$V5[1],")",sep=""), |
59 |
type="b",col=COLORS[i]) |
60 |
} else { |
61 |
points(data$V3[data$V2==type],-data$V8[data$V2==type],xlim=xlim,ylim=ylim,type="b",col=COLORS[i]) |
62 |
} |
63 |
legend(x=xlim[2]-3,y=ylim[2]-yspacing*i, type, col=COLORS[i], lty=1 , bty="n", pch=1) |
64 |
i=i+1 |
65 |
|
66 |
} |
67 |
abline(v=6,col=8,lty=2) |
68 |
|
69 |
} |
70 |
|
71 |
dev.off() |
72 |
|
73 |
|
74 |
DECOYSETS<-c("4state_reduced", "fisa", "fisa_casp3", "hg_structal", "ig_structal", "ig_structal_hires", "lattice_ssfit", "lmds", "vhp_mcmd") |
75 |
TYPES<-c("atomcomb","atomcount","atomtype","rescomb","rescount","restype") |
76 |
COLORS<-c(2,2,2,4,4,4) |
77 |
PCHS<-c(1,4,5,1,4,5) |
78 |
|
79 |
postscript("plots-individual.ps") |
80 |
all.atType.scores<-c() |
81 |
all.atCount.scores<-c() |
82 |
all.resType.scores<-c() |
83 |
all.resCount.scores<-c() |
84 |
|
85 |
for (decoySet in DECOYSETS) { |
86 |
data<-read.table(paste(decoySet,".indiv.summary",sep=""),header=FALSE) |
87 |
# zscores |
88 |
xlim<-c(1,dim(data)[1]) |
89 |
#ylim<-c(min(data$V6),max(data$V6)) |
90 |
ylim<-c(-2,6.5) |
91 |
yspacing<-(ylim[2]-ylim[1])/25 |
92 |
i=1 |
93 |
for (type in TYPES) { |
94 |
if (i==1) { |
95 |
plot(data[,3*i],ylim=ylim, |
96 |
xlab="decoys",ylab="zscore",main=paste("z-scores for decoy set '",decoySet,"'",sep=""), |
97 |
type="p",pch=PCHS[i],col=COLORS[i], |
98 |
axes=FALSE) |
99 |
axis(2) |
100 |
axis(1, at=c(1:dim(data)[1]), labels=data$V1) |
101 |
box() |
102 |
} else { |
103 |
points(data[,3*i],ylim=ylim,type="p",pch=PCHS[i],col=COLORS[i]) |
104 |
} |
105 |
legend(x=xlim[2]-(xlim[2]-xlim[1])/10,y=ylim[2]-yspacing*(i-1), type, col=COLORS[i], lty=0 , bty="n", pch=PCHS[i]) |
106 |
i=i+1 |
107 |
|
108 |
} |
109 |
|
110 |
abline(v=c(1:dim(data)[1]),col=8,lty=3) |
111 |
|
112 |
all.atCount.scores<-c(all.atCount.scores,data$V3) |
113 |
all.atType.scores<-c(all.atType.scores,data$V6) |
114 |
all.resCount.scores<-c(all.resCount.scores,data$V9) |
115 |
all.resType.scores<-c(all.resType.scores,data$V12) |
116 |
|
117 |
|
118 |
} |
119 |
|
120 |
# correlation of z-scores atom type vs atom count |
121 |
corr<-cor(all.atCount.scores,all.atType.scores,method="spearman") |
122 |
plot(all.atCount.scores,all.atType.scores,xlab="z-score atom count",ylab="z-score atom type", |
123 |
main="correlation of z-scores atom type vs count") |
124 |
legend(x=max(all.atCount.scores)-2,y=min(all.atType.scores)+1,corr,col=3,bty="n") |
125 |
# correlation of z-scores res type vs res count |
126 |
corr<-cor(all.resCount.scores,all.resType.scores,method="spearman") |
127 |
plot(all.resCount.scores,all.resType.scores,xlab="z-score res count",ylab="z-score res type", |
128 |
main="correlation of z-scores res type vs count") |
129 |
legend(x=max(all.resCount.scores)-2,y=min(all.resType.scores)+1,corr,col=2,bty="n") |
130 |
dev.off() |