annotate kinatestid_r/Kinatest-R.R @ 20:f7a6a3ec7710 draft default tip

Uploaded
author jfb
date Fri, 25 May 2018 10:54:11 -0400
parents 9e520c365624
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1 ImportedSubstrateList<- read.csv("input1", stringsAsFactors=FALSE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
2 NegativeSubstrateList<- read.csv("input2", stringsAsFactors=FALSE)
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
3 SubstrateBackgroundFrequency<- read.csv("input3", stringsAsFactors=FALSE, header = FALSE)
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
4
da1012f014bd Uploaded
jfb
parents:
diff changeset
5 ScreenerFilename<-"screener"
da1012f014bd Uploaded
jfb
parents:
diff changeset
6
da1012f014bd Uploaded
jfb
parents:
diff changeset
7
da1012f014bd Uploaded
jfb
parents:
diff changeset
8
16
15b5d4ae4480 Uploaded
jfb
parents: 14
diff changeset
9 FILENAME<-"output1"
15b5d4ae4480 Uploaded
jfb
parents: 14
diff changeset
10 FILENAME2<-"output2"
15b5d4ae4480 Uploaded
jfb
parents: 14
diff changeset
11 FILENAME3<-"output3"
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
12
da1012f014bd Uploaded
jfb
parents:
diff changeset
13
da1012f014bd Uploaded
jfb
parents:
diff changeset
14
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
15 SubstrateBackgroundFrequency<-t(SubstrateBackgroundFrequency)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
16 # number<-nrow(SubstrateBackgroundFrequency)-1
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
17 SubstrateBackgroundFrequency<-SubstrateBackgroundFrequency[2:nrow(SubstrateBackgroundFrequency),]
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
18 Sub<-na.omit(SubstrateBackgroundFrequency)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
19 SubstrateBackgroundFrequency<-Sub
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
20
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
21 args = commandArgs(trailingOnly=TRUE)
18
e16ca3e9fc49 Uploaded
jfb
parents: 17
diff changeset
22 TodaysKinase<-as.character(args[1])
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
23
da1012f014bd Uploaded
jfb
parents:
diff changeset
24
da1012f014bd Uploaded
jfb
parents:
diff changeset
25
da1012f014bd Uploaded
jfb
parents:
diff changeset
26
da1012f014bd Uploaded
jfb
parents:
diff changeset
27
da1012f014bd Uploaded
jfb
parents:
diff changeset
28
da1012f014bd Uploaded
jfb
parents:
diff changeset
29 OutputMatrix<-"KinaseMatrix.csv"
da1012f014bd Uploaded
jfb
parents:
diff changeset
30 CharacterizationTable<-"CharacterizationTableForThisKinase.csv"
da1012f014bd Uploaded
jfb
parents:
diff changeset
31 SDtable<-"SDtableforthisKinase"
da1012f014bd Uploaded
jfb
parents:
diff changeset
32 SiteSelectivityTable<-"SiteSelectivityForThisKinase"
da1012f014bd Uploaded
jfb
parents:
diff changeset
33
da1012f014bd Uploaded
jfb
parents:
diff changeset
34
da1012f014bd Uploaded
jfb
parents:
diff changeset
35
da1012f014bd Uploaded
jfb
parents:
diff changeset
36 substrates<-matrix(rep("A",times=((nrow(ImportedSubstrateList)-1)*15)),ncol = 15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
37 #SeqsToBeScored<-"asdasd"
da1012f014bd Uploaded
jfb
parents:
diff changeset
38
da1012f014bd Uploaded
jfb
parents:
diff changeset
39 for (i in 2:nrow(ImportedSubstrateList))
da1012f014bd Uploaded
jfb
parents:
diff changeset
40 {
da1012f014bd Uploaded
jfb
parents:
diff changeset
41 substratemotif<-ImportedSubstrateList[i,4:18]
da1012f014bd Uploaded
jfb
parents:
diff changeset
42 substratemotif[8]<-"Y"
da1012f014bd Uploaded
jfb
parents:
diff changeset
43 #substratemotif<-paste(substratemotif,sep = "",collapse = "")
da1012f014bd Uploaded
jfb
parents:
diff changeset
44 j=i-1
da1012f014bd Uploaded
jfb
parents:
diff changeset
45 substratemotif<-unlist(substratemotif)
da1012f014bd Uploaded
jfb
parents:
diff changeset
46 substrates[j,1:15]<-substratemotif
da1012f014bd Uploaded
jfb
parents:
diff changeset
47 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
48
da1012f014bd Uploaded
jfb
parents:
diff changeset
49 # SpacesToOs<-c(""="O",)
da1012f014bd Uploaded
jfb
parents:
diff changeset
50 # substrates<-SpacesToOs[substrates]
da1012f014bd Uploaded
jfb
parents:
diff changeset
51
da1012f014bd Uploaded
jfb
parents:
diff changeset
52 SubstrateBackgroundFrequency[nrow(SubstrateBackgroundFrequency),2]
da1012f014bd Uploaded
jfb
parents:
diff changeset
53
da1012f014bd Uploaded
jfb
parents:
diff changeset
54 if(2==2){
da1012f014bd Uploaded
jfb
parents:
diff changeset
55 Amean<-mean(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),2]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
56 Cmean<-mean(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),3]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
57 Dmean<-mean(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),4]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
58 Emean<-mean(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),5]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
59 Fmean<-mean(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),6]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
60 Gmean<-mean(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),7]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
61 Hmean<-mean(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),8]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
62 Imean<-mean(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),9]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
63 Kmean<-mean(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),10]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
64 Lmean<-mean(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),11]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
65 Mmean<-mean(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),12]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
66 Nmean<-mean(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),13]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
67 Pmean<-mean(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),14]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
68 Qmean<-mean(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),15]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
69 Rmean<-mean(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),16]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
70 Smean<-mean(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),17]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
71 Tmean<-mean(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),18]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
72 Vmean<-mean(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),19]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
73 Wmean<-mean(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),20]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
74 Ymean<-mean(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),21]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
75
da1012f014bd Uploaded
jfb
parents:
diff changeset
76 AllMeans<-c(Amean,Cmean,Dmean,Emean,Fmean,Gmean,Hmean,Imean,Kmean,Lmean,Mmean,Nmean,Pmean,Qmean,Rmean,Smean,Tmean,Vmean,Wmean,Ymean)
da1012f014bd Uploaded
jfb
parents:
diff changeset
77
da1012f014bd Uploaded
jfb
parents:
diff changeset
78 Asd<-sd(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),2]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
79 Csd<-sd(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),3]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
80 Dsd<-sd(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),4]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
81 Esd<-sd(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),5]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
82 Fsd<-sd(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),6]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
83 Gsd<-sd(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),7]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
84 Hsd<-sd(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),8]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
85 Isd<-sd(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),9]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
86 Ksd<-sd(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),10]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
87 Lsd<-sd(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),11]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
88 Msd<-sd(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),12]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
89 Nsd<-sd(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),13]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
90 Psd<-sd(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),14]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
91 Qsd<-sd(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),15]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
92 Rsd<-sd(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),16]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
93 Ssd<-sd(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),17]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
94 Tsd<-sd(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),18]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
95 Vsd<-sd(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),19]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
96 Wsd<-sd(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),20]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
97 Ysd<-sd(as.numeric(SubstrateBackgroundFrequency[1:(nrow(SubstrateBackgroundFrequency)),21]), na.rm=TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
98 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
99 AllSDs<-c(Asd,Csd,Dsd,Esd,Fsd,Gsd,Hsd,Isd,Ksd,Lsd,Msd,Nsd,Psd,Qsd,Rsd,Ssd,Tsd,Vsd,Wsd,Ysd)
da1012f014bd Uploaded
jfb
parents:
diff changeset
100 #this is subbackfreq SDs
da1012f014bd Uploaded
jfb
parents:
diff changeset
101
da1012f014bd Uploaded
jfb
parents:
diff changeset
102 SBF_statisticalvalues<-cbind(AllMeans,AllSDs)
da1012f014bd Uploaded
jfb
parents:
diff changeset
103
da1012f014bd Uploaded
jfb
parents:
diff changeset
104 #create the percent table
da1012f014bd Uploaded
jfb
parents:
diff changeset
105 if (1==1){
da1012f014bd Uploaded
jfb
parents:
diff changeset
106 Column1<-substrates[,1]
da1012f014bd Uploaded
jfb
parents:
diff changeset
107 Column2<-substrates[,2]
da1012f014bd Uploaded
jfb
parents:
diff changeset
108 Column3<-substrates[,3]
da1012f014bd Uploaded
jfb
parents:
diff changeset
109 Column4<-substrates[,4]
da1012f014bd Uploaded
jfb
parents:
diff changeset
110 Column5<-substrates[,5]
da1012f014bd Uploaded
jfb
parents:
diff changeset
111 Column6<-substrates[,6]
da1012f014bd Uploaded
jfb
parents:
diff changeset
112 Column7<-substrates[,7]
da1012f014bd Uploaded
jfb
parents:
diff changeset
113 Column8<-substrates[,8]
da1012f014bd Uploaded
jfb
parents:
diff changeset
114 Column9<-substrates[,9]
da1012f014bd Uploaded
jfb
parents:
diff changeset
115 Column10<-substrates[,10]
da1012f014bd Uploaded
jfb
parents:
diff changeset
116 Column11<-substrates[,11]
da1012f014bd Uploaded
jfb
parents:
diff changeset
117 Column12<-substrates[,12]
da1012f014bd Uploaded
jfb
parents:
diff changeset
118 Column13<-substrates[,13]
da1012f014bd Uploaded
jfb
parents:
diff changeset
119 Column14<-substrates[,14]
da1012f014bd Uploaded
jfb
parents:
diff changeset
120 Column15<-substrates[,15]
da1012f014bd Uploaded
jfb
parents:
diff changeset
121
da1012f014bd Uploaded
jfb
parents:
diff changeset
122 spaces1<-sum((Column1%in% ""))
da1012f014bd Uploaded
jfb
parents:
diff changeset
123 spaces2<-sum(Column2%in% "")
da1012f014bd Uploaded
jfb
parents:
diff changeset
124 spaces3<-sum(Column3%in% "")
da1012f014bd Uploaded
jfb
parents:
diff changeset
125 spaces4<-sum(Column4%in% "")
da1012f014bd Uploaded
jfb
parents:
diff changeset
126 spaces5<-sum(Column5%in% "")
da1012f014bd Uploaded
jfb
parents:
diff changeset
127 spaces6<-sum(Column6%in% "")
da1012f014bd Uploaded
jfb
parents:
diff changeset
128 spaces7<-sum(Column7%in% "")
da1012f014bd Uploaded
jfb
parents:
diff changeset
129 spaces8<-sum(Column8%in% "")
da1012f014bd Uploaded
jfb
parents:
diff changeset
130 spaces9<-sum(Column9%in% "")
da1012f014bd Uploaded
jfb
parents:
diff changeset
131 spaces10<-sum(Column10%in% "")
da1012f014bd Uploaded
jfb
parents:
diff changeset
132 spaces11<-sum(Column11%in% "")
da1012f014bd Uploaded
jfb
parents:
diff changeset
133 spaces12<-sum(Column12%in% "")
da1012f014bd Uploaded
jfb
parents:
diff changeset
134 spaces13<-sum(Column13%in% "")
da1012f014bd Uploaded
jfb
parents:
diff changeset
135 spaces14<-sum(Column14%in% "")
da1012f014bd Uploaded
jfb
parents:
diff changeset
136 spaces15<-sum(Column15%in% "")
da1012f014bd Uploaded
jfb
parents:
diff changeset
137
da1012f014bd Uploaded
jfb
parents:
diff changeset
138 A1<-sum(Column1 %in% "A")/(length(Column1)-spaces1)
da1012f014bd Uploaded
jfb
parents:
diff changeset
139 A2<-sum(Column2 %in% "A")/(length(Column2)-spaces2)
da1012f014bd Uploaded
jfb
parents:
diff changeset
140 A3<-sum(Column3 %in% "A")/(length(Column3)-spaces3)
da1012f014bd Uploaded
jfb
parents:
diff changeset
141 A4<-sum(Column4 %in% "A")/(length(Column4)-spaces4)
da1012f014bd Uploaded
jfb
parents:
diff changeset
142 A5<-sum(Column5 %in% "A")/(length(Column5)-spaces5)
da1012f014bd Uploaded
jfb
parents:
diff changeset
143 A6<-sum(Column6 %in% "A")/(length(Column6)-spaces6)
da1012f014bd Uploaded
jfb
parents:
diff changeset
144 A7<-sum(Column7 %in% "A")/(length(Column7)-spaces7)
da1012f014bd Uploaded
jfb
parents:
diff changeset
145 A8<-sum(Column8 %in% "A")/(length(Column8)-spaces8)
da1012f014bd Uploaded
jfb
parents:
diff changeset
146 A9<-sum(Column9 %in% "A")/(length(Column9)-spaces9)
da1012f014bd Uploaded
jfb
parents:
diff changeset
147 A10<-sum(Column10 %in% "A")/(length(Column10)-spaces10)
da1012f014bd Uploaded
jfb
parents:
diff changeset
148 A11<-sum(Column11 %in% "A")/(length(Column11)-spaces11)
da1012f014bd Uploaded
jfb
parents:
diff changeset
149 A12<-sum(Column12 %in% "A")/(length(Column12)-spaces12)
da1012f014bd Uploaded
jfb
parents:
diff changeset
150 A13<-sum(Column13 %in% "A")/(length(Column13)-spaces13)
da1012f014bd Uploaded
jfb
parents:
diff changeset
151 A14<-sum(Column14 %in% "A")/(length(Column14)-spaces14)
da1012f014bd Uploaded
jfb
parents:
diff changeset
152 A15<-sum(Column15 %in% "A")/(length(Column15)-spaces15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
153 AllAs<-cbind(A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14,A15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
154
da1012f014bd Uploaded
jfb
parents:
diff changeset
155 C1<-sum(Column1 %in% "C")/(length(Column1)-spaces1)
da1012f014bd Uploaded
jfb
parents:
diff changeset
156 C2<-sum(Column2 %in% "C")/(length(Column2)-spaces2)
da1012f014bd Uploaded
jfb
parents:
diff changeset
157 C3<-sum(Column3 %in% "C")/(length(Column3)-spaces3)
da1012f014bd Uploaded
jfb
parents:
diff changeset
158 C4<-sum(Column4 %in% "C")/(length(Column4)-spaces4)
da1012f014bd Uploaded
jfb
parents:
diff changeset
159 C5<-sum(Column5 %in% "C")/(length(Column5)-spaces5)
da1012f014bd Uploaded
jfb
parents:
diff changeset
160 C6<-sum(Column6 %in% "C")/(length(Column6)-spaces6)
da1012f014bd Uploaded
jfb
parents:
diff changeset
161 C7<-sum(Column7 %in% "C")/(length(Column7)-spaces7)
da1012f014bd Uploaded
jfb
parents:
diff changeset
162 C8<-sum(Column8 %in% "C")/(length(Column8)-spaces8)
da1012f014bd Uploaded
jfb
parents:
diff changeset
163 C9<-sum(Column9 %in% "C")/(length(Column9)-spaces9)
da1012f014bd Uploaded
jfb
parents:
diff changeset
164 C10<-sum(Column10 %in% "C")/(length(Column10)-spaces10)
da1012f014bd Uploaded
jfb
parents:
diff changeset
165 C11<-sum(Column11 %in% "C")/(length(Column11)-spaces11)
da1012f014bd Uploaded
jfb
parents:
diff changeset
166 C12<-sum(Column12 %in% "C")/(length(Column12)-spaces12)
da1012f014bd Uploaded
jfb
parents:
diff changeset
167 C13<-sum(Column13 %in% "C")/(length(Column13)-spaces13)
da1012f014bd Uploaded
jfb
parents:
diff changeset
168 C14<-sum(Column14 %in% "C")/(length(Column14)-spaces14)
da1012f014bd Uploaded
jfb
parents:
diff changeset
169 C15<-sum(Column15 %in% "C")/(length(Column15)-spaces15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
170 CllCs<-cbind(C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
171
da1012f014bd Uploaded
jfb
parents:
diff changeset
172 D1<-sum(Column1 %in% "D")/(length(Column1)-spaces1)
da1012f014bd Uploaded
jfb
parents:
diff changeset
173 D2<-sum(Column2 %in% "D")/(length(Column2)-spaces2)
da1012f014bd Uploaded
jfb
parents:
diff changeset
174 D3<-sum(Column3 %in% "D")/(length(Column3)-spaces3)
da1012f014bd Uploaded
jfb
parents:
diff changeset
175 D4<-sum(Column4 %in% "D")/(length(Column4)-spaces4)
da1012f014bd Uploaded
jfb
parents:
diff changeset
176 D5<-sum(Column5 %in% "D")/(length(Column5)-spaces5)
da1012f014bd Uploaded
jfb
parents:
diff changeset
177 D6<-sum(Column6 %in% "D")/(length(Column6)-spaces6)
da1012f014bd Uploaded
jfb
parents:
diff changeset
178 D7<-sum(Column7 %in% "D")/(length(Column7)-spaces7)
da1012f014bd Uploaded
jfb
parents:
diff changeset
179 D8<-sum(Column8 %in% "D")/(length(Column8)-spaces8)
da1012f014bd Uploaded
jfb
parents:
diff changeset
180 D9<-sum(Column9 %in% "D")/(length(Column9)-spaces9)
da1012f014bd Uploaded
jfb
parents:
diff changeset
181 D10<-sum(Column10 %in% "D")/(length(Column10)-spaces10)
da1012f014bd Uploaded
jfb
parents:
diff changeset
182 D11<-sum(Column11 %in% "D")/(length(Column11)-spaces11)
da1012f014bd Uploaded
jfb
parents:
diff changeset
183 D12<-sum(Column12 %in% "D")/(length(Column12)-spaces12)
da1012f014bd Uploaded
jfb
parents:
diff changeset
184 D13<-sum(Column13 %in% "D")/(length(Column13)-spaces13)
da1012f014bd Uploaded
jfb
parents:
diff changeset
185 D14<-sum(Column14 %in% "D")/(length(Column14)-spaces14)
da1012f014bd Uploaded
jfb
parents:
diff changeset
186 D15<-sum(Column15 %in% "D")/(length(Column15)-spaces15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
187 DllDs<-cbind(D1,D2,D3,D4,D5,D6,D7,D8,D9,D10,D11,D12,D13,D14,D15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
188
da1012f014bd Uploaded
jfb
parents:
diff changeset
189 E1<-sum(Column1 %in% "E")/(length(Column1)-spaces1)
da1012f014bd Uploaded
jfb
parents:
diff changeset
190 E2<-sum(Column2 %in% "E")/(length(Column2)-spaces2)
da1012f014bd Uploaded
jfb
parents:
diff changeset
191 E3<-sum(Column3 %in% "E")/(length(Column3)-spaces3)
da1012f014bd Uploaded
jfb
parents:
diff changeset
192 E4<-sum(Column4 %in% "E")/(length(Column4)-spaces4)
da1012f014bd Uploaded
jfb
parents:
diff changeset
193 E5<-sum(Column5 %in% "E")/(length(Column5)-spaces5)
da1012f014bd Uploaded
jfb
parents:
diff changeset
194 E6<-sum(Column6 %in% "E")/(length(Column6)-spaces6)
da1012f014bd Uploaded
jfb
parents:
diff changeset
195 E7<-sum(Column7 %in% "E")/(length(Column7)-spaces7)
da1012f014bd Uploaded
jfb
parents:
diff changeset
196 E8<-sum(Column8 %in% "E")/(length(Column8)-spaces8)
da1012f014bd Uploaded
jfb
parents:
diff changeset
197 E9<-sum(Column9 %in% "E")/(length(Column9)-spaces9)
da1012f014bd Uploaded
jfb
parents:
diff changeset
198 E10<-sum(Column10 %in% "E")/(length(Column10)-spaces10)
da1012f014bd Uploaded
jfb
parents:
diff changeset
199 E11<-sum(Column11 %in% "E")/(length(Column11)-spaces11)
da1012f014bd Uploaded
jfb
parents:
diff changeset
200 E12<-sum(Column12 %in% "E")/(length(Column12)-spaces12)
da1012f014bd Uploaded
jfb
parents:
diff changeset
201 E13<-sum(Column13 %in% "E")/(length(Column13)-spaces13)
da1012f014bd Uploaded
jfb
parents:
diff changeset
202 E14<-sum(Column14 %in% "E")/(length(Column14)-spaces14)
da1012f014bd Uploaded
jfb
parents:
diff changeset
203 E15<-sum(Column15 %in% "E")/(length(Column15)-spaces15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
204 EllEs<-cbind(E1,E2,E3,E4,E5,E6,E7,E8,E9,E10,E11,E12,E13,E14,E15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
205
da1012f014bd Uploaded
jfb
parents:
diff changeset
206
da1012f014bd Uploaded
jfb
parents:
diff changeset
207 F1<-sum(Column1 %in% "F")/(length(Column1)-spaces1)
da1012f014bd Uploaded
jfb
parents:
diff changeset
208 F2<-sum(Column2 %in% "F")/(length(Column2)-spaces2)
da1012f014bd Uploaded
jfb
parents:
diff changeset
209 F3<-sum(Column3 %in% "F")/(length(Column3)-spaces3)
da1012f014bd Uploaded
jfb
parents:
diff changeset
210 F4<-sum(Column4 %in% "F")/(length(Column4)-spaces4)
da1012f014bd Uploaded
jfb
parents:
diff changeset
211 F5<-sum(Column5 %in% "F")/(length(Column5)-spaces5)
da1012f014bd Uploaded
jfb
parents:
diff changeset
212 F6<-sum(Column6 %in% "F")/(length(Column6)-spaces6)
da1012f014bd Uploaded
jfb
parents:
diff changeset
213 F7<-sum(Column7 %in% "F")/(length(Column7)-spaces7)
da1012f014bd Uploaded
jfb
parents:
diff changeset
214 F8<-sum(Column8 %in% "F")/(length(Column8)-spaces8)
da1012f014bd Uploaded
jfb
parents:
diff changeset
215 F9<-sum(Column9 %in% "F")/(length(Column9)-spaces9)
da1012f014bd Uploaded
jfb
parents:
diff changeset
216 F10<-sum(Column10 %in% "F")/(length(Column10)-spaces10)
da1012f014bd Uploaded
jfb
parents:
diff changeset
217 F11<-sum(Column11 %in% "F")/(length(Column11)-spaces11)
da1012f014bd Uploaded
jfb
parents:
diff changeset
218 F12<-sum(Column12 %in% "F")/(length(Column12)-spaces12)
da1012f014bd Uploaded
jfb
parents:
diff changeset
219 F13<-sum(Column13 %in% "F")/(length(Column13)-spaces13)
da1012f014bd Uploaded
jfb
parents:
diff changeset
220 F14<-sum(Column14 %in% "F")/(length(Column14)-spaces14)
da1012f014bd Uploaded
jfb
parents:
diff changeset
221 F15<-sum(Column15 %in% "F")/(length(Column15)-spaces15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
222 FllFs<-cbind(F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12,F13,F14,F15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
223
da1012f014bd Uploaded
jfb
parents:
diff changeset
224
da1012f014bd Uploaded
jfb
parents:
diff changeset
225 G1<-sum(Column1 %in% "G")/(length(Column1)-spaces1)
da1012f014bd Uploaded
jfb
parents:
diff changeset
226 G2<-sum(Column2 %in% "G")/(length(Column2)-spaces2)
da1012f014bd Uploaded
jfb
parents:
diff changeset
227 G3<-sum(Column3 %in% "G")/(length(Column3)-spaces3)
da1012f014bd Uploaded
jfb
parents:
diff changeset
228 G4<-sum(Column4 %in% "G")/(length(Column4)-spaces4)
da1012f014bd Uploaded
jfb
parents:
diff changeset
229 G5<-sum(Column5 %in% "G")/(length(Column5)-spaces5)
da1012f014bd Uploaded
jfb
parents:
diff changeset
230 G6<-sum(Column6 %in% "G")/(length(Column6)-spaces6)
da1012f014bd Uploaded
jfb
parents:
diff changeset
231 G7<-sum(Column7 %in% "G")/(length(Column7)-spaces7)
da1012f014bd Uploaded
jfb
parents:
diff changeset
232 G8<-sum(Column8 %in% "G")/(length(Column8)-spaces8)
da1012f014bd Uploaded
jfb
parents:
diff changeset
233 G9<-sum(Column9 %in% "G")/(length(Column9)-spaces9)
da1012f014bd Uploaded
jfb
parents:
diff changeset
234 G10<-sum(Column10 %in% "G")/(length(Column10)-spaces10)
da1012f014bd Uploaded
jfb
parents:
diff changeset
235 G11<-sum(Column11 %in% "G")/(length(Column11)-spaces11)
da1012f014bd Uploaded
jfb
parents:
diff changeset
236 G12<-sum(Column12 %in% "G")/(length(Column12)-spaces12)
da1012f014bd Uploaded
jfb
parents:
diff changeset
237 G13<-sum(Column13 %in% "G")/(length(Column13)-spaces13)
da1012f014bd Uploaded
jfb
parents:
diff changeset
238 G14<-sum(Column14 %in% "G")/(length(Column14)-spaces14)
da1012f014bd Uploaded
jfb
parents:
diff changeset
239 G15<-sum(Column15 %in% "G")/(length(Column15)-spaces15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
240 GllGs<-cbind(G1,G2,G3,G4,G5,G6,G7,G8,G9,G10,G11,G12,G13,G14,G15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
241
da1012f014bd Uploaded
jfb
parents:
diff changeset
242
da1012f014bd Uploaded
jfb
parents:
diff changeset
243 H1<-sum(Column1 %in% "H")/(length(Column1)-spaces1)
da1012f014bd Uploaded
jfb
parents:
diff changeset
244 H2<-sum(Column2 %in% "H")/(length(Column2)-spaces2)
da1012f014bd Uploaded
jfb
parents:
diff changeset
245 H3<-sum(Column3 %in% "H")/(length(Column3)-spaces3)
da1012f014bd Uploaded
jfb
parents:
diff changeset
246 H4<-sum(Column4 %in% "H")/(length(Column4)-spaces4)
da1012f014bd Uploaded
jfb
parents:
diff changeset
247 H5<-sum(Column5 %in% "H")/(length(Column5)-spaces5)
da1012f014bd Uploaded
jfb
parents:
diff changeset
248 H6<-sum(Column6 %in% "H")/(length(Column6)-spaces6)
da1012f014bd Uploaded
jfb
parents:
diff changeset
249 H7<-sum(Column7 %in% "H")/(length(Column7)-spaces7)
da1012f014bd Uploaded
jfb
parents:
diff changeset
250 H8<-sum(Column8 %in% "H")/(length(Column8)-spaces8)
da1012f014bd Uploaded
jfb
parents:
diff changeset
251 H9<-sum(Column9 %in% "H")/(length(Column9)-spaces9)
da1012f014bd Uploaded
jfb
parents:
diff changeset
252 H10<-sum(Column10 %in% "H")/(length(Column10)-spaces10)
da1012f014bd Uploaded
jfb
parents:
diff changeset
253 H11<-sum(Column11 %in% "H")/(length(Column11)-spaces11)
da1012f014bd Uploaded
jfb
parents:
diff changeset
254 H12<-sum(Column12 %in% "H")/(length(Column12)-spaces12)
da1012f014bd Uploaded
jfb
parents:
diff changeset
255 H13<-sum(Column13 %in% "H")/(length(Column13)-spaces13)
da1012f014bd Uploaded
jfb
parents:
diff changeset
256 H14<-sum(Column14 %in% "H")/(length(Column14)-spaces14)
da1012f014bd Uploaded
jfb
parents:
diff changeset
257 H15<-sum(Column15 %in% "H")/(length(Column15)-spaces15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
258 HllHs<-cbind(H1,H2,H3,H4,H5,H6,H7,H8,H9,H10,H11,H12,H13,H14,H15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
259
da1012f014bd Uploaded
jfb
parents:
diff changeset
260
da1012f014bd Uploaded
jfb
parents:
diff changeset
261 I1<-sum(Column1 %in% "I")/(length(Column1)-spaces1)
da1012f014bd Uploaded
jfb
parents:
diff changeset
262 I2<-sum(Column2 %in% "I")/(length(Column2)-spaces2)
da1012f014bd Uploaded
jfb
parents:
diff changeset
263 I3<-sum(Column3 %in% "I")/(length(Column3)-spaces3)
da1012f014bd Uploaded
jfb
parents:
diff changeset
264 I4<-sum(Column4 %in% "I")/(length(Column4)-spaces4)
da1012f014bd Uploaded
jfb
parents:
diff changeset
265 I5<-sum(Column5 %in% "I")/(length(Column5)-spaces5)
da1012f014bd Uploaded
jfb
parents:
diff changeset
266 I6<-sum(Column6 %in% "I")/(length(Column6)-spaces6)
da1012f014bd Uploaded
jfb
parents:
diff changeset
267 I7<-sum(Column7 %in% "I")/(length(Column7)-spaces7)
da1012f014bd Uploaded
jfb
parents:
diff changeset
268 I8<-sum(Column8 %in% "I")/(length(Column8)-spaces8)
da1012f014bd Uploaded
jfb
parents:
diff changeset
269 I9<-sum(Column9 %in% "I")/(length(Column9)-spaces9)
da1012f014bd Uploaded
jfb
parents:
diff changeset
270 I10<-sum(Column10 %in% "I")/(length(Column10)-spaces10)
da1012f014bd Uploaded
jfb
parents:
diff changeset
271 I11<-sum(Column11 %in% "I")/(length(Column11)-spaces11)
da1012f014bd Uploaded
jfb
parents:
diff changeset
272 I12<-sum(Column12 %in% "I")/(length(Column12)-spaces12)
da1012f014bd Uploaded
jfb
parents:
diff changeset
273 I13<-sum(Column13 %in% "I")/(length(Column13)-spaces13)
da1012f014bd Uploaded
jfb
parents:
diff changeset
274 I14<-sum(Column14 %in% "I")/(length(Column14)-spaces14)
da1012f014bd Uploaded
jfb
parents:
diff changeset
275 I15<-sum(Column15 %in% "I")/(length(Column15)-spaces15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
276 IllIs<-cbind(I1,I2,I3,I4,I5,I6,I7,I8,I9,I10,I11,I12,I13,I14,I15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
277
da1012f014bd Uploaded
jfb
parents:
diff changeset
278
da1012f014bd Uploaded
jfb
parents:
diff changeset
279 K1<-sum(Column1 %in% "K")/(length(Column1)-spaces1)
da1012f014bd Uploaded
jfb
parents:
diff changeset
280 K2<-sum(Column2 %in% "K")/(length(Column2)-spaces2)
da1012f014bd Uploaded
jfb
parents:
diff changeset
281 K3<-sum(Column3 %in% "K")/(length(Column3)-spaces3)
da1012f014bd Uploaded
jfb
parents:
diff changeset
282 K4<-sum(Column4 %in% "K")/(length(Column4)-spaces4)
da1012f014bd Uploaded
jfb
parents:
diff changeset
283 K5<-sum(Column5 %in% "K")/(length(Column5)-spaces5)
da1012f014bd Uploaded
jfb
parents:
diff changeset
284 K6<-sum(Column6 %in% "K")/(length(Column6)-spaces6)
da1012f014bd Uploaded
jfb
parents:
diff changeset
285 K7<-sum(Column7 %in% "K")/(length(Column7)-spaces7)
da1012f014bd Uploaded
jfb
parents:
diff changeset
286 K8<-sum(Column8 %in% "K")/(length(Column8)-spaces8)
da1012f014bd Uploaded
jfb
parents:
diff changeset
287 K9<-sum(Column9 %in% "K")/(length(Column9)-spaces9)
da1012f014bd Uploaded
jfb
parents:
diff changeset
288 K10<-sum(Column10 %in% "K")/(length(Column10)-spaces10)
da1012f014bd Uploaded
jfb
parents:
diff changeset
289 K11<-sum(Column11 %in% "K")/(length(Column11)-spaces11)
da1012f014bd Uploaded
jfb
parents:
diff changeset
290 K12<-sum(Column12 %in% "K")/(length(Column12)-spaces12)
da1012f014bd Uploaded
jfb
parents:
diff changeset
291 K13<-sum(Column13 %in% "K")/(length(Column13)-spaces13)
da1012f014bd Uploaded
jfb
parents:
diff changeset
292 K14<-sum(Column14 %in% "K")/(length(Column14)-spaces14)
da1012f014bd Uploaded
jfb
parents:
diff changeset
293 K15<-sum(Column15 %in% "K")/(length(Column15)-spaces15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
294 KllKs<-cbind(K1,K2,K3,K4,K5,K6,K7,K8,K9,K10,K11,K12,K13,K14,K15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
295
da1012f014bd Uploaded
jfb
parents:
diff changeset
296
da1012f014bd Uploaded
jfb
parents:
diff changeset
297 L1<-sum(Column1 %in% "L")/(length(Column1)-spaces1)
da1012f014bd Uploaded
jfb
parents:
diff changeset
298 L2<-sum(Column2 %in% "L")/(length(Column2)-spaces2)
da1012f014bd Uploaded
jfb
parents:
diff changeset
299 L3<-sum(Column3 %in% "L")/(length(Column3)-spaces3)
da1012f014bd Uploaded
jfb
parents:
diff changeset
300 L4<-sum(Column4 %in% "L")/(length(Column4)-spaces4)
da1012f014bd Uploaded
jfb
parents:
diff changeset
301 L5<-sum(Column5 %in% "L")/(length(Column5)-spaces5)
da1012f014bd Uploaded
jfb
parents:
diff changeset
302 L6<-sum(Column6 %in% "L")/(length(Column6)-spaces6)
da1012f014bd Uploaded
jfb
parents:
diff changeset
303 L7<-sum(Column7 %in% "L")/(length(Column7)-spaces7)
da1012f014bd Uploaded
jfb
parents:
diff changeset
304 L8<-sum(Column8 %in% "L")/(length(Column8)-spaces8)
da1012f014bd Uploaded
jfb
parents:
diff changeset
305 L9<-sum(Column9 %in% "L")/(length(Column9)-spaces9)
da1012f014bd Uploaded
jfb
parents:
diff changeset
306 L10<-sum(Column10 %in% "L")/(length(Column10)-spaces10)
da1012f014bd Uploaded
jfb
parents:
diff changeset
307 L11<-sum(Column11 %in% "L")/(length(Column11)-spaces11)
da1012f014bd Uploaded
jfb
parents:
diff changeset
308 L12<-sum(Column12 %in% "L")/(length(Column12)-spaces12)
da1012f014bd Uploaded
jfb
parents:
diff changeset
309 L13<-sum(Column13 %in% "L")/(length(Column13)-spaces13)
da1012f014bd Uploaded
jfb
parents:
diff changeset
310 L14<-sum(Column14 %in% "L")/(length(Column14)-spaces14)
da1012f014bd Uploaded
jfb
parents:
diff changeset
311 L15<-sum(Column15 %in% "L")/(length(Column15)-spaces15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
312 LllLs<-cbind(L1,L2,L3,L4,L5,L6,L7,L8,L9,L10,L11,L12,L13,L14,L15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
313
da1012f014bd Uploaded
jfb
parents:
diff changeset
314
da1012f014bd Uploaded
jfb
parents:
diff changeset
315 M1<-sum(Column1 %in% "M")/(length(Column1)-spaces1)
da1012f014bd Uploaded
jfb
parents:
diff changeset
316 M2<-sum(Column2 %in% "M")/(length(Column2)-spaces2)
da1012f014bd Uploaded
jfb
parents:
diff changeset
317 M3<-sum(Column3 %in% "M")/(length(Column3)-spaces3)
da1012f014bd Uploaded
jfb
parents:
diff changeset
318 M4<-sum(Column4 %in% "M")/(length(Column4)-spaces4)
da1012f014bd Uploaded
jfb
parents:
diff changeset
319 M5<-sum(Column5 %in% "M")/(length(Column5)-spaces5)
da1012f014bd Uploaded
jfb
parents:
diff changeset
320 M6<-sum(Column6 %in% "M")/(length(Column6)-spaces6)
da1012f014bd Uploaded
jfb
parents:
diff changeset
321 M7<-sum(Column7 %in% "M")/(length(Column7)-spaces7)
da1012f014bd Uploaded
jfb
parents:
diff changeset
322 M8<-sum(Column8 %in% "M")/(length(Column8)-spaces8)
da1012f014bd Uploaded
jfb
parents:
diff changeset
323 M9<-sum(Column9 %in% "M")/(length(Column9)-spaces9)
da1012f014bd Uploaded
jfb
parents:
diff changeset
324 M10<-sum(Column10 %in% "M")/(length(Column10)-spaces10)
da1012f014bd Uploaded
jfb
parents:
diff changeset
325 M11<-sum(Column11 %in% "M")/(length(Column11)-spaces11)
da1012f014bd Uploaded
jfb
parents:
diff changeset
326 M12<-sum(Column12 %in% "M")/(length(Column12)-spaces12)
da1012f014bd Uploaded
jfb
parents:
diff changeset
327 M13<-sum(Column13 %in% "M")/(length(Column13)-spaces13)
da1012f014bd Uploaded
jfb
parents:
diff changeset
328 M14<-sum(Column14 %in% "M")/(length(Column14)-spaces14)
da1012f014bd Uploaded
jfb
parents:
diff changeset
329 M15<-sum(Column15 %in% "M")/(length(Column15)-spaces15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
330 MllMs<-cbind(M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
331
da1012f014bd Uploaded
jfb
parents:
diff changeset
332
da1012f014bd Uploaded
jfb
parents:
diff changeset
333 N1<-sum(Column1 %in% "N")/(length(Column1)-spaces1)
da1012f014bd Uploaded
jfb
parents:
diff changeset
334 N2<-sum(Column2 %in% "N")/(length(Column2)-spaces2)
da1012f014bd Uploaded
jfb
parents:
diff changeset
335 N3<-sum(Column3 %in% "N")/(length(Column3)-spaces3)
da1012f014bd Uploaded
jfb
parents:
diff changeset
336 N4<-sum(Column4 %in% "N")/(length(Column4)-spaces4)
da1012f014bd Uploaded
jfb
parents:
diff changeset
337 N5<-sum(Column5 %in% "N")/(length(Column5)-spaces5)
da1012f014bd Uploaded
jfb
parents:
diff changeset
338 N6<-sum(Column6 %in% "N")/(length(Column6)-spaces6)
da1012f014bd Uploaded
jfb
parents:
diff changeset
339 N7<-sum(Column7 %in% "N")/(length(Column7)-spaces7)
da1012f014bd Uploaded
jfb
parents:
diff changeset
340 N8<-sum(Column8 %in% "N")/(length(Column8)-spaces8)
da1012f014bd Uploaded
jfb
parents:
diff changeset
341 N9<-sum(Column9 %in% "N")/(length(Column9)-spaces9)
da1012f014bd Uploaded
jfb
parents:
diff changeset
342 N10<-sum(Column10 %in% "N")/(length(Column10)-spaces10)
da1012f014bd Uploaded
jfb
parents:
diff changeset
343 N11<-sum(Column11 %in% "N")/(length(Column11)-spaces11)
da1012f014bd Uploaded
jfb
parents:
diff changeset
344 N12<-sum(Column12 %in% "N")/(length(Column12)-spaces12)
da1012f014bd Uploaded
jfb
parents:
diff changeset
345 N13<-sum(Column13 %in% "N")/(length(Column13)-spaces13)
da1012f014bd Uploaded
jfb
parents:
diff changeset
346 N14<-sum(Column14 %in% "N")/(length(Column14)-spaces14)
da1012f014bd Uploaded
jfb
parents:
diff changeset
347 N15<-sum(Column15 %in% "N")/(length(Column15)-spaces15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
348 NllNs<-cbind(N1,N2,N3,N4,N5,N6,N7,N8,N9,N10,N11,N12,N13,N14,N15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
349
da1012f014bd Uploaded
jfb
parents:
diff changeset
350
da1012f014bd Uploaded
jfb
parents:
diff changeset
351 P1<-sum(Column1 %in% "P")/(length(Column1)-spaces1)
da1012f014bd Uploaded
jfb
parents:
diff changeset
352 P2<-sum(Column2 %in% "P")/(length(Column2)-spaces2)
da1012f014bd Uploaded
jfb
parents:
diff changeset
353 P3<-sum(Column3 %in% "P")/(length(Column3)-spaces3)
da1012f014bd Uploaded
jfb
parents:
diff changeset
354 P4<-sum(Column4 %in% "P")/(length(Column4)-spaces4)
da1012f014bd Uploaded
jfb
parents:
diff changeset
355 P5<-sum(Column5 %in% "P")/(length(Column5)-spaces5)
da1012f014bd Uploaded
jfb
parents:
diff changeset
356 P6<-sum(Column6 %in% "P")/(length(Column6)-spaces6)
da1012f014bd Uploaded
jfb
parents:
diff changeset
357 P7<-sum(Column7 %in% "P")/(length(Column7)-spaces7)
da1012f014bd Uploaded
jfb
parents:
diff changeset
358 P8<-sum(Column8 %in% "P")/(length(Column8)-spaces8)
da1012f014bd Uploaded
jfb
parents:
diff changeset
359 P9<-sum(Column9 %in% "P")/(length(Column9)-spaces9)
da1012f014bd Uploaded
jfb
parents:
diff changeset
360 P10<-sum(Column10 %in% "P")/(length(Column10)-spaces10)
da1012f014bd Uploaded
jfb
parents:
diff changeset
361 P11<-sum(Column11 %in% "P")/(length(Column11)-spaces11)
da1012f014bd Uploaded
jfb
parents:
diff changeset
362 P12<-sum(Column12 %in% "P")/(length(Column12)-spaces12)
da1012f014bd Uploaded
jfb
parents:
diff changeset
363 P13<-sum(Column13 %in% "P")/(length(Column13)-spaces13)
da1012f014bd Uploaded
jfb
parents:
diff changeset
364 P14<-sum(Column14 %in% "P")/(length(Column14)-spaces14)
da1012f014bd Uploaded
jfb
parents:
diff changeset
365 P15<-sum(Column15 %in% "P")/(length(Column15)-spaces15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
366 PllPs<-cbind(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
367
da1012f014bd Uploaded
jfb
parents:
diff changeset
368
da1012f014bd Uploaded
jfb
parents:
diff changeset
369 Q1<-sum(Column1 %in% "Q")/(length(Column1)-spaces1)
da1012f014bd Uploaded
jfb
parents:
diff changeset
370 Q2<-sum(Column2 %in% "Q")/(length(Column2)-spaces2)
da1012f014bd Uploaded
jfb
parents:
diff changeset
371 Q3<-sum(Column3 %in% "Q")/(length(Column3)-spaces3)
da1012f014bd Uploaded
jfb
parents:
diff changeset
372 Q4<-sum(Column4 %in% "Q")/(length(Column4)-spaces4)
da1012f014bd Uploaded
jfb
parents:
diff changeset
373 Q5<-sum(Column5 %in% "Q")/(length(Column5)-spaces5)
da1012f014bd Uploaded
jfb
parents:
diff changeset
374 Q6<-sum(Column6 %in% "Q")/(length(Column6)-spaces6)
da1012f014bd Uploaded
jfb
parents:
diff changeset
375 Q7<-sum(Column7 %in% "Q")/(length(Column7)-spaces7)
da1012f014bd Uploaded
jfb
parents:
diff changeset
376 Q8<-sum(Column8 %in% "Q")/(length(Column8)-spaces8)
da1012f014bd Uploaded
jfb
parents:
diff changeset
377 Q9<-sum(Column9 %in% "Q")/(length(Column9)-spaces9)
da1012f014bd Uploaded
jfb
parents:
diff changeset
378 Q10<-sum(Column10 %in% "Q")/(length(Column10)-spaces10)
da1012f014bd Uploaded
jfb
parents:
diff changeset
379 Q11<-sum(Column11 %in% "Q")/(length(Column11)-spaces11)
da1012f014bd Uploaded
jfb
parents:
diff changeset
380 Q12<-sum(Column12 %in% "Q")/(length(Column12)-spaces12)
da1012f014bd Uploaded
jfb
parents:
diff changeset
381 Q13<-sum(Column13 %in% "Q")/(length(Column13)-spaces13)
da1012f014bd Uploaded
jfb
parents:
diff changeset
382 Q14<-sum(Column14 %in% "Q")/(length(Column14)-spaces14)
da1012f014bd Uploaded
jfb
parents:
diff changeset
383 Q15<-sum(Column15 %in% "Q")/(length(Column15)-spaces15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
384 QllQs<-cbind(Q1,Q2,Q3,Q4,Q5,Q6,Q7,Q8,Q9,Q10,Q11,Q12,Q13,Q14,Q15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
385
da1012f014bd Uploaded
jfb
parents:
diff changeset
386
da1012f014bd Uploaded
jfb
parents:
diff changeset
387 R1<-sum(Column1 %in% "R")/(length(Column1)-spaces1)
da1012f014bd Uploaded
jfb
parents:
diff changeset
388 R2<-sum(Column2 %in% "R")/(length(Column2)-spaces2)
da1012f014bd Uploaded
jfb
parents:
diff changeset
389 R3<-sum(Column3 %in% "R")/(length(Column3)-spaces3)
da1012f014bd Uploaded
jfb
parents:
diff changeset
390 R4<-sum(Column4 %in% "R")/(length(Column4)-spaces4)
da1012f014bd Uploaded
jfb
parents:
diff changeset
391 R5<-sum(Column5 %in% "R")/(length(Column5)-spaces5)
da1012f014bd Uploaded
jfb
parents:
diff changeset
392 R6<-sum(Column6 %in% "R")/(length(Column6)-spaces6)
da1012f014bd Uploaded
jfb
parents:
diff changeset
393 R7<-sum(Column7 %in% "R")/(length(Column7)-spaces7)
da1012f014bd Uploaded
jfb
parents:
diff changeset
394 R8<-sum(Column8 %in% "R")/(length(Column8)-spaces8)
da1012f014bd Uploaded
jfb
parents:
diff changeset
395 R9<-sum(Column9 %in% "R")/(length(Column9)-spaces9)
da1012f014bd Uploaded
jfb
parents:
diff changeset
396 R10<-sum(Column10 %in% "R")/(length(Column10)-spaces10)
da1012f014bd Uploaded
jfb
parents:
diff changeset
397 R11<-sum(Column11 %in% "R")/(length(Column11)-spaces11)
da1012f014bd Uploaded
jfb
parents:
diff changeset
398 R12<-sum(Column12 %in% "R")/(length(Column12)-spaces12)
da1012f014bd Uploaded
jfb
parents:
diff changeset
399 R13<-sum(Column13 %in% "R")/(length(Column13)-spaces13)
da1012f014bd Uploaded
jfb
parents:
diff changeset
400 R14<-sum(Column14 %in% "R")/(length(Column14)-spaces14)
da1012f014bd Uploaded
jfb
parents:
diff changeset
401 R15<-sum(Column15 %in% "R")/(length(Column15)-spaces15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
402 RllRs<-cbind(R1,R2,R3,R4,R5,R6,R7,R8,R9,R10,R11,R12,R13,R14,R15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
403
da1012f014bd Uploaded
jfb
parents:
diff changeset
404
da1012f014bd Uploaded
jfb
parents:
diff changeset
405 S1<-sum(Column1 %in% "S")/(length(Column1)-spaces1)
da1012f014bd Uploaded
jfb
parents:
diff changeset
406 S2<-sum(Column2 %in% "S")/(length(Column2)-spaces2)
da1012f014bd Uploaded
jfb
parents:
diff changeset
407 S3<-sum(Column3 %in% "S")/(length(Column3)-spaces3)
da1012f014bd Uploaded
jfb
parents:
diff changeset
408 S4<-sum(Column4 %in% "S")/(length(Column4)-spaces4)
da1012f014bd Uploaded
jfb
parents:
diff changeset
409 S5<-sum(Column5 %in% "S")/(length(Column5)-spaces5)
da1012f014bd Uploaded
jfb
parents:
diff changeset
410 S6<-sum(Column6 %in% "S")/(length(Column6)-spaces6)
da1012f014bd Uploaded
jfb
parents:
diff changeset
411 S7<-sum(Column7 %in% "S")/(length(Column7)-spaces7)
da1012f014bd Uploaded
jfb
parents:
diff changeset
412 S8<-sum(Column8 %in% "S")/(length(Column8)-spaces8)
da1012f014bd Uploaded
jfb
parents:
diff changeset
413 S9<-sum(Column9 %in% "S")/(length(Column9)-spaces9)
da1012f014bd Uploaded
jfb
parents:
diff changeset
414 S10<-sum(Column10 %in% "S")/(length(Column10)-spaces10)
da1012f014bd Uploaded
jfb
parents:
diff changeset
415 S11<-sum(Column11 %in% "S")/(length(Column11)-spaces11)
da1012f014bd Uploaded
jfb
parents:
diff changeset
416 S12<-sum(Column12 %in% "S")/(length(Column12)-spaces12)
da1012f014bd Uploaded
jfb
parents:
diff changeset
417 S13<-sum(Column13 %in% "S")/(length(Column13)-spaces13)
da1012f014bd Uploaded
jfb
parents:
diff changeset
418 S14<-sum(Column14 %in% "S")/(length(Column14)-spaces14)
da1012f014bd Uploaded
jfb
parents:
diff changeset
419 S15<-sum(Column15 %in% "S")/(length(Column15)-spaces15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
420 SllSs<-cbind(S1,S2,S3,S4,S5,S6,S7,S8,S9,S10,S11,S12,S13,S14,S15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
421
da1012f014bd Uploaded
jfb
parents:
diff changeset
422
da1012f014bd Uploaded
jfb
parents:
diff changeset
423 T1<-sum(Column1 %in% "T")/(length(Column1)-spaces1)
da1012f014bd Uploaded
jfb
parents:
diff changeset
424 T2<-sum(Column2 %in% "T")/(length(Column2)-spaces2)
da1012f014bd Uploaded
jfb
parents:
diff changeset
425 T3<-sum(Column3 %in% "T")/(length(Column3)-spaces3)
da1012f014bd Uploaded
jfb
parents:
diff changeset
426 T4<-sum(Column4 %in% "T")/(length(Column4)-spaces4)
da1012f014bd Uploaded
jfb
parents:
diff changeset
427 T5<-sum(Column5 %in% "T")/(length(Column5)-spaces5)
da1012f014bd Uploaded
jfb
parents:
diff changeset
428 T6<-sum(Column6 %in% "T")/(length(Column6)-spaces6)
da1012f014bd Uploaded
jfb
parents:
diff changeset
429 T7<-sum(Column7 %in% "T")/(length(Column7)-spaces7)
da1012f014bd Uploaded
jfb
parents:
diff changeset
430 T8<-sum(Column8 %in% "T")/(length(Column8)-spaces8)
da1012f014bd Uploaded
jfb
parents:
diff changeset
431 T9<-sum(Column9 %in% "T")/(length(Column9)-spaces9)
da1012f014bd Uploaded
jfb
parents:
diff changeset
432 T10<-sum(Column10 %in% "T")/(length(Column10)-spaces10)
da1012f014bd Uploaded
jfb
parents:
diff changeset
433 T11<-sum(Column11 %in% "T")/(length(Column11)-spaces11)
da1012f014bd Uploaded
jfb
parents:
diff changeset
434 T12<-sum(Column12 %in% "T")/(length(Column12)-spaces12)
da1012f014bd Uploaded
jfb
parents:
diff changeset
435 T13<-sum(Column13 %in% "T")/(length(Column13)-spaces13)
da1012f014bd Uploaded
jfb
parents:
diff changeset
436 T14<-sum(Column14 %in% "T")/(length(Column14)-spaces14)
da1012f014bd Uploaded
jfb
parents:
diff changeset
437 T15<-sum(Column15 %in% "T")/(length(Column15)-spaces15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
438 TllTs<-cbind(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
439
da1012f014bd Uploaded
jfb
parents:
diff changeset
440
da1012f014bd Uploaded
jfb
parents:
diff changeset
441 V1<-sum(Column1 %in% "V")/(length(Column1)-spaces1)
da1012f014bd Uploaded
jfb
parents:
diff changeset
442 V2<-sum(Column2 %in% "V")/(length(Column2)-spaces2)
da1012f014bd Uploaded
jfb
parents:
diff changeset
443 V3<-sum(Column3 %in% "V")/(length(Column3)-spaces3)
da1012f014bd Uploaded
jfb
parents:
diff changeset
444 V4<-sum(Column4 %in% "V")/(length(Column4)-spaces4)
da1012f014bd Uploaded
jfb
parents:
diff changeset
445 V5<-sum(Column5 %in% "V")/(length(Column5)-spaces5)
da1012f014bd Uploaded
jfb
parents:
diff changeset
446 V6<-sum(Column6 %in% "V")/(length(Column6)-spaces6)
da1012f014bd Uploaded
jfb
parents:
diff changeset
447 V7<-sum(Column7 %in% "V")/(length(Column7)-spaces7)
da1012f014bd Uploaded
jfb
parents:
diff changeset
448 V8<-sum(Column8 %in% "V")/(length(Column8)-spaces8)
da1012f014bd Uploaded
jfb
parents:
diff changeset
449 V9<-sum(Column9 %in% "V")/(length(Column9)-spaces9)
da1012f014bd Uploaded
jfb
parents:
diff changeset
450 V10<-sum(Column10 %in% "V")/(length(Column10)-spaces10)
da1012f014bd Uploaded
jfb
parents:
diff changeset
451 V11<-sum(Column11 %in% "V")/(length(Column11)-spaces11)
da1012f014bd Uploaded
jfb
parents:
diff changeset
452 V12<-sum(Column12 %in% "V")/(length(Column12)-spaces12)
da1012f014bd Uploaded
jfb
parents:
diff changeset
453 V13<-sum(Column13 %in% "V")/(length(Column13)-spaces13)
da1012f014bd Uploaded
jfb
parents:
diff changeset
454 V14<-sum(Column14 %in% "V")/(length(Column14)-spaces14)
da1012f014bd Uploaded
jfb
parents:
diff changeset
455 V15<-sum(Column15 %in% "V")/(length(Column15)-spaces15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
456 VllVs<-cbind(V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
457
da1012f014bd Uploaded
jfb
parents:
diff changeset
458
da1012f014bd Uploaded
jfb
parents:
diff changeset
459 W1<-sum(Column1 %in% "W")/(length(Column1)-spaces1)
da1012f014bd Uploaded
jfb
parents:
diff changeset
460 W2<-sum(Column2 %in% "W")/(length(Column2)-spaces2)
da1012f014bd Uploaded
jfb
parents:
diff changeset
461 W3<-sum(Column3 %in% "W")/(length(Column3)-spaces3)
da1012f014bd Uploaded
jfb
parents:
diff changeset
462 W4<-sum(Column4 %in% "W")/(length(Column4)-spaces4)
da1012f014bd Uploaded
jfb
parents:
diff changeset
463 W5<-sum(Column5 %in% "W")/(length(Column5)-spaces5)
da1012f014bd Uploaded
jfb
parents:
diff changeset
464 W6<-sum(Column6 %in% "W")/(length(Column6)-spaces6)
da1012f014bd Uploaded
jfb
parents:
diff changeset
465 W7<-sum(Column7 %in% "W")/(length(Column7)-spaces7)
da1012f014bd Uploaded
jfb
parents:
diff changeset
466 W8<-sum(Column8 %in% "W")/(length(Column8)-spaces8)
da1012f014bd Uploaded
jfb
parents:
diff changeset
467 W9<-sum(Column9 %in% "W")/(length(Column9)-spaces9)
da1012f014bd Uploaded
jfb
parents:
diff changeset
468 W10<-sum(Column10 %in% "W")/(length(Column10)-spaces10)
da1012f014bd Uploaded
jfb
parents:
diff changeset
469 W11<-sum(Column11 %in% "W")/(length(Column11)-spaces11)
da1012f014bd Uploaded
jfb
parents:
diff changeset
470 W12<-sum(Column12 %in% "W")/(length(Column12)-spaces12)
da1012f014bd Uploaded
jfb
parents:
diff changeset
471 W13<-sum(Column13 %in% "W")/(length(Column13)-spaces13)
da1012f014bd Uploaded
jfb
parents:
diff changeset
472 W14<-sum(Column14 %in% "W")/(length(Column14)-spaces14)
da1012f014bd Uploaded
jfb
parents:
diff changeset
473 W15<-sum(Column15 %in% "W")/(length(Column15)-spaces15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
474 WllWs<-cbind(W1,W2,W3,W4,W5,W6,W7,W8,W9,W10,W11,W12,W13,W14,W15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
475
da1012f014bd Uploaded
jfb
parents:
diff changeset
476
da1012f014bd Uploaded
jfb
parents:
diff changeset
477 Y1<-sum(Column1 %in% "Y")/(length(Column1)-spaces1)
da1012f014bd Uploaded
jfb
parents:
diff changeset
478 Y2<-sum(Column2 %in% "Y")/(length(Column2)-spaces2)
da1012f014bd Uploaded
jfb
parents:
diff changeset
479 Y3<-sum(Column3 %in% "Y")/(length(Column3)-spaces3)
da1012f014bd Uploaded
jfb
parents:
diff changeset
480 Y4<-sum(Column4 %in% "Y")/(length(Column4)-spaces4)
da1012f014bd Uploaded
jfb
parents:
diff changeset
481 Y5<-sum(Column5 %in% "Y")/(length(Column5)-spaces5)
da1012f014bd Uploaded
jfb
parents:
diff changeset
482 Y6<-sum(Column6 %in% "Y")/(length(Column6)-spaces6)
da1012f014bd Uploaded
jfb
parents:
diff changeset
483 Y7<-sum(Column7 %in% "Y")/(length(Column7)-spaces7)
da1012f014bd Uploaded
jfb
parents:
diff changeset
484 Y8<-sum(Column8 %in% "Y")/(length(Column8)-spaces8)
da1012f014bd Uploaded
jfb
parents:
diff changeset
485 Y9<-sum(Column9 %in% "Y")/(length(Column9)-spaces9)
da1012f014bd Uploaded
jfb
parents:
diff changeset
486 Y10<-sum(Column10 %in% "Y")/(length(Column10)-spaces10)
da1012f014bd Uploaded
jfb
parents:
diff changeset
487 Y11<-sum(Column11 %in% "Y")/(length(Column11)-spaces11)
da1012f014bd Uploaded
jfb
parents:
diff changeset
488 Y12<-sum(Column12 %in% "Y")/(length(Column12)-spaces12)
da1012f014bd Uploaded
jfb
parents:
diff changeset
489 Y13<-sum(Column13 %in% "Y")/(length(Column13)-spaces13)
da1012f014bd Uploaded
jfb
parents:
diff changeset
490 Y14<-sum(Column14 %in% "Y")/(length(Column14)-spaces14)
da1012f014bd Uploaded
jfb
parents:
diff changeset
491 Y15<-sum(Column15 %in% "Y")/(length(Column15)-spaces15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
492 YllYs<-cbind(Y1,Y2,Y3,Y4,Y5,Y6,Y7,Y8,Y9,Y10,Y11,Y12,Y13,Y14,Y15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
493 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
494 #this is substrate percents
da1012f014bd Uploaded
jfb
parents:
diff changeset
495
da1012f014bd Uploaded
jfb
parents:
diff changeset
496 #A C D E F G H I K L N P Q R S T V W Y
da1012f014bd Uploaded
jfb
parents:
diff changeset
497
da1012f014bd Uploaded
jfb
parents:
diff changeset
498 PercentTable<-rbind(AllAs,CllCs,DllDs,EllEs,FllFs,GllGs,HllHs,IllIs,KllKs,LllLs,MllMs,NllNs,PllPs,QllQs,RllRs,SllSs,TllTs,VllVs,WllWs,YllYs)
da1012f014bd Uploaded
jfb
parents:
diff changeset
499 PercentTable<-PercentTable*100
da1012f014bd Uploaded
jfb
parents:
diff changeset
500
da1012f014bd Uploaded
jfb
parents:
diff changeset
501 #create the SD table
da1012f014bd Uploaded
jfb
parents:
diff changeset
502 SDtable<-matrix(data = rep(1,times=(nrow(PercentTable)*ncol(PercentTable))),nrow = nrow(PercentTable),ncol = ncol(PercentTable))
da1012f014bd Uploaded
jfb
parents:
diff changeset
503 #for every row, a percertage minus the same mean over the same SD
da1012f014bd Uploaded
jfb
parents:
diff changeset
504 if(1==1){
da1012f014bd Uploaded
jfb
parents:
diff changeset
505 SDtable[1,]<-(PercentTable[1,]-Amean)/Asd
da1012f014bd Uploaded
jfb
parents:
diff changeset
506 SDtable[2,]<-(PercentTable[2,]-Cmean)/Csd
da1012f014bd Uploaded
jfb
parents:
diff changeset
507 SDtable[3,]<-(PercentTable[3,]-Dmean)/Dsd
da1012f014bd Uploaded
jfb
parents:
diff changeset
508 SDtable[4,]<-(PercentTable[4,]-Emean)/Esd
da1012f014bd Uploaded
jfb
parents:
diff changeset
509 SDtable[5,]<-(PercentTable[5,]-Fmean)/Fsd
da1012f014bd Uploaded
jfb
parents:
diff changeset
510 SDtable[6,]<-(PercentTable[6,]-Gmean)/Gsd
da1012f014bd Uploaded
jfb
parents:
diff changeset
511 SDtable[7,]<-(PercentTable[7,]-Hmean)/Hsd
da1012f014bd Uploaded
jfb
parents:
diff changeset
512 SDtable[8,]<-(PercentTable[8,]-Imean)/Isd
da1012f014bd Uploaded
jfb
parents:
diff changeset
513 SDtable[9,]<-(PercentTable[9,]-Kmean)/Ksd
da1012f014bd Uploaded
jfb
parents:
diff changeset
514 SDtable[10,]<-(PercentTable[10,]-Lmean)/Lsd
da1012f014bd Uploaded
jfb
parents:
diff changeset
515 SDtable[11,]<-(PercentTable[11,]-Mmean)/Msd
da1012f014bd Uploaded
jfb
parents:
diff changeset
516 SDtable[12,]<-(PercentTable[12,]-Nmean)/Nsd
da1012f014bd Uploaded
jfb
parents:
diff changeset
517 SDtable[13,]<-(PercentTable[13,]-Pmean)/Psd
da1012f014bd Uploaded
jfb
parents:
diff changeset
518 SDtable[14,]<-(PercentTable[14,]-Qmean)/Qsd
da1012f014bd Uploaded
jfb
parents:
diff changeset
519 SDtable[15,]<-(PercentTable[15,]-Rmean)/Rsd
da1012f014bd Uploaded
jfb
parents:
diff changeset
520 SDtable[16,]<-(PercentTable[16,]-Smean)/Ssd
da1012f014bd Uploaded
jfb
parents:
diff changeset
521 SDtable[17,]<-(PercentTable[17,]-Tmean)/Tsd
da1012f014bd Uploaded
jfb
parents:
diff changeset
522 SDtable[18,]<-(PercentTable[18,]-Vmean)/Vsd
da1012f014bd Uploaded
jfb
parents:
diff changeset
523 SDtable[19,]<-(PercentTable[19,]-Wmean)/Wsd
da1012f014bd Uploaded
jfb
parents:
diff changeset
524 SDtable[20,]<-(PercentTable[20,]-Ymean)/Ysd
da1012f014bd Uploaded
jfb
parents:
diff changeset
525 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
526
da1012f014bd Uploaded
jfb
parents:
diff changeset
527
da1012f014bd Uploaded
jfb
parents:
diff changeset
528 SetOfAAs<-c("Letter","A","C","D","E","F","G","H","I","K","L","M","N","P","Q","R","S","T","V","W","Y")
da1012f014bd Uploaded
jfb
parents:
diff changeset
529
19
9e520c365624 Uploaded
jfb
parents: 18
diff changeset
530 SumOfSigmaAAs<-c(1:15)
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
531
19
9e520c365624 Uploaded
jfb
parents: 18
diff changeset
532 for (i in 1:15){
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
533 SumOfSigmasValue<-0
da1012f014bd Uploaded
jfb
parents:
diff changeset
534 for (j in 1:20){
18
e16ca3e9fc49 Uploaded
jfb
parents: 17
diff changeset
535 value<-0
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
536 if (SDtable[j,i]>2){
18
e16ca3e9fc49 Uploaded
jfb
parents: 17
diff changeset
537 q=j+1
e16ca3e9fc49 Uploaded
jfb
parents: 17
diff changeset
538 value<-sum(substrates[,i]==SetOfAAs[q])
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
539 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
540 SumOfSigmasValue<-SumOfSigmasValue+value
da1012f014bd Uploaded
jfb
parents:
diff changeset
541 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
542 SumOfSigmaAAs[i]<-SumOfSigmasValue
da1012f014bd Uploaded
jfb
parents:
diff changeset
543 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
544
18
e16ca3e9fc49 Uploaded
jfb
parents: 17
diff changeset
545 AAs1<-length(substrates[,1])-sum(substrates[,1]=="")
e16ca3e9fc49 Uploaded
jfb
parents: 17
diff changeset
546 AAs2<-length(substrates[,2])-sum(substrates[,2]=="")
e16ca3e9fc49 Uploaded
jfb
parents: 17
diff changeset
547 AAs3<-length(substrates[,3])-sum(substrates[,3]=="")
e16ca3e9fc49 Uploaded
jfb
parents: 17
diff changeset
548 AAs4<-length(substrates[,4])-sum(substrates[,4]=="")
e16ca3e9fc49 Uploaded
jfb
parents: 17
diff changeset
549 AAs5<-length(substrates[,5])-sum(substrates[,5]=="")
e16ca3e9fc49 Uploaded
jfb
parents: 17
diff changeset
550 AAs6<-length(substrates[,6])-sum(substrates[,6]=="")
e16ca3e9fc49 Uploaded
jfb
parents: 17
diff changeset
551 AAs7<-length(substrates[,7])-sum(substrates[,7]=="")
e16ca3e9fc49 Uploaded
jfb
parents: 17
diff changeset
552 AAs8<-length(substrates[,8])-sum(substrates[,8]=="")
e16ca3e9fc49 Uploaded
jfb
parents: 17
diff changeset
553 AAs9<-length(substrates[,9])-sum(substrates[,9]=="")
e16ca3e9fc49 Uploaded
jfb
parents: 17
diff changeset
554 AAsAtPositions<-c(AAs1,AAs2,AAs3,AAs4,AAs5,AAs6,AAs7,AAs8,AAs9)
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
555 # AAsAtPositions<-c(length(substrates[,1]),length(substrates[,2]),length(substrates[,3]),length(substrates[,4]),
da1012f014bd Uploaded
jfb
parents:
diff changeset
556 # length(substrates[,5]),length(substrates[,6]),length(substrates[,7]),length(substrates[,8]),
da1012f014bd Uploaded
jfb
parents:
diff changeset
557 # length(substrates[,9]))
da1012f014bd Uploaded
jfb
parents:
diff changeset
558
19
9e520c365624 Uploaded
jfb
parents: 18
diff changeset
559 SumOfExpectedSigmaAAs<-c(1:15)
9e520c365624 Uploaded
jfb
parents: 18
diff changeset
560 for (i in 1:15){
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
561 ExpectedValue<-0
da1012f014bd Uploaded
jfb
parents:
diff changeset
562 for (j in 1:20){
18
e16ca3e9fc49 Uploaded
jfb
parents: 17
diff changeset
563 value<-0
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
564 if (SDtable[j,i]>2){
da1012f014bd Uploaded
jfb
parents:
diff changeset
565 value<-AllMeans[j]
da1012f014bd Uploaded
jfb
parents:
diff changeset
566 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
567 ExpectedValue<-ExpectedValue+value
da1012f014bd Uploaded
jfb
parents:
diff changeset
568 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
569 SumOfExpectedSigmaAAs[i]<-ExpectedValue*(length(substrates[,i])-sum(substrates[,i]%in% ""))/100
da1012f014bd Uploaded
jfb
parents:
diff changeset
570 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
571
18
e16ca3e9fc49 Uploaded
jfb
parents: 17
diff changeset
572 #SelectivityRow<-SumOfSigmaAAs/SumOfExpectedSigmaAAs
e16ca3e9fc49 Uploaded
jfb
parents: 17
diff changeset
573
19
9e520c365624 Uploaded
jfb
parents: 18
diff changeset
574 SelectivityRow<-rep(0,times=15)
18
e16ca3e9fc49 Uploaded
jfb
parents: 17
diff changeset
575
19
9e520c365624 Uploaded
jfb
parents: 18
diff changeset
576 for (q in 1:15) {
18
e16ca3e9fc49 Uploaded
jfb
parents: 17
diff changeset
577 SelectivityRow[q]<-(SumOfSigmaAAs[q]/SumOfExpectedSigmaAAs[q])*(SumOfSigmaAAs[q]/AAsAtPositions[q])
e16ca3e9fc49 Uploaded
jfb
parents: 17
diff changeset
578 }
e16ca3e9fc49 Uploaded
jfb
parents: 17
diff changeset
579
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
580 SelectivitySheet<-rbind(SumOfSigmaAAs,SumOfExpectedSigmaAAs,SelectivityRow)
da1012f014bd Uploaded
jfb
parents:
diff changeset
581
da1012f014bd Uploaded
jfb
parents:
diff changeset
582 SetOfAAs<-matrix(data = SetOfAAs,ncol = 1)
da1012f014bd Uploaded
jfb
parents:
diff changeset
583 SDtableu<-SDtable
da1012f014bd Uploaded
jfb
parents:
diff changeset
584 HeaderSD<-c(-7:7)
da1012f014bd Uploaded
jfb
parents:
diff changeset
585 SDtable<-rbind(HeaderSD,SDtableu)
da1012f014bd Uploaded
jfb
parents:
diff changeset
586 row.names(SDtable)<-NULL
da1012f014bd Uploaded
jfb
parents:
diff changeset
587 SDtable<-data.frame(SetOfAAs,SDtable)
da1012f014bd Uploaded
jfb
parents:
diff changeset
588
da1012f014bd Uploaded
jfb
parents:
diff changeset
589 PercentTable<-rbind(HeaderSD,PercentTable)
da1012f014bd Uploaded
jfb
parents:
diff changeset
590 row.names(PercentTable)<-NULL
da1012f014bd Uploaded
jfb
parents:
diff changeset
591 PercentTable<-data.frame(SetOfAAs,PercentTable)
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
592 numberofY<-as.numeric(SubstrateBackgroundFrequency[,34])
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
593 numberofY<-numberofY[!is.na(numberofY)]
da1012f014bd Uploaded
jfb
parents:
diff changeset
594
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
595 numberofPY<-as.numeric(SubstrateBackgroundFrequency[,35])
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
596 numberofPY<-numberofPY[!is.na(numberofPY)]
da1012f014bd Uploaded
jfb
parents:
diff changeset
597
da1012f014bd Uploaded
jfb
parents:
diff changeset
598 NormalizationScore<-sum(numberofPY)/sum(numberofY)
da1012f014bd Uploaded
jfb
parents:
diff changeset
599
da1012f014bd Uploaded
jfb
parents:
diff changeset
600 # positions<-matrix(data = NA, nrow=20,ncol = 15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
601 #
da1012f014bd Uploaded
jfb
parents:
diff changeset
602 # #column1
da1012f014bd Uploaded
jfb
parents:
diff changeset
603 #
da1012f014bd Uploaded
jfb
parents:
diff changeset
604 # for (q in 1:15) {
da1012f014bd Uploaded
jfb
parents:
diff changeset
605 # sA<-sum(substrates[,i]=="A")
da1012f014bd Uploaded
jfb
parents:
diff changeset
606 # positions[1,i]<-sA
da1012f014bd Uploaded
jfb
parents:
diff changeset
607 # sC<-sum(substrates[,i]=="C")
da1012f014bd Uploaded
jfb
parents:
diff changeset
608 # positions[2,i]<-sC
da1012f014bd Uploaded
jfb
parents:
diff changeset
609 # sD<-sum(substrates[,i]=="D")
da1012f014bd Uploaded
jfb
parents:
diff changeset
610 # positions[3,i]<-sD
da1012f014bd Uploaded
jfb
parents:
diff changeset
611 # sE<-sum(substrates[,i]=="E")
da1012f014bd Uploaded
jfb
parents:
diff changeset
612 # positions[4,i]<-sE
da1012f014bd Uploaded
jfb
parents:
diff changeset
613 # sF<-sum(substrates[,i]=="F")
da1012f014bd Uploaded
jfb
parents:
diff changeset
614 # sG<-sum(substrates[,i]=="G")
da1012f014bd Uploaded
jfb
parents:
diff changeset
615 # sH<-sum(substrates[,i]=="H")
da1012f014bd Uploaded
jfb
parents:
diff changeset
616 # sI<-sum(substrates[,i]=="I")
da1012f014bd Uploaded
jfb
parents:
diff changeset
617 # sK<-sum(substrates[,i]=="K")
da1012f014bd Uploaded
jfb
parents:
diff changeset
618 # sL<-sum(substrates[,i]=="L")
da1012f014bd Uploaded
jfb
parents:
diff changeset
619 # sM<-sum(substrates[,i]=="M")
da1012f014bd Uploaded
jfb
parents:
diff changeset
620 # sN<-sum(substrates[,i]=="N")
da1012f014bd Uploaded
jfb
parents:
diff changeset
621 # sP<-sum(substrates[,i]=="P")
da1012f014bd Uploaded
jfb
parents:
diff changeset
622 # sQ<-sum(substrates[,i]=="Q")
da1012f014bd Uploaded
jfb
parents:
diff changeset
623 # sR<-sum(substrates[,i]=="R")
da1012f014bd Uploaded
jfb
parents:
diff changeset
624 # sS<-sum(substrates[,i]=="S")
da1012f014bd Uploaded
jfb
parents:
diff changeset
625 # sT<-sum(substrates[,i]=="T")
da1012f014bd Uploaded
jfb
parents:
diff changeset
626 # sV<-sum(substrates[,i]=="V")
da1012f014bd Uploaded
jfb
parents:
diff changeset
627 # sW<-sum(substrates[,i]=="W")
da1012f014bd Uploaded
jfb
parents:
diff changeset
628 # sY<-sum(substrates[,i]=="Y")
da1012f014bd Uploaded
jfb
parents:
diff changeset
629 # positions[5,i]<-sF
da1012f014bd Uploaded
jfb
parents:
diff changeset
630 # positions[6,i]<-sG
da1012f014bd Uploaded
jfb
parents:
diff changeset
631 # positions[7,i]<-sH
da1012f014bd Uploaded
jfb
parents:
diff changeset
632 # positions[8,i]<-sI
da1012f014bd Uploaded
jfb
parents:
diff changeset
633 # positions[9,i]<-sK
da1012f014bd Uploaded
jfb
parents:
diff changeset
634 # positions[10,i]<-sL
da1012f014bd Uploaded
jfb
parents:
diff changeset
635 # positions[11,i]<-sM
da1012f014bd Uploaded
jfb
parents:
diff changeset
636 # positions[12,i]<-sN
da1012f014bd Uploaded
jfb
parents:
diff changeset
637 # positions[13,i]<-sP
da1012f014bd Uploaded
jfb
parents:
diff changeset
638 # positions[14,i]<-sQ
da1012f014bd Uploaded
jfb
parents:
diff changeset
639 # positions[15,i]<-sR
da1012f014bd Uploaded
jfb
parents:
diff changeset
640 # positions[16,i]<-sS
da1012f014bd Uploaded
jfb
parents:
diff changeset
641 # positions[17,i]<-sT
da1012f014bd Uploaded
jfb
parents:
diff changeset
642 # positions[18,i]<-sV
da1012f014bd Uploaded
jfb
parents:
diff changeset
643 # positions[19,i]<-sW
da1012f014bd Uploaded
jfb
parents:
diff changeset
644 # positions[20,i]<-sY
da1012f014bd Uploaded
jfb
parents:
diff changeset
645 # }
da1012f014bd Uploaded
jfb
parents:
diff changeset
646
da1012f014bd Uploaded
jfb
parents:
diff changeset
647 #here I create the positions table which is needed for the endogenous prob matrix and is simply "how many times did an AA show up in this spot?
da1012f014bd Uploaded
jfb
parents:
diff changeset
648 if (6==6){
da1012f014bd Uploaded
jfb
parents:
diff changeset
649 Column1<-substrates[,1]
da1012f014bd Uploaded
jfb
parents:
diff changeset
650 Column2<-substrates[,2]
da1012f014bd Uploaded
jfb
parents:
diff changeset
651 Column3<-substrates[,3]
da1012f014bd Uploaded
jfb
parents:
diff changeset
652 Column4<-substrates[,4]
da1012f014bd Uploaded
jfb
parents:
diff changeset
653 Column5<-substrates[,5]
da1012f014bd Uploaded
jfb
parents:
diff changeset
654 Column6<-substrates[,6]
da1012f014bd Uploaded
jfb
parents:
diff changeset
655 Column7<-substrates[,7]
da1012f014bd Uploaded
jfb
parents:
diff changeset
656 Column8<-substrates[,8]
da1012f014bd Uploaded
jfb
parents:
diff changeset
657 Column9<-substrates[,9]
da1012f014bd Uploaded
jfb
parents:
diff changeset
658 Column10<-substrates[,10]
da1012f014bd Uploaded
jfb
parents:
diff changeset
659 Column11<-substrates[,11]
da1012f014bd Uploaded
jfb
parents:
diff changeset
660 Column12<-substrates[,12]
da1012f014bd Uploaded
jfb
parents:
diff changeset
661 Column13<-substrates[,13]
da1012f014bd Uploaded
jfb
parents:
diff changeset
662 Column14<-substrates[,14]
da1012f014bd Uploaded
jfb
parents:
diff changeset
663 Column15<-substrates[,15]
da1012f014bd Uploaded
jfb
parents:
diff changeset
664
da1012f014bd Uploaded
jfb
parents:
diff changeset
665 spaces1<-sum((Column1%in% ""))
da1012f014bd Uploaded
jfb
parents:
diff changeset
666 spaces2<-sum(Column2%in% "")
da1012f014bd Uploaded
jfb
parents:
diff changeset
667 spaces3<-sum(Column3%in% "")
da1012f014bd Uploaded
jfb
parents:
diff changeset
668 spaces4<-sum(Column4%in% "")
da1012f014bd Uploaded
jfb
parents:
diff changeset
669 spaces5<-sum(Column5%in% "")
da1012f014bd Uploaded
jfb
parents:
diff changeset
670 spaces6<-sum(Column6%in% "")
da1012f014bd Uploaded
jfb
parents:
diff changeset
671 spaces7<-sum(Column7%in% "")
da1012f014bd Uploaded
jfb
parents:
diff changeset
672 spaces8<-sum(Column8%in% "")
da1012f014bd Uploaded
jfb
parents:
diff changeset
673 spaces9<-sum(Column9%in% "")
da1012f014bd Uploaded
jfb
parents:
diff changeset
674 spaces10<-sum(Column10%in% "")
da1012f014bd Uploaded
jfb
parents:
diff changeset
675 spaces11<-sum(Column11%in% "")
da1012f014bd Uploaded
jfb
parents:
diff changeset
676 spaces12<-sum(Column12%in% "")
da1012f014bd Uploaded
jfb
parents:
diff changeset
677 spaces13<-sum(Column13%in% "")
da1012f014bd Uploaded
jfb
parents:
diff changeset
678 spaces14<-sum(Column14%in% "")
da1012f014bd Uploaded
jfb
parents:
diff changeset
679 spaces15<-sum(Column15%in% "")
da1012f014bd Uploaded
jfb
parents:
diff changeset
680
da1012f014bd Uploaded
jfb
parents:
diff changeset
681 A1<-sum(Column1 %in% "A")
da1012f014bd Uploaded
jfb
parents:
diff changeset
682 A2<-sum(Column2 %in% "A")
da1012f014bd Uploaded
jfb
parents:
diff changeset
683 A3<-sum(Column3 %in% "A")
da1012f014bd Uploaded
jfb
parents:
diff changeset
684 A4<-sum(Column4 %in% "A")
da1012f014bd Uploaded
jfb
parents:
diff changeset
685 A5<-sum(Column5 %in% "A")
da1012f014bd Uploaded
jfb
parents:
diff changeset
686 A6<-sum(Column6 %in% "A")
da1012f014bd Uploaded
jfb
parents:
diff changeset
687 A7<-sum(Column7 %in% "A")
da1012f014bd Uploaded
jfb
parents:
diff changeset
688 A8<-sum(Column8 %in% "A")
da1012f014bd Uploaded
jfb
parents:
diff changeset
689 A9<-sum(Column9 %in% "A")
da1012f014bd Uploaded
jfb
parents:
diff changeset
690 A10<-sum(Column10 %in% "A")
da1012f014bd Uploaded
jfb
parents:
diff changeset
691 A11<-sum(Column11 %in% "A")
da1012f014bd Uploaded
jfb
parents:
diff changeset
692 A12<-sum(Column12 %in% "A")
da1012f014bd Uploaded
jfb
parents:
diff changeset
693 A13<-sum(Column13 %in% "A")
da1012f014bd Uploaded
jfb
parents:
diff changeset
694 A14<-sum(Column14 %in% "A")
da1012f014bd Uploaded
jfb
parents:
diff changeset
695 A15<-sum(Column15 %in% "A")
da1012f014bd Uploaded
jfb
parents:
diff changeset
696 AllAs<-cbind(A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14,A15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
697
da1012f014bd Uploaded
jfb
parents:
diff changeset
698 C1<-sum(Column1 %in% "C")
da1012f014bd Uploaded
jfb
parents:
diff changeset
699 C2<-sum(Column2 %in% "C")
da1012f014bd Uploaded
jfb
parents:
diff changeset
700 C3<-sum(Column3 %in% "C")
da1012f014bd Uploaded
jfb
parents:
diff changeset
701 C4<-sum(Column4 %in% "C")
da1012f014bd Uploaded
jfb
parents:
diff changeset
702 C5<-sum(Column5 %in% "C")
da1012f014bd Uploaded
jfb
parents:
diff changeset
703 C6<-sum(Column6 %in% "C")
da1012f014bd Uploaded
jfb
parents:
diff changeset
704 C7<-sum(Column7 %in% "C")
da1012f014bd Uploaded
jfb
parents:
diff changeset
705 C8<-sum(Column8 %in% "C")
da1012f014bd Uploaded
jfb
parents:
diff changeset
706 C9<-sum(Column9 %in% "C")
da1012f014bd Uploaded
jfb
parents:
diff changeset
707 C10<-sum(Column10 %in% "C")
da1012f014bd Uploaded
jfb
parents:
diff changeset
708 C11<-sum(Column11 %in% "C")
da1012f014bd Uploaded
jfb
parents:
diff changeset
709 C12<-sum(Column12 %in% "C")
da1012f014bd Uploaded
jfb
parents:
diff changeset
710 C13<-sum(Column13 %in% "C")
da1012f014bd Uploaded
jfb
parents:
diff changeset
711 C14<-sum(Column14 %in% "C")
da1012f014bd Uploaded
jfb
parents:
diff changeset
712 C15<-sum(Column15 %in% "C")
da1012f014bd Uploaded
jfb
parents:
diff changeset
713 CllCs<-cbind(C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
714
da1012f014bd Uploaded
jfb
parents:
diff changeset
715 D1<-sum(Column1 %in% "D")
da1012f014bd Uploaded
jfb
parents:
diff changeset
716 D2<-sum(Column2 %in% "D")
da1012f014bd Uploaded
jfb
parents:
diff changeset
717 D3<-sum(Column3 %in% "D")
da1012f014bd Uploaded
jfb
parents:
diff changeset
718 D4<-sum(Column4 %in% "D")
da1012f014bd Uploaded
jfb
parents:
diff changeset
719 D5<-sum(Column5 %in% "D")
da1012f014bd Uploaded
jfb
parents:
diff changeset
720 D6<-sum(Column6 %in% "D")
da1012f014bd Uploaded
jfb
parents:
diff changeset
721 D7<-sum(Column7 %in% "D")
da1012f014bd Uploaded
jfb
parents:
diff changeset
722 D8<-sum(Column8 %in% "D")
da1012f014bd Uploaded
jfb
parents:
diff changeset
723 D9<-sum(Column9 %in% "D")
da1012f014bd Uploaded
jfb
parents:
diff changeset
724 D10<-sum(Column10 %in% "D")
da1012f014bd Uploaded
jfb
parents:
diff changeset
725 D11<-sum(Column11 %in% "D")
da1012f014bd Uploaded
jfb
parents:
diff changeset
726 D12<-sum(Column12 %in% "D")
da1012f014bd Uploaded
jfb
parents:
diff changeset
727 D13<-sum(Column13 %in% "D")
da1012f014bd Uploaded
jfb
parents:
diff changeset
728 D14<-sum(Column14 %in% "D")
da1012f014bd Uploaded
jfb
parents:
diff changeset
729 D15<-sum(Column15 %in% "D")
da1012f014bd Uploaded
jfb
parents:
diff changeset
730 DllDs<-cbind(D1,D2,D3,D4,D5,D6,D7,D8,D9,D10,D11,D12,D13,D14,D15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
731
da1012f014bd Uploaded
jfb
parents:
diff changeset
732 E1<-sum(Column1 %in% "E")
da1012f014bd Uploaded
jfb
parents:
diff changeset
733 E2<-sum(Column2 %in% "E")
da1012f014bd Uploaded
jfb
parents:
diff changeset
734 E3<-sum(Column3 %in% "E")
da1012f014bd Uploaded
jfb
parents:
diff changeset
735 E4<-sum(Column4 %in% "E")
da1012f014bd Uploaded
jfb
parents:
diff changeset
736 E5<-sum(Column5 %in% "E")
da1012f014bd Uploaded
jfb
parents:
diff changeset
737 E6<-sum(Column6 %in% "E")
da1012f014bd Uploaded
jfb
parents:
diff changeset
738 E7<-sum(Column7 %in% "E")
da1012f014bd Uploaded
jfb
parents:
diff changeset
739 E8<-sum(Column8 %in% "E")
da1012f014bd Uploaded
jfb
parents:
diff changeset
740 E9<-sum(Column9 %in% "E")
da1012f014bd Uploaded
jfb
parents:
diff changeset
741 E10<-sum(Column10 %in% "E")
da1012f014bd Uploaded
jfb
parents:
diff changeset
742 E11<-sum(Column11 %in% "E")
da1012f014bd Uploaded
jfb
parents:
diff changeset
743 E12<-sum(Column12 %in% "E")
da1012f014bd Uploaded
jfb
parents:
diff changeset
744 E13<-sum(Column13 %in% "E")
da1012f014bd Uploaded
jfb
parents:
diff changeset
745 E14<-sum(Column14 %in% "E")
da1012f014bd Uploaded
jfb
parents:
diff changeset
746 E15<-sum(Column15 %in% "E")
da1012f014bd Uploaded
jfb
parents:
diff changeset
747 EllEs<-cbind(E1,E2,E3,E4,E5,E6,E7,E8,E9,E10,E11,E12,E13,E14,E15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
748
da1012f014bd Uploaded
jfb
parents:
diff changeset
749 F1<-sum(Column1 %in% "F")
da1012f014bd Uploaded
jfb
parents:
diff changeset
750 F2<-sum(Column2 %in% "F")
da1012f014bd Uploaded
jfb
parents:
diff changeset
751 F3<-sum(Column3 %in% "F")
da1012f014bd Uploaded
jfb
parents:
diff changeset
752 F4<-sum(Column4 %in% "F")
da1012f014bd Uploaded
jfb
parents:
diff changeset
753 F5<-sum(Column5 %in% "F")
da1012f014bd Uploaded
jfb
parents:
diff changeset
754 F6<-sum(Column6 %in% "F")
da1012f014bd Uploaded
jfb
parents:
diff changeset
755 F7<-sum(Column7 %in% "F")
da1012f014bd Uploaded
jfb
parents:
diff changeset
756 F8<-sum(Column8 %in% "F")
da1012f014bd Uploaded
jfb
parents:
diff changeset
757 F9<-sum(Column9 %in% "F")
da1012f014bd Uploaded
jfb
parents:
diff changeset
758 F10<-sum(Column10 %in% "F")
da1012f014bd Uploaded
jfb
parents:
diff changeset
759 F11<-sum(Column11 %in% "F")
da1012f014bd Uploaded
jfb
parents:
diff changeset
760 F12<-sum(Column12 %in% "F")
da1012f014bd Uploaded
jfb
parents:
diff changeset
761 F13<-sum(Column13 %in% "F")
da1012f014bd Uploaded
jfb
parents:
diff changeset
762 F14<-sum(Column14 %in% "F")
da1012f014bd Uploaded
jfb
parents:
diff changeset
763 F15<-sum(Column15 %in% "F")
da1012f014bd Uploaded
jfb
parents:
diff changeset
764 FllFs<-cbind(F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12,F13,F14,F15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
765
da1012f014bd Uploaded
jfb
parents:
diff changeset
766 G1<-sum(Column1 %in% "G")
da1012f014bd Uploaded
jfb
parents:
diff changeset
767 G2<-sum(Column2 %in% "G")
da1012f014bd Uploaded
jfb
parents:
diff changeset
768 G3<-sum(Column3 %in% "G")
da1012f014bd Uploaded
jfb
parents:
diff changeset
769 G4<-sum(Column4 %in% "G")
da1012f014bd Uploaded
jfb
parents:
diff changeset
770 G5<-sum(Column5 %in% "G")
da1012f014bd Uploaded
jfb
parents:
diff changeset
771 G6<-sum(Column6 %in% "G")
da1012f014bd Uploaded
jfb
parents:
diff changeset
772 G7<-sum(Column7 %in% "G")
da1012f014bd Uploaded
jfb
parents:
diff changeset
773 G8<-sum(Column8 %in% "G")
da1012f014bd Uploaded
jfb
parents:
diff changeset
774 G9<-sum(Column9 %in% "G")
da1012f014bd Uploaded
jfb
parents:
diff changeset
775 G10<-sum(Column10 %in% "G")
da1012f014bd Uploaded
jfb
parents:
diff changeset
776 G11<-sum(Column11 %in% "G")
da1012f014bd Uploaded
jfb
parents:
diff changeset
777 G12<-sum(Column12 %in% "G")
da1012f014bd Uploaded
jfb
parents:
diff changeset
778 G13<-sum(Column13 %in% "G")
da1012f014bd Uploaded
jfb
parents:
diff changeset
779 G14<-sum(Column14 %in% "G")
da1012f014bd Uploaded
jfb
parents:
diff changeset
780 G15<-sum(Column15 %in% "G")
da1012f014bd Uploaded
jfb
parents:
diff changeset
781 GllGs<-cbind(G1,G2,G3,G4,G5,G6,G7,G8,G9,G10,G11,G12,G13,G14,G15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
782
da1012f014bd Uploaded
jfb
parents:
diff changeset
783 H1<-sum(Column1 %in% "H")
da1012f014bd Uploaded
jfb
parents:
diff changeset
784 H2<-sum(Column2 %in% "H")
da1012f014bd Uploaded
jfb
parents:
diff changeset
785 H3<-sum(Column3 %in% "H")
da1012f014bd Uploaded
jfb
parents:
diff changeset
786 H4<-sum(Column4 %in% "H")
da1012f014bd Uploaded
jfb
parents:
diff changeset
787 H5<-sum(Column5 %in% "H")
da1012f014bd Uploaded
jfb
parents:
diff changeset
788 H6<-sum(Column6 %in% "H")
da1012f014bd Uploaded
jfb
parents:
diff changeset
789 H7<-sum(Column7 %in% "H")
da1012f014bd Uploaded
jfb
parents:
diff changeset
790 H8<-sum(Column8 %in% "H")
da1012f014bd Uploaded
jfb
parents:
diff changeset
791 H9<-sum(Column9 %in% "H")
da1012f014bd Uploaded
jfb
parents:
diff changeset
792 H10<-sum(Column10 %in% "H")
da1012f014bd Uploaded
jfb
parents:
diff changeset
793 H11<-sum(Column11 %in% "H")
da1012f014bd Uploaded
jfb
parents:
diff changeset
794 H12<-sum(Column12 %in% "H")
da1012f014bd Uploaded
jfb
parents:
diff changeset
795 H13<-sum(Column13 %in% "H")
da1012f014bd Uploaded
jfb
parents:
diff changeset
796 H14<-sum(Column14 %in% "H")
da1012f014bd Uploaded
jfb
parents:
diff changeset
797 H15<-sum(Column15 %in% "H")
da1012f014bd Uploaded
jfb
parents:
diff changeset
798 HllHs<-cbind(H1,H2,H3,H4,H5,H6,H7,H8,H9,H10,H11,H12,H13,H14,H15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
799
da1012f014bd Uploaded
jfb
parents:
diff changeset
800 I1<-sum(Column1 %in% "I")
da1012f014bd Uploaded
jfb
parents:
diff changeset
801 I2<-sum(Column2 %in% "I")
da1012f014bd Uploaded
jfb
parents:
diff changeset
802 I3<-sum(Column3 %in% "I")
da1012f014bd Uploaded
jfb
parents:
diff changeset
803 I4<-sum(Column4 %in% "I")
da1012f014bd Uploaded
jfb
parents:
diff changeset
804 I5<-sum(Column5 %in% "I")
da1012f014bd Uploaded
jfb
parents:
diff changeset
805 I6<-sum(Column6 %in% "I")
da1012f014bd Uploaded
jfb
parents:
diff changeset
806 I7<-sum(Column7 %in% "I")
da1012f014bd Uploaded
jfb
parents:
diff changeset
807 I8<-sum(Column8 %in% "I")
da1012f014bd Uploaded
jfb
parents:
diff changeset
808 I9<-sum(Column9 %in% "I")
da1012f014bd Uploaded
jfb
parents:
diff changeset
809 I10<-sum(Column10 %in% "I")
da1012f014bd Uploaded
jfb
parents:
diff changeset
810 I11<-sum(Column11 %in% "I")
da1012f014bd Uploaded
jfb
parents:
diff changeset
811 I12<-sum(Column12 %in% "I")
da1012f014bd Uploaded
jfb
parents:
diff changeset
812 I13<-sum(Column13 %in% "I")
da1012f014bd Uploaded
jfb
parents:
diff changeset
813 I14<-sum(Column14 %in% "I")
da1012f014bd Uploaded
jfb
parents:
diff changeset
814 I15<-sum(Column15 %in% "I")
da1012f014bd Uploaded
jfb
parents:
diff changeset
815 IllIs<-cbind(I1,I2,I3,I4,I5,I6,I7,I8,I9,I10,I11,I12,I13,I14,I15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
816
da1012f014bd Uploaded
jfb
parents:
diff changeset
817 K1<-sum(Column1 %in% "K")
da1012f014bd Uploaded
jfb
parents:
diff changeset
818 K2<-sum(Column2 %in% "K")
da1012f014bd Uploaded
jfb
parents:
diff changeset
819 K3<-sum(Column3 %in% "K")
da1012f014bd Uploaded
jfb
parents:
diff changeset
820 K4<-sum(Column4 %in% "K")
da1012f014bd Uploaded
jfb
parents:
diff changeset
821 K5<-sum(Column5 %in% "K")
da1012f014bd Uploaded
jfb
parents:
diff changeset
822 K6<-sum(Column6 %in% "K")
da1012f014bd Uploaded
jfb
parents:
diff changeset
823 K7<-sum(Column7 %in% "K")
da1012f014bd Uploaded
jfb
parents:
diff changeset
824 K8<-sum(Column8 %in% "K")
da1012f014bd Uploaded
jfb
parents:
diff changeset
825 K9<-sum(Column9 %in% "K")
da1012f014bd Uploaded
jfb
parents:
diff changeset
826 K10<-sum(Column10 %in% "K")
da1012f014bd Uploaded
jfb
parents:
diff changeset
827 K11<-sum(Column11 %in% "K")
da1012f014bd Uploaded
jfb
parents:
diff changeset
828 K12<-sum(Column12 %in% "K")
da1012f014bd Uploaded
jfb
parents:
diff changeset
829 K13<-sum(Column13 %in% "K")
da1012f014bd Uploaded
jfb
parents:
diff changeset
830 K14<-sum(Column14 %in% "K")
da1012f014bd Uploaded
jfb
parents:
diff changeset
831 K15<-sum(Column15 %in% "K")
da1012f014bd Uploaded
jfb
parents:
diff changeset
832 KllKs<-cbind(K1,K2,K3,K4,K5,K6,K7,K8,K9,K10,K11,K12,K13,K14,K15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
833
da1012f014bd Uploaded
jfb
parents:
diff changeset
834 L1<-sum(Column1 %in% "L")
da1012f014bd Uploaded
jfb
parents:
diff changeset
835 L2<-sum(Column2 %in% "L")
da1012f014bd Uploaded
jfb
parents:
diff changeset
836 L3<-sum(Column3 %in% "L")
da1012f014bd Uploaded
jfb
parents:
diff changeset
837 L4<-sum(Column4 %in% "L")
da1012f014bd Uploaded
jfb
parents:
diff changeset
838 L5<-sum(Column5 %in% "L")
da1012f014bd Uploaded
jfb
parents:
diff changeset
839 L6<-sum(Column6 %in% "L")
da1012f014bd Uploaded
jfb
parents:
diff changeset
840 L7<-sum(Column7 %in% "L")
da1012f014bd Uploaded
jfb
parents:
diff changeset
841 L8<-sum(Column8 %in% "L")
da1012f014bd Uploaded
jfb
parents:
diff changeset
842 L9<-sum(Column9 %in% "L")
da1012f014bd Uploaded
jfb
parents:
diff changeset
843 L10<-sum(Column10 %in% "L")
da1012f014bd Uploaded
jfb
parents:
diff changeset
844 L11<-sum(Column11 %in% "L")
da1012f014bd Uploaded
jfb
parents:
diff changeset
845 L12<-sum(Column12 %in% "L")
da1012f014bd Uploaded
jfb
parents:
diff changeset
846 L13<-sum(Column13 %in% "L")
da1012f014bd Uploaded
jfb
parents:
diff changeset
847 L14<-sum(Column14 %in% "L")
da1012f014bd Uploaded
jfb
parents:
diff changeset
848 L15<-sum(Column15 %in% "L")
da1012f014bd Uploaded
jfb
parents:
diff changeset
849 LllLs<-cbind(L1,L2,L3,L4,L5,L6,L7,L8,L9,L10,L11,L12,L13,L14,L15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
850
da1012f014bd Uploaded
jfb
parents:
diff changeset
851 M1<-sum(Column1 %in% "M")
da1012f014bd Uploaded
jfb
parents:
diff changeset
852 M2<-sum(Column2 %in% "M")
da1012f014bd Uploaded
jfb
parents:
diff changeset
853 M3<-sum(Column3 %in% "M")
da1012f014bd Uploaded
jfb
parents:
diff changeset
854 M4<-sum(Column4 %in% "M")
da1012f014bd Uploaded
jfb
parents:
diff changeset
855 M5<-sum(Column5 %in% "M")
da1012f014bd Uploaded
jfb
parents:
diff changeset
856 M6<-sum(Column6 %in% "M")
da1012f014bd Uploaded
jfb
parents:
diff changeset
857 M7<-sum(Column7 %in% "M")
da1012f014bd Uploaded
jfb
parents:
diff changeset
858 M8<-sum(Column8 %in% "M")
da1012f014bd Uploaded
jfb
parents:
diff changeset
859 M9<-sum(Column9 %in% "M")
da1012f014bd Uploaded
jfb
parents:
diff changeset
860 M10<-sum(Column10 %in% "M")
da1012f014bd Uploaded
jfb
parents:
diff changeset
861 M11<-sum(Column11 %in% "M")
da1012f014bd Uploaded
jfb
parents:
diff changeset
862 M12<-sum(Column12 %in% "M")
da1012f014bd Uploaded
jfb
parents:
diff changeset
863 M13<-sum(Column13 %in% "M")
da1012f014bd Uploaded
jfb
parents:
diff changeset
864 M14<-sum(Column14 %in% "M")
da1012f014bd Uploaded
jfb
parents:
diff changeset
865 M15<-sum(Column15 %in% "M")
da1012f014bd Uploaded
jfb
parents:
diff changeset
866 MllMs<-cbind(M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
867
da1012f014bd Uploaded
jfb
parents:
diff changeset
868 N1<-sum(Column1 %in% "N")
da1012f014bd Uploaded
jfb
parents:
diff changeset
869 N2<-sum(Column2 %in% "N")
da1012f014bd Uploaded
jfb
parents:
diff changeset
870 N3<-sum(Column3 %in% "N")
da1012f014bd Uploaded
jfb
parents:
diff changeset
871 N4<-sum(Column4 %in% "N")
da1012f014bd Uploaded
jfb
parents:
diff changeset
872 N5<-sum(Column5 %in% "N")
da1012f014bd Uploaded
jfb
parents:
diff changeset
873 N6<-sum(Column6 %in% "N")
da1012f014bd Uploaded
jfb
parents:
diff changeset
874 N7<-sum(Column7 %in% "N")
da1012f014bd Uploaded
jfb
parents:
diff changeset
875 N8<-sum(Column8 %in% "N")
da1012f014bd Uploaded
jfb
parents:
diff changeset
876 N9<-sum(Column9 %in% "N")
da1012f014bd Uploaded
jfb
parents:
diff changeset
877 N10<-sum(Column10 %in% "N")
da1012f014bd Uploaded
jfb
parents:
diff changeset
878 N11<-sum(Column11 %in% "N")
da1012f014bd Uploaded
jfb
parents:
diff changeset
879 N12<-sum(Column12 %in% "N")
da1012f014bd Uploaded
jfb
parents:
diff changeset
880 N13<-sum(Column13 %in% "N")
da1012f014bd Uploaded
jfb
parents:
diff changeset
881 N14<-sum(Column14 %in% "N")
da1012f014bd Uploaded
jfb
parents:
diff changeset
882 N15<-sum(Column15 %in% "N")
da1012f014bd Uploaded
jfb
parents:
diff changeset
883 NllNs<-cbind(N1,N2,N3,N4,N5,N6,N7,N8,N9,N10,N11,N12,N13,N14,N15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
884
da1012f014bd Uploaded
jfb
parents:
diff changeset
885 P1<-sum(Column1 %in% "P")
da1012f014bd Uploaded
jfb
parents:
diff changeset
886 P2<-sum(Column2 %in% "P")
da1012f014bd Uploaded
jfb
parents:
diff changeset
887 P3<-sum(Column3 %in% "P")
da1012f014bd Uploaded
jfb
parents:
diff changeset
888 P4<-sum(Column4 %in% "P")
da1012f014bd Uploaded
jfb
parents:
diff changeset
889 P5<-sum(Column5 %in% "P")
da1012f014bd Uploaded
jfb
parents:
diff changeset
890 P6<-sum(Column6 %in% "P")
da1012f014bd Uploaded
jfb
parents:
diff changeset
891 P7<-sum(Column7 %in% "P")
da1012f014bd Uploaded
jfb
parents:
diff changeset
892 P8<-sum(Column8 %in% "P")
da1012f014bd Uploaded
jfb
parents:
diff changeset
893 P9<-sum(Column9 %in% "P")
da1012f014bd Uploaded
jfb
parents:
diff changeset
894 P10<-sum(Column10 %in% "P")
da1012f014bd Uploaded
jfb
parents:
diff changeset
895 P11<-sum(Column11 %in% "P")
da1012f014bd Uploaded
jfb
parents:
diff changeset
896 P12<-sum(Column12 %in% "P")
da1012f014bd Uploaded
jfb
parents:
diff changeset
897 P13<-sum(Column13 %in% "P")
da1012f014bd Uploaded
jfb
parents:
diff changeset
898 P14<-sum(Column14 %in% "P")
da1012f014bd Uploaded
jfb
parents:
diff changeset
899 P15<-sum(Column15 %in% "P")
da1012f014bd Uploaded
jfb
parents:
diff changeset
900 PllPs<-cbind(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
901
da1012f014bd Uploaded
jfb
parents:
diff changeset
902 Q1<-sum(Column1 %in% "Q")
da1012f014bd Uploaded
jfb
parents:
diff changeset
903 Q2<-sum(Column2 %in% "Q")
da1012f014bd Uploaded
jfb
parents:
diff changeset
904 Q3<-sum(Column3 %in% "Q")
da1012f014bd Uploaded
jfb
parents:
diff changeset
905 Q4<-sum(Column4 %in% "Q")
da1012f014bd Uploaded
jfb
parents:
diff changeset
906 Q5<-sum(Column5 %in% "Q")
da1012f014bd Uploaded
jfb
parents:
diff changeset
907 Q6<-sum(Column6 %in% "Q")
da1012f014bd Uploaded
jfb
parents:
diff changeset
908 Q7<-sum(Column7 %in% "Q")
da1012f014bd Uploaded
jfb
parents:
diff changeset
909 Q8<-sum(Column8 %in% "Q")
da1012f014bd Uploaded
jfb
parents:
diff changeset
910 Q9<-sum(Column9 %in% "Q")
da1012f014bd Uploaded
jfb
parents:
diff changeset
911 Q10<-sum(Column10 %in% "Q")
da1012f014bd Uploaded
jfb
parents:
diff changeset
912 Q11<-sum(Column11 %in% "Q")
da1012f014bd Uploaded
jfb
parents:
diff changeset
913 Q12<-sum(Column12 %in% "Q")
da1012f014bd Uploaded
jfb
parents:
diff changeset
914 Q13<-sum(Column13 %in% "Q")
da1012f014bd Uploaded
jfb
parents:
diff changeset
915 Q14<-sum(Column14 %in% "Q")
da1012f014bd Uploaded
jfb
parents:
diff changeset
916 Q15<-sum(Column15 %in% "Q")
da1012f014bd Uploaded
jfb
parents:
diff changeset
917 QllQs<-cbind(Q1,Q2,Q3,Q4,Q5,Q6,Q7,Q8,Q9,Q10,Q11,Q12,Q13,Q14,Q15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
918
da1012f014bd Uploaded
jfb
parents:
diff changeset
919 R1<-sum(Column1 %in% "R")
da1012f014bd Uploaded
jfb
parents:
diff changeset
920 R2<-sum(Column2 %in% "R")
da1012f014bd Uploaded
jfb
parents:
diff changeset
921 R3<-sum(Column3 %in% "R")
da1012f014bd Uploaded
jfb
parents:
diff changeset
922 R4<-sum(Column4 %in% "R")
da1012f014bd Uploaded
jfb
parents:
diff changeset
923 R5<-sum(Column5 %in% "R")
da1012f014bd Uploaded
jfb
parents:
diff changeset
924 R6<-sum(Column6 %in% "R")
da1012f014bd Uploaded
jfb
parents:
diff changeset
925 R7<-sum(Column7 %in% "R")
da1012f014bd Uploaded
jfb
parents:
diff changeset
926 R8<-sum(Column8 %in% "R")
da1012f014bd Uploaded
jfb
parents:
diff changeset
927 R9<-sum(Column9 %in% "R")
da1012f014bd Uploaded
jfb
parents:
diff changeset
928 R10<-sum(Column10 %in% "R")
da1012f014bd Uploaded
jfb
parents:
diff changeset
929 R11<-sum(Column11 %in% "R")
da1012f014bd Uploaded
jfb
parents:
diff changeset
930 R12<-sum(Column12 %in% "R")
da1012f014bd Uploaded
jfb
parents:
diff changeset
931 R13<-sum(Column13 %in% "R")
da1012f014bd Uploaded
jfb
parents:
diff changeset
932 R14<-sum(Column14 %in% "R")
da1012f014bd Uploaded
jfb
parents:
diff changeset
933 R15<-sum(Column15 %in% "R")
da1012f014bd Uploaded
jfb
parents:
diff changeset
934 RllRs<-cbind(R1,R2,R3,R4,R5,R6,R7,R8,R9,R10,R11,R12,R13,R14,R15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
935
da1012f014bd Uploaded
jfb
parents:
diff changeset
936 S1<-sum(Column1 %in% "S")
da1012f014bd Uploaded
jfb
parents:
diff changeset
937 S2<-sum(Column2 %in% "S")
da1012f014bd Uploaded
jfb
parents:
diff changeset
938 S3<-sum(Column3 %in% "S")
da1012f014bd Uploaded
jfb
parents:
diff changeset
939 S4<-sum(Column4 %in% "S")
da1012f014bd Uploaded
jfb
parents:
diff changeset
940 S5<-sum(Column5 %in% "S")
da1012f014bd Uploaded
jfb
parents:
diff changeset
941 S6<-sum(Column6 %in% "S")
da1012f014bd Uploaded
jfb
parents:
diff changeset
942 S7<-sum(Column7 %in% "S")
da1012f014bd Uploaded
jfb
parents:
diff changeset
943 S8<-sum(Column8 %in% "S")
da1012f014bd Uploaded
jfb
parents:
diff changeset
944 S9<-sum(Column9 %in% "S")
da1012f014bd Uploaded
jfb
parents:
diff changeset
945 S10<-sum(Column10 %in% "S")
da1012f014bd Uploaded
jfb
parents:
diff changeset
946 S11<-sum(Column11 %in% "S")
da1012f014bd Uploaded
jfb
parents:
diff changeset
947 S12<-sum(Column12 %in% "S")
da1012f014bd Uploaded
jfb
parents:
diff changeset
948 S13<-sum(Column13 %in% "S")
da1012f014bd Uploaded
jfb
parents:
diff changeset
949 S14<-sum(Column14 %in% "S")
da1012f014bd Uploaded
jfb
parents:
diff changeset
950 S15<-sum(Column15 %in% "S")
da1012f014bd Uploaded
jfb
parents:
diff changeset
951 SllSs<-cbind(S1,S2,S3,S4,S5,S6,S7,S8,S9,S10,S11,S12,S13,S14,S15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
952
da1012f014bd Uploaded
jfb
parents:
diff changeset
953 T1<-sum(Column1 %in% "T")
da1012f014bd Uploaded
jfb
parents:
diff changeset
954 T2<-sum(Column2 %in% "T")
da1012f014bd Uploaded
jfb
parents:
diff changeset
955 T3<-sum(Column3 %in% "T")
da1012f014bd Uploaded
jfb
parents:
diff changeset
956 T4<-sum(Column4 %in% "T")
da1012f014bd Uploaded
jfb
parents:
diff changeset
957 T5<-sum(Column5 %in% "T")
da1012f014bd Uploaded
jfb
parents:
diff changeset
958 T6<-sum(Column6 %in% "T")
da1012f014bd Uploaded
jfb
parents:
diff changeset
959 T7<-sum(Column7 %in% "T")
da1012f014bd Uploaded
jfb
parents:
diff changeset
960 T8<-sum(Column8 %in% "T")
da1012f014bd Uploaded
jfb
parents:
diff changeset
961 T9<-sum(Column9 %in% "T")
da1012f014bd Uploaded
jfb
parents:
diff changeset
962 T10<-sum(Column10 %in% "T")
da1012f014bd Uploaded
jfb
parents:
diff changeset
963 T11<-sum(Column11 %in% "T")
da1012f014bd Uploaded
jfb
parents:
diff changeset
964 T12<-sum(Column12 %in% "T")
da1012f014bd Uploaded
jfb
parents:
diff changeset
965 T13<-sum(Column13 %in% "T")
da1012f014bd Uploaded
jfb
parents:
diff changeset
966 T14<-sum(Column14 %in% "T")
da1012f014bd Uploaded
jfb
parents:
diff changeset
967 T15<-sum(Column15 %in% "T")
da1012f014bd Uploaded
jfb
parents:
diff changeset
968 TllTs<-cbind(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
969
da1012f014bd Uploaded
jfb
parents:
diff changeset
970 V1<-sum(Column1 %in% "V")
da1012f014bd Uploaded
jfb
parents:
diff changeset
971 V2<-sum(Column2 %in% "V")
da1012f014bd Uploaded
jfb
parents:
diff changeset
972 V3<-sum(Column3 %in% "V")
da1012f014bd Uploaded
jfb
parents:
diff changeset
973 V4<-sum(Column4 %in% "V")
da1012f014bd Uploaded
jfb
parents:
diff changeset
974 V5<-sum(Column5 %in% "V")
da1012f014bd Uploaded
jfb
parents:
diff changeset
975 V6<-sum(Column6 %in% "V")
da1012f014bd Uploaded
jfb
parents:
diff changeset
976 V7<-sum(Column7 %in% "V")
da1012f014bd Uploaded
jfb
parents:
diff changeset
977 V8<-sum(Column8 %in% "V")
da1012f014bd Uploaded
jfb
parents:
diff changeset
978 V9<-sum(Column9 %in% "V")
da1012f014bd Uploaded
jfb
parents:
diff changeset
979 V10<-sum(Column10 %in% "V")
da1012f014bd Uploaded
jfb
parents:
diff changeset
980 V11<-sum(Column11 %in% "V")
da1012f014bd Uploaded
jfb
parents:
diff changeset
981 V12<-sum(Column12 %in% "V")
da1012f014bd Uploaded
jfb
parents:
diff changeset
982 V13<-sum(Column13 %in% "V")
da1012f014bd Uploaded
jfb
parents:
diff changeset
983 V14<-sum(Column14 %in% "V")
da1012f014bd Uploaded
jfb
parents:
diff changeset
984 V15<-sum(Column15 %in% "V")
da1012f014bd Uploaded
jfb
parents:
diff changeset
985 VllVs<-cbind(V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
986
da1012f014bd Uploaded
jfb
parents:
diff changeset
987 W1<-sum(Column1 %in% "W")
da1012f014bd Uploaded
jfb
parents:
diff changeset
988 W2<-sum(Column2 %in% "W")
da1012f014bd Uploaded
jfb
parents:
diff changeset
989 W3<-sum(Column3 %in% "W")
da1012f014bd Uploaded
jfb
parents:
diff changeset
990 W4<-sum(Column4 %in% "W")
da1012f014bd Uploaded
jfb
parents:
diff changeset
991 W5<-sum(Column5 %in% "W")
da1012f014bd Uploaded
jfb
parents:
diff changeset
992 W6<-sum(Column6 %in% "W")
da1012f014bd Uploaded
jfb
parents:
diff changeset
993 W7<-sum(Column7 %in% "W")
da1012f014bd Uploaded
jfb
parents:
diff changeset
994 W8<-sum(Column8 %in% "W")
da1012f014bd Uploaded
jfb
parents:
diff changeset
995 W9<-sum(Column9 %in% "W")
da1012f014bd Uploaded
jfb
parents:
diff changeset
996 W10<-sum(Column10 %in% "W")
da1012f014bd Uploaded
jfb
parents:
diff changeset
997 W11<-sum(Column11 %in% "W")
da1012f014bd Uploaded
jfb
parents:
diff changeset
998 W12<-sum(Column12 %in% "W")
da1012f014bd Uploaded
jfb
parents:
diff changeset
999 W13<-sum(Column13 %in% "W")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1000 W14<-sum(Column14 %in% "W")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1001 W15<-sum(Column15 %in% "W")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1002 WllWs<-cbind(W1,W2,W3,W4,W5,W6,W7,W8,W9,W10,W11,W12,W13,W14,W15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1003
da1012f014bd Uploaded
jfb
parents:
diff changeset
1004 Y1<-sum(Column1 %in% "Y")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1005 Y2<-sum(Column2 %in% "Y")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1006 Y3<-sum(Column3 %in% "Y")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1007 Y4<-sum(Column4 %in% "Y")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1008 Y5<-sum(Column5 %in% "Y")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1009 Y6<-sum(Column6 %in% "Y")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1010 Y7<-sum(Column7 %in% "Y")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1011 Y8<-sum(Column8 %in% "Y")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1012 Y9<-sum(Column9 %in% "Y")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1013 Y10<-sum(Column10 %in% "Y")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1014 Y11<-sum(Column11 %in% "Y")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1015 Y12<-sum(Column12 %in% "Y")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1016 Y13<-sum(Column13 %in% "Y")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1017 Y14<-sum(Column14 %in% "Y")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1018 Y15<-sum(Column15 %in% "Y")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1019 YllYs<-cbind(Y1,Y2,Y3,Y4,Y5,Y6,Y7,Y8,Y9,Y10,Y11,Y12,Y13,Y14,Y15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1020 PositionTable<-rbind(AllAs,CllCs,DllDs,EllEs,FllFs,GllGs,HllHs,IllIs,KllKs,LllLs,MllMs,NllNs,PllPs,QllQs,RllRs,SllSs,TllTs,VllVs,WllWs,YllYs)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1021 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
1022 #endogenous prob matrix is AA position over subbackfreqmean
da1012f014bd Uploaded
jfb
parents:
diff changeset
1023 dim(PositionTable)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1024 EPMtable<-PositionTable
da1012f014bd Uploaded
jfb
parents:
diff changeset
1025 # EPMtable[1,]<-(PositionTable[1,]/(PositionTable[1,]*.01*Amean))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1026 # EPMtable[2,]<-(PositionTable[2,]/(PositionTable[2,]*.01*Cmean))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1027 # EPMtable[3,]<-(PositionTable[3,]/(PositionTable[3,]*.01*Dmean))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1028 # EPMtable[4,]<-(PositionTable[4,]/(PositionTable[4,]*.01*Emean))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1029 # EPMtable[5,]<-(PositionTable[5,]/(PositionTable[5,]*.01*Fmean))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1030 # EPMtable[6,]<-(PositionTable[6,]/(PositionTable[6,]*.01*Gmean))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1031 # EPMtable[7,]<-(PositionTable[7,]/(PositionTable[7,]*.01*Hmean))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1032 # EPMtable[8,]<-(PositionTable[8,]/(PositionTable[8,]*.01*Imean))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1033 # EPMtable[9,]<-(PositionTable[9,]/(PositionTable[9,]*.01*Kmean))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1034 # EPMtable[10,]<-(PositionTable[10,]/(PositionTable[10,]*.01*Lmean))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1035 # EPMtable[11,]<-(PositionTable[11,]/(PositionTable[11,]*.01*Mmean))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1036 # EPMtable[12,]<-(PositionTable[12,]/(PositionTable[12,]*.01*Nmean))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1037 # EPMtable[13,]<-(PositionTable[13,]/(PositionTable[13,]*.01*Pmean))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1038 # EPMtable[14,]<-(PositionTable[14,]/(PositionTable[14,]*.01*Qmean))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1039 # EPMtable[15,]<-(PositionTable[15,]/(PositionTable[15,]*.01*Rmean))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1040 # EPMtable[16,]<-(PositionTable[16,]/(PositionTable[16,]*.01*Smean))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1041 # EPMtable[17,]<-(PositionTable[17,]/(PositionTable[17,]*.01*Tmean))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1042 # EPMtable[18,]<-(PositionTable[18,]/(PositionTable[18,]*.01*Vmean))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1043 # EPMtable[19,]<-(PositionTable[19,]/(PositionTable[19,]*.01*Wmean))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1044 # EPMtable[20,]<-(PositionTable[20,]/(PositionTable[20,]*.01*Ymean))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1045
da1012f014bd Uploaded
jfb
parents:
diff changeset
1046 columns<-c(length(Column1)-sum(Column1==""),
da1012f014bd Uploaded
jfb
parents:
diff changeset
1047 length(Column2)-sum(Column2==""),
da1012f014bd Uploaded
jfb
parents:
diff changeset
1048 length(Column3)-sum(Column3==""),
da1012f014bd Uploaded
jfb
parents:
diff changeset
1049 length(Column4)-sum(Column4==""),
da1012f014bd Uploaded
jfb
parents:
diff changeset
1050 length(Column5)-sum(Column5==""),
da1012f014bd Uploaded
jfb
parents:
diff changeset
1051 length(Column6)-sum(Column6==""),
da1012f014bd Uploaded
jfb
parents:
diff changeset
1052 length(Column7)-sum(Column7==""),
da1012f014bd Uploaded
jfb
parents:
diff changeset
1053 length(Column8)-sum(Column8==""),
da1012f014bd Uploaded
jfb
parents:
diff changeset
1054 length(Column9)-sum(Column9==""),
da1012f014bd Uploaded
jfb
parents:
diff changeset
1055 length(Column10)-sum(Column10==""),
da1012f014bd Uploaded
jfb
parents:
diff changeset
1056 length(Column11)-sum(Column11==""),
da1012f014bd Uploaded
jfb
parents:
diff changeset
1057 length(Column12)-sum(Column12==""),
da1012f014bd Uploaded
jfb
parents:
diff changeset
1058 length(Column13)-sum(Column13==""),
da1012f014bd Uploaded
jfb
parents:
diff changeset
1059 length(Column14)-sum(Column14==""),
da1012f014bd Uploaded
jfb
parents:
diff changeset
1060 length(Column15)-sum(Column15==""))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1061
da1012f014bd Uploaded
jfb
parents:
diff changeset
1062 for (z in 1:15) {
da1012f014bd Uploaded
jfb
parents:
diff changeset
1063 for (y in 1:20) {
da1012f014bd Uploaded
jfb
parents:
diff changeset
1064 if (PositionTable[y,z]>0){
da1012f014bd Uploaded
jfb
parents:
diff changeset
1065 EPMtable[y,z]<-PositionTable[y,z]/((columns[z]*.01*AllMeans[y]))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1066 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
1067 if (PositionTable[y,z]==0){
da1012f014bd Uploaded
jfb
parents:
diff changeset
1068 EPMtable[y,z]<-(1/columns[z])/((columns[z]*.01*AllMeans[y]))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1069 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
1070 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
1071 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
1072 #here I created the endogenous probability matrix
da1012f014bd Uploaded
jfb
parents:
diff changeset
1073 #now all I need to do is make the program automatically determine which SDs are >2, and then make it perform screener and sorter on those SDs
da1012f014bd Uploaded
jfb
parents:
diff changeset
1074
da1012f014bd Uploaded
jfb
parents:
diff changeset
1075
da1012f014bd Uploaded
jfb
parents:
diff changeset
1076
da1012f014bd Uploaded
jfb
parents:
diff changeset
1077
da1012f014bd Uploaded
jfb
parents:
diff changeset
1078
da1012f014bd Uploaded
jfb
parents:
diff changeset
1079 # write.xlsx(SDtable,file=FILENAME, sheetName = "Standard Deviation Table",col.names = FALSE,row.names = FALSE,append = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1080 # write.xlsx(PercentTable,file = FILENAME,sheetName = "Percent Table",col.names = FALSE,row.names = FALSE,append = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1081 # write.xlsx(SelectivitySheet,file = FILENAME,sheetName = "Site Selectivity",col.names = FALSE,row.names = FALSE,append = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1082 # write.xlsx(EPMtable,file=FILENAME,sheetName = "Endogenous Probability Matrix",col.names = FALSE,row.names = FALSE,append = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1083 # write.xlsx(NormalizationScore,file = FILENAME,sheetName = "Normalization Score",col.names = FALSE,row.names = FALSE,append = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1084
da1012f014bd Uploaded
jfb
parents:
diff changeset
1085 NormalizationScore<-c("Normalization Score",NormalizationScore)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1086
da1012f014bd Uploaded
jfb
parents:
diff changeset
1087 write.table(x=c("SD Table"),file=FILENAME,append = TRUE,sep=",", row.names = FALSE, col.names = FALSE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1088 write.table(SDtable,file=FILENAME,append = TRUE,sep=",", row.names = FALSE, col.names = FALSE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1089 write.table(x=c("Percent Table"),file=FILENAME,append = TRUE,sep=",", row.names = FALSE, col.names = FALSE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1090 write.table(PercentTable,file=FILENAME, append = TRUE,sep=",",row.names = FALSE, col.names = FALSE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1091
da1012f014bd Uploaded
jfb
parents:
diff changeset
1092 EPMtableu<-EPMtable
da1012f014bd Uploaded
jfb
parents:
diff changeset
1093 HeaderSD<-c(-7:7)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1094 EPMtableu<-rbind(HeaderSD,EPMtableu)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1095 row.names(EPMtableu)<-NULL
da1012f014bd Uploaded
jfb
parents:
diff changeset
1096 EPMtableu<-data.frame(SetOfAAs,EPMtableu)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1097
da1012f014bd Uploaded
jfb
parents:
diff changeset
1098 write.table("Site Selectivity Matrix", file = FILENAME2, append = TRUE, sep = ",", row.names = FALSE, col.names = FALSE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1099 SelectivityHeader=matrix(data = c("Position",-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7),nrow = 1)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1100 head<-matrix(data=rep(" ",times=16),nrow = 1)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1101 SelectivityHeader<-rbind(head,SelectivityHeader)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1102
da1012f014bd Uploaded
jfb
parents:
diff changeset
1103 write.table(SelectivityHeader, file = FILENAME2, append = TRUE, sep = ",", row.names = FALSE, col.names = FALSE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1104 #colnames(SelectivitySheet)<-c("-7","-6","-5","-4","-3","-2","-1","0","1","2","3","4","5","6","7")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1105 write.table(SelectivitySheet,file = FILENAME2, append = TRUE,sep = ",",row.names = TRUE, col.names = FALSE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1106 write.table(x=c("Endogenous Probability Matrix"),file=FILENAME2,append = TRUE,sep=",", row.names = FALSE, col.names = FALSE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1107 write.table(EPMtableu,file = FILENAME2, append = TRUE,sep = ",",row.names = FALSE, col.names = FALSE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1108 write.table(NormalizationScore, file = FILENAME2, append = TRUE,sep = ",",row.names = FALSE, col.names = FALSE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1109
da1012f014bd Uploaded
jfb
parents:
diff changeset
1110
da1012f014bd Uploaded
jfb
parents:
diff changeset
1111
da1012f014bd Uploaded
jfb
parents:
diff changeset
1112
da1012f014bd Uploaded
jfb
parents:
diff changeset
1113
da1012f014bd Uploaded
jfb
parents:
diff changeset
1114
da1012f014bd Uploaded
jfb
parents:
diff changeset
1115
da1012f014bd Uploaded
jfb
parents:
diff changeset
1116
da1012f014bd Uploaded
jfb
parents:
diff changeset
1117
da1012f014bd Uploaded
jfb
parents:
diff changeset
1118
da1012f014bd Uploaded
jfb
parents:
diff changeset
1119
da1012f014bd Uploaded
jfb
parents:
diff changeset
1120
da1012f014bd Uploaded
jfb
parents:
diff changeset
1121
da1012f014bd Uploaded
jfb
parents:
diff changeset
1122
da1012f014bd Uploaded
jfb
parents:
diff changeset
1123
da1012f014bd Uploaded
jfb
parents:
diff changeset
1124
da1012f014bd Uploaded
jfb
parents:
diff changeset
1125
da1012f014bd Uploaded
jfb
parents:
diff changeset
1126
da1012f014bd Uploaded
jfb
parents:
diff changeset
1127
da1012f014bd Uploaded
jfb
parents:
diff changeset
1128
da1012f014bd Uploaded
jfb
parents:
diff changeset
1129
da1012f014bd Uploaded
jfb
parents:
diff changeset
1130
da1012f014bd Uploaded
jfb
parents:
diff changeset
1131
da1012f014bd Uploaded
jfb
parents:
diff changeset
1132
da1012f014bd Uploaded
jfb
parents:
diff changeset
1133
da1012f014bd Uploaded
jfb
parents:
diff changeset
1134
da1012f014bd Uploaded
jfb
parents:
diff changeset
1135
da1012f014bd Uploaded
jfb
parents:
diff changeset
1136
da1012f014bd Uploaded
jfb
parents:
diff changeset
1137
da1012f014bd Uploaded
jfb
parents:
diff changeset
1138
da1012f014bd Uploaded
jfb
parents:
diff changeset
1139
da1012f014bd Uploaded
jfb
parents:
diff changeset
1140
da1012f014bd Uploaded
jfb
parents:
diff changeset
1141
da1012f014bd Uploaded
jfb
parents:
diff changeset
1142
da1012f014bd Uploaded
jfb
parents:
diff changeset
1143 #test myself: this script should take in amino acids for each of the 9 positions and give out every single combination of those AAs
da1012f014bd Uploaded
jfb
parents:
diff changeset
1144
da1012f014bd Uploaded
jfb
parents:
diff changeset
1145 #need to do following: fix it so that the accession numbers stay with the substrates,
da1012f014bd Uploaded
jfb
parents:
diff changeset
1146 #also the neg false constant is totaly unphos'd Ys found by FASTA-2-CSV system# uniprot
da1012f014bd Uploaded
jfb
parents:
diff changeset
1147
da1012f014bd Uploaded
jfb
parents:
diff changeset
1148 #HOW MANY: IF THERE'S two aas in each position you get 2^9, so I assume the numbers are:
da1012f014bd Uploaded
jfb
parents:
diff changeset
1149 #(number in position-4)*(number in position -3)*(number in position -2)...=total
da1012f014bd Uploaded
jfb
parents:
diff changeset
1150 # require(rJava)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1151 # require(xlsxjars)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1152 # require(xlsx)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1153 # # require(readxl)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1154
da1012f014bd Uploaded
jfb
parents:
diff changeset
1155 #View(SDtable)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1156 bareSDs<-SDtable[2:21,2:16]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1157 goodones<-bareSDs>2
da1012f014bd Uploaded
jfb
parents:
diff changeset
1158
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1159 # Positionm7<-which(goodones[,1] %in% TRUE)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1160 # if (length(Positionm7)<1){Positionm7<-which(bareSDs[,1]==max(bareSDs[,1]))}
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1161 # Positionm6<-which(goodones[,2] %in% TRUE)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1162 # if (length(Positionm6)<1){Positionm6<-which(bareSDs[,2]==max(bareSDs[,2]))}
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1163 # Positionm5<-which(goodones[,3] %in% TRUE)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1164 # if (length(Positionm5)<1){Positionm5<-which(bareSDs[,3]==max(bareSDs[,3]))}
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1165 # Positionm4<-which(goodones[,4] %in% TRUE)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1166 # if (length(Positionm4)<2){Positionm4<-bareSDs[,4][order(bareSDs[,4])[1:2]]}
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1167 # Positionm3<-which(goodones[,5] %in% TRUE)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1168 # if (length(Positionm3)<2){Positionm3<-bareSDs[,5][order(bareSDs[,5])[1:2]]}
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1169 # Positionm2<-which(goodones[,6] %in% TRUE)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1170 # if (length(Positionm2)<2){Positionm2<-bareSDs[,6][order(bareSDs[,6])[1:2]]}
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1171 # Positionm1<-which(goodones[,7] %in% TRUE)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1172 # if (length(Positionm1)<2){Positionm1<-bareSDs[,7][order(bareSDs[,7])[1:2]]}
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1173 #
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1174 # Positiond0<-which(goodones[,8] %in% TRUE)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1175 # if (length(Positiond0)<1){Positiond0<-which(bareSDs[,8]==max(bareSDs[,8]))}
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1176 #
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1177 # Positionp1<-which(goodones[,9] %in% TRUE)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1178 # if (length(Positionp1)<2){Positionp1<-bareSDs[,9][order(bareSDs[,9])[1:2]]}
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1179 # Positionp2<-which(goodones[,10] %in% TRUE)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1180 # if (length(Positionp2)<2){Positionp2<-bareSDs[,10][order(bareSDs[,10])[1:2]]}
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1181 # Positionp3<-which(goodones[,11] %in% TRUE)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1182 # if (length(Positionp3)<2){Positionp3<-bareSDs[,11][order(bareSDs[,11])[1:2]]}
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1183 # Positionp4<-which(goodones[,12] %in% TRUE)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1184 # if (length(Positionp4)<2){Positionp4<-bareSDs[,12][order(bareSDs[,12])[1:2]]}
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1185 # Positionp5<-which(goodones[,13] %in% TRUE)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1186 # if (length(Positionp5)<1){Positionp5<-which(bareSDs[,13]==max(bareSDs[,13]))}
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1187 # Positionp6<-which(goodones[,14] %in% TRUE)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1188 # if (length(Positionp6)<1){Positionp6<-which(bareSDs[,14]==max(bareSDs[,14]))}
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1189 # Positionp7<-which(goodones[,15] %in% TRUE)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1190 # if (length(Positionp7)<1){Positionp7<-which(bareSDs[,15]==max(bareSDs[,15]))}
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1191
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1192
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1193
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1194
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1195 # Positionm7<-which(goodones[,1] %in% TRUE)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1196 # if (length(Positionm7)<1){Positionm7<-which(bareSDs[,1]==max(bareSDs[,1]))}
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1197 # Positionm6<-which(goodones[,2] %in% TRUE)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1198 # if (length(Positionm6)<1){Positionm6<-which(bareSDs[,2]==max(bareSDs[,2]))}
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1199 # Positionm5<-which(goodones[,3] %in% TRUE)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1200 # if (length(Positionm5)<1){Positionm5<-which(bareSDs[,3]==max(bareSDs[,3]))}
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1201 # Positionm4<-which(goodones[,4] %in% TRUE)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1202 # if (length(Positionm4)<1){Positionm4<-which(bareSDs[,4]==max(bareSDs[,4]))}
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1203 # Positionm3<-which(goodones[,5] %in% TRUE)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1204 # if (length(Positionm3)<1){Positionm3<-which(bareSDs[,5]==max(bareSDs[,5]))}
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1205 # Positionm2<-which(goodones[,6] %in% TRUE)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1206 # if (length(Positionm2)<1){Positionm2<-which(bareSDs[,6]==max(bareSDs[,6]))}
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1207 # Positionm1<-which(goodones[,7] %in% TRUE)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1208 # if (length(Positionm1)<1){Positionm1<-which(bareSDs[,7]==max(bareSDs[,7]))}
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1209 #
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1210 # Positiond0<-which(goodones[,8] %in% TRUE)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1211 # if (length(Positiond0)<1){Positiond0<-which(bareSDs[,8]==max(bareSDs[,8]))}
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1212 #
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1213 # Positionp1<-which(goodones[,9] %in% TRUE)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1214 # if (length(Positionp1)<1){Positionp1<-which(bareSDs[,9]==max(bareSDs[,9]))}
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1215 # Positionp2<-which(goodones[,10] %in% TRUE)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1216 # if (length(Positionp2)<1){Positionp2<-which(bareSDs[,10]==max(bareSDs[,10]))}
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1217 # Positionp3<-which(goodones[,11] %in% TRUE)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1218 # if (length(Positionp3)<1){Positionp3<-which(bareSDs[,11]==max(bareSDs[,11]))}
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1219 # Positionp4<-which(goodones[,12] %in% TRUE)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1220 # if (length(Positionp4)<1){Positionp4<-which(bareSDs[,12]==max(bareSDs[,12]))}
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1221 # Positionp5<-which(goodones[,13] %in% TRUE)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1222 # if (length(Positionp5)<1){Positionp5<-which(bareSDs[,13]==max(bareSDs[,13]))}
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1223 # Positionp6<-which(goodones[,14] %in% TRUE)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1224 # if (length(Positionp6)<1){Positionp6<-which(bareSDs[,14]==max(bareSDs[,14]))}
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1225 # Positionp7<-which(goodones[,15] %in% TRUE)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1226 # if (length(Positionp7)<1){Positionp7<-which(bareSDs[,15]==max(bareSDs[,15]))}
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1227
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1228 match(c(bareSDs[,2][order(bareSDs[,2])[1:2]]),bareSDs[,2])
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1229
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1230 Positionm7<-which(goodones[,1] %in% TRUE)
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1231 if (length(Positionm7)<3){Positionm7<-match(c(bareSDs[,1][order(bareSDs[,1])[19:20]]),bareSDs[,1])}
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1232 Positionm6<-which(goodones[,2] %in% TRUE)
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1233 if (length(Positionm6)<3){Positionm6<-match(c(bareSDs[,2][order(bareSDs[,2])[19:20]]),bareSDs[,2])}
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1234 Positionm5<-which(goodones[,3] %in% TRUE)
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1235 if (length(Positionm5)<3){Positionm5<-match(c(bareSDs[,3][order(bareSDs[,3])[19:20]]),bareSDs[,3])}
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1236 Positionm4<-which(goodones[,4] %in% TRUE)
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1237 if (length(Positionm4)<3){Positionm4<-match(c(bareSDs[,4][order(bareSDs[,4])[19:20]]),bareSDs[,4])}
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1238 Positionm3<-which(goodones[,5] %in% TRUE)
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1239 if (length(Positionm3)<3){Positionm3<-match(c(bareSDs[,5][order(bareSDs[,5])[19:20]]),bareSDs[,5])}
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1240 Positionm2<-which(goodones[,6] %in% TRUE)
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1241 if (length(Positionm2)<3){Positionm2<-match(c(bareSDs[,6][order(bareSDs[,6])[19:20]]),bareSDs[,6])}
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1242 Positionm1<-which(goodones[,7] %in% TRUE)
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1243 if (length(Positionm1)<3){Positionm1<-match(c(bareSDs[,7][order(bareSDs[,7])[19:20]]),bareSDs[,7])}
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1244
da1012f014bd Uploaded
jfb
parents:
diff changeset
1245 Positiond0<-which(goodones[,8] %in% TRUE)
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1246 #if (length(Positiond0)<3){Positiond0<-bareSDs[,8][order(bareSDs[,8])[1:2]]}
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1247
da1012f014bd Uploaded
jfb
parents:
diff changeset
1248 Positionp1<-which(goodones[,9] %in% TRUE)
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1249 if (length(Positionp1)<3){Positionp1<-match(c(bareSDs[,9][order(bareSDs[,9])[19:20]]),bareSDs[,9])}
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1250 Positionp2<-which(goodones[,10] %in% TRUE)
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1251 if (length(Positionp2)<3){Positionp2<-match(c(bareSDs[,10][order(bareSDs[,10])[19:20]]),bareSDs[,10])}
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1252 Positionp3<-which(goodones[,11] %in% TRUE)
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1253 if (length(Positionp3)<3){Positionp3<-match(c(bareSDs[,11][order(bareSDs[,11])[19:20]]),bareSDs[,11])}
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1254 Positionp4<-which(goodones[,12] %in% TRUE)
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1255 if (length(Positionp4)<3){Positionp4<-match(c(bareSDs[,12][order(bareSDs[,12])[19:20]]),bareSDs[,12])}
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1256 Positionp5<-which(goodones[,13] %in% TRUE)
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1257 if (length(Positionp5)<3){Positionp5<-match(c(bareSDs[,13][order(bareSDs[,13])[19:20]]),bareSDs[,13])}
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1258 Positionp6<-which(goodones[,14] %in% TRUE)
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1259 if (length(Positionp6)<3){Positionp6<-match(c(bareSDs[,14][order(bareSDs[,14])[19:20]]),bareSDs[,14])}
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1260 Positionp7<-which(goodones[,15] %in% TRUE)
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1261 if (length(Positionp7)<3){Positionp7<-match(c(bareSDs[,15][order(bareSDs[,15])[19:20]]),bareSDs[,15])}
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1262
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1263
da1012f014bd Uploaded
jfb
parents:
diff changeset
1264 aa_props2 <- c("1"="A", "2"="C", "3"="D", "4"="E", "5"="F", "6"="G", "7"="H", "8"="I", "9"="K", "10"="L", "11"="M", "12"="N",
da1012f014bd Uploaded
jfb
parents:
diff changeset
1265 "13"="P", "14"="Q", "15"="R", "16"="S", "17"="T", "18"="V", "19"="W", "20"="Y")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1266
da1012f014bd Uploaded
jfb
parents:
diff changeset
1267 Positionm7<-sapply(Positionm7, function (x) aa_props2[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1268 Positionm6<-sapply(Positionm6, function (x) aa_props2[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1269 Positionm5<-sapply(Positionm5, function (x) aa_props2[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1270 Positionm4<-sapply(Positionm4, function (x) aa_props2[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1271 Positionm3<-sapply(Positionm3, function (x) aa_props2[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1272 Positionm2<-sapply(Positionm2, function (x) aa_props2[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1273 Positionm1<-sapply(Positionm1, function (x) aa_props2[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1274 Positiond0<-sapply(Positiond0, function (x) aa_props2[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1275 Positionp1<-sapply(Positionp1, function (x) aa_props2[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1276 Positionp2<-sapply(Positionp2, function (x) aa_props2[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1277 Positionp3<-sapply(Positionp3, function (x) aa_props2[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1278 Positionp4<-sapply(Positionp4, function (x) aa_props2[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1279 Positionp5<-sapply(Positionp5, function (x) aa_props2[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1280 Positionp6<-sapply(Positionp6, function (x) aa_props2[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1281 Positionp7<-sapply(Positionp7, function (x) aa_props2[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1282
da1012f014bd Uploaded
jfb
parents:
diff changeset
1283
da1012f014bd Uploaded
jfb
parents:
diff changeset
1284 # Positionm7<-c("D","H","N","V")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1285 # Positionm6<-c("E","V")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1286 # Positionm5<-c("D","H")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1287 # Positionm4<-c("D","N")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1288 # Positionm3<-c("D","E","F","Q")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1289 # Positionm2<-c("D","N","Q","S")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1290 # Positionm1<-c("F","I","L")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1291 # Positiond0<-c("Y")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1292 # Positionp1<-c("A","E")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1293 # Positionp2<-c("T","S","Q","E")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1294 # Positionp3<-c("V")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1295 # Positionp4<-c("K")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1296 # Positionp5<-c("K")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1297 # Positionp6<-c("K")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1298 # Positionp7<-c("R")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1299 #this is where the amino acids for each position are given. m means minus, p mean plus
da1012f014bd Uploaded
jfb
parents:
diff changeset
1300 ########################################
da1012f014bd Uploaded
jfb
parents:
diff changeset
1301 # ScreenerFilename<-"C:/Users/User Name/Desktop/UMN 2017 Spring/Parker Lab/Kinatest ID/Screener.xls"
da1012f014bd Uploaded
jfb
parents:
diff changeset
1302
da1012f014bd Uploaded
jfb
parents:
diff changeset
1303
da1012f014bd Uploaded
jfb
parents:
diff changeset
1304
da1012f014bd Uploaded
jfb
parents:
diff changeset
1305
da1012f014bd Uploaded
jfb
parents:
diff changeset
1306
da1012f014bd Uploaded
jfb
parents:
diff changeset
1307
da1012f014bd Uploaded
jfb
parents:
diff changeset
1308
da1012f014bd Uploaded
jfb
parents:
diff changeset
1309
da1012f014bd Uploaded
jfb
parents:
diff changeset
1310
da1012f014bd Uploaded
jfb
parents:
diff changeset
1311
da1012f014bd Uploaded
jfb
parents:
diff changeset
1312
da1012f014bd Uploaded
jfb
parents:
diff changeset
1313 screaner<-read.csv(ScreenerFilename, header = FALSE, stringsAsFactors = FALSE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1314
da1012f014bd Uploaded
jfb
parents:
diff changeset
1315
da1012f014bd Uploaded
jfb
parents:
diff changeset
1316 Abl<-screaner[2:25,]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1317 Arg<-screaner[27:50,]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1318 Btk<-screaner[52:75,]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1319 Csk<-screaner[77:100,]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1320 Fyn<-screaner[102:125,]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1321 Hck<-screaner[127:150,]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1322 JAK2<-screaner[152:175,]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1323 Lck<-screaner[177:200,]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1324 Lyn<-screaner[202:225,]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1325 Pyk2<-screaner[227:250,]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1326 Src<-screaner[252:275,]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1327 Syk<-screaner[277:300,]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1328 Yes<-screaner[302:325,]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1329
da1012f014bd Uploaded
jfb
parents:
diff changeset
1330 #two questions: why are we doing BTK when we already have a bioninformatics page about it?
da1012f014bd Uploaded
jfb
parents:
diff changeset
1331 #two I reran everything and only get 96 positions of interest in the SD table
da1012f014bd Uploaded
jfb
parents:
diff changeset
1332
da1012f014bd Uploaded
jfb
parents:
diff changeset
1333
da1012f014bd Uploaded
jfb
parents:
diff changeset
1334
da1012f014bd Uploaded
jfb
parents:
diff changeset
1335
da1012f014bd Uploaded
jfb
parents:
diff changeset
1336
da1012f014bd Uploaded
jfb
parents:
diff changeset
1337
da1012f014bd Uploaded
jfb
parents:
diff changeset
1338
da1012f014bd Uploaded
jfb
parents:
diff changeset
1339
da1012f014bd Uploaded
jfb
parents:
diff changeset
1340
da1012f014bd Uploaded
jfb
parents:
diff changeset
1341 #Do_You_want_An_Excel_Output_Questionmark<-"NO"
da1012f014bd Uploaded
jfb
parents:
diff changeset
1342 GeneratedPeptidesFile<-"GeneratedPeptidesFile.csv"
da1012f014bd Uploaded
jfb
parents:
diff changeset
1343
da1012f014bd Uploaded
jfb
parents:
diff changeset
1344
da1012f014bd Uploaded
jfb
parents:
diff changeset
1345 # Abl<-read.xlsx("C:/Users/User Name/Desktop/UMN 2017 Spring/Parker Lab/Kinatest ID/Screener.xls", sheetIndex = 4)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1346 # Arg<-read.xlsx("C:/Users/User Name/Desktop/UMN 2017 Spring/Parker Lab/Kinatest ID/Screener.xls", sheetIndex = 5)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1347 # Btk<-read.xlsx("C:/Users/User Name/Desktop/UMN 2017 Spring/Parker Lab/Kinatest ID/Screener.xls", sheetIndex = 6)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1348 # Csk<-read.xlsx("C:/Users/User Name/Desktop/UMN 2017 Spring/Parker Lab/Kinatest ID/Screener.xls", sheetIndex = 7)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1349 # Fyn<-read.xlsx("C:/Users/User Name/Desktop/UMN 2017 Spring/Parker Lab/Kinatest ID/Screener.xls", sheetIndex = 8)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1350 # Hck<-read.xlsx("C:/Users/User Name/Desktop/UMN 2017 Spring/Parker Lab/Kinatest ID/Screener.xls", sheetIndex = 9)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1351 # JAK2<-read.xlsx("C:/Users/User Name/Desktop/UMN 2017 Spring/Parker Lab/Kinatest ID/Screener.xls", sheetIndex = 10)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1352 # Lck<-read.xlsx("C:/Users/User Name/Desktop/UMN 2017 Spring/Parker Lab/Kinatest ID/Screener.xls", sheetIndex = 11)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1353 # Lyn<-read.xlsx("C:/Users/User Name/Desktop/UMN 2017 Spring/Parker Lab/Kinatest ID/Screener.xls", sheetIndex = 12)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1354 # Pyk2<-read.xlsx("C:/Users/User Name/Desktop/UMN 2017 Spring/Parker Lab/Kinatest ID/Screener.xls", sheetIndex = 13)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1355 # Src<-read.xlsx("C:/Users/User Name/Desktop/UMN 2017 Spring/Parker Lab/Kinatest ID/Screener.xls", sheetIndex = 14)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1356 # Syk<-read.xlsx("C:/Users/User Name/Desktop/UMN 2017 Spring/Parker Lab/Kinatest ID/Screener.xls", sheetIndex = 15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1357 # Yes<-read.xlsx("C:/Users/User Name/Desktop/UMN 2017 Spring/Parker Lab/Kinatest ID/Screener.xls", sheetIndex = 16)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1358 #
da1012f014bd Uploaded
jfb
parents:
diff changeset
1359
da1012f014bd Uploaded
jfb
parents:
diff changeset
1360
da1012f014bd Uploaded
jfb
parents:
diff changeset
1361 "A"=1
da1012f014bd Uploaded
jfb
parents:
diff changeset
1362 "C"=2
da1012f014bd Uploaded
jfb
parents:
diff changeset
1363 "D"=3
da1012f014bd Uploaded
jfb
parents:
diff changeset
1364 "E"=4
da1012f014bd Uploaded
jfb
parents:
diff changeset
1365 "F"=5
da1012f014bd Uploaded
jfb
parents:
diff changeset
1366 "G"=6
da1012f014bd Uploaded
jfb
parents:
diff changeset
1367 "H"=7
da1012f014bd Uploaded
jfb
parents:
diff changeset
1368 "I"=8
da1012f014bd Uploaded
jfb
parents:
diff changeset
1369 "K"=9
da1012f014bd Uploaded
jfb
parents:
diff changeset
1370 "L"=10
da1012f014bd Uploaded
jfb
parents:
diff changeset
1371 "M"=11
da1012f014bd Uploaded
jfb
parents:
diff changeset
1372 "N"=12
da1012f014bd Uploaded
jfb
parents:
diff changeset
1373 "P"=13
da1012f014bd Uploaded
jfb
parents:
diff changeset
1374 "Q"=14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1375 "R"=15
da1012f014bd Uploaded
jfb
parents:
diff changeset
1376 "S"=16
da1012f014bd Uploaded
jfb
parents:
diff changeset
1377 "T"=17
da1012f014bd Uploaded
jfb
parents:
diff changeset
1378 "V"=18
da1012f014bd Uploaded
jfb
parents:
diff changeset
1379 "W"=19
da1012f014bd Uploaded
jfb
parents:
diff changeset
1380 "Y"=20
da1012f014bd Uploaded
jfb
parents:
diff changeset
1381
da1012f014bd Uploaded
jfb
parents:
diff changeset
1382 aa_props <- c("A"=A, "C"=C, "D"=D, "E"=E, "F"=F,"G"=G,"H"=H,"I"=I,"K"=K,"L"=L,"M"=M,"N"=N,"P"=P,"Q"=Q,"R"=R,
da1012f014bd Uploaded
jfb
parents:
diff changeset
1383 "S"=S,"T"=T,"V"=V,"W"=W,"Y"=Y,"xY"=Y,"O"=21)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1384
da1012f014bd Uploaded
jfb
parents:
diff changeset
1385 number15<-sapply(Positionm7, function (x) aa_props[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1386 number14<-sapply(Positionm6, function (x) aa_props[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1387 number13<-sapply(Positionm5, function (x) aa_props[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1388 number1 <- sapply(Positionm4, function (x) aa_props[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1389 number2 <- sapply(Positionm3, function (x) aa_props[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1390 number3 <- sapply(Positionm2, function (x) aa_props[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1391 number4 <- sapply(Positionm1, function (x) aa_props[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1392 number5 <- sapply(Positiond0, function (x) aa_props[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1393 number6 <- sapply(Positionp1, function (x) aa_props[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1394 number7 <- sapply(Positionp2, function (x) aa_props[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1395 number8 <- sapply(Positionp3, function (x) aa_props[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1396 number9 <- sapply(Positionp4, function (x) aa_props[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1397 number10<-sapply(Positionp5, function (x) aa_props[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1398 number11<-sapply(Positionp6, function (x) aa_props[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1399 number12<-sapply(Positionp7, function (x) aa_props[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1400
da1012f014bd Uploaded
jfb
parents:
diff changeset
1401 # number1<-Positionm4
da1012f014bd Uploaded
jfb
parents:
diff changeset
1402 # number2<-Positionm3
da1012f014bd Uploaded
jfb
parents:
diff changeset
1403 # number3<-Positionm2
da1012f014bd Uploaded
jfb
parents:
diff changeset
1404 # number4<-Positionm1
da1012f014bd Uploaded
jfb
parents:
diff changeset
1405 # number5<-Positiond0
da1012f014bd Uploaded
jfb
parents:
diff changeset
1406 # number6<-Positionp1
da1012f014bd Uploaded
jfb
parents:
diff changeset
1407 # number7<-Positionp2
da1012f014bd Uploaded
jfb
parents:
diff changeset
1408 # number8<-Positionp3
da1012f014bd Uploaded
jfb
parents:
diff changeset
1409 # number9<-Positionp4
da1012f014bd Uploaded
jfb
parents:
diff changeset
1410
da1012f014bd Uploaded
jfb
parents:
diff changeset
1411 #############################
da1012f014bd Uploaded
jfb
parents:
diff changeset
1412 #here I create the Abl seqs with proper value for each number
da1012f014bd Uploaded
jfb
parents:
diff changeset
1413 if (1==0){
da1012f014bd Uploaded
jfb
parents:
diff changeset
1414 Ablnumber1<- gsub("A",A,Ablnumber1,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1415 Ablnumber1<- gsub("C",C,Ablnumber1,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1416 Ablnumber1<- gsub("D",D,Ablnumber1,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1417 Ablnumber1<- gsub("E",E,Ablnumber1,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1418 Ablnumber1<- gsub("F",F,Ablnumber1,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1419 Ablnumber1<- gsub("G",G,Ablnumber1,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1420 Ablnumber1<- gsub("H",H,Ablnumber1,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1421 Ablnumber1<- gsub("I",I,Ablnumber1,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1422 Ablnumber1<- gsub("K",K,Ablnumber1,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1423 Ablnumber1<- gsub("L",L,Ablnumber1,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1424 Ablnumber1<- gsub("M",M,Ablnumber1,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1425 Ablnumber1<- gsub("N",N,Ablnumber1,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1426 Ablnumber1<- gsub("P",P,Ablnumber1,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1427 Ablnumber1<- gsub("Q",Q,Ablnumber1,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1428 Ablnumber1<- gsub("R",R,Ablnumber1,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1429 Ablnumber1<- gsub("S",S,Ablnumber1,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1430 Ablnumber1<- gsub("T",T,Ablnumber1,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1431 Ablnumber1<- gsub("V",V,Ablnumber1,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1432 Ablnumber1<- gsub("W",W,Ablnumber1,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1433 Ablnumber1<- gsub("Y",Y,Ablnumber1,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1434
da1012f014bd Uploaded
jfb
parents:
diff changeset
1435 Ablnumber2<- gsub("A",A,Ablnumber2,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1436 Ablnumber2<- gsub("C",C,Ablnumber2,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1437 Ablnumber2<- gsub("D",D,Ablnumber2,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1438 Ablnumber2<- gsub("E",E,Ablnumber2,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1439 Ablnumber2<- gsub("F",F,Ablnumber2,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1440 Ablnumber2<- gsub("G",G,Ablnumber2,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1441 Ablnumber2<- gsub("H",H,Ablnumber2,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1442 Ablnumber2<- gsub("I",I,Ablnumber2,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1443 Ablnumber2<- gsub("K",K,Ablnumber2,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1444 Ablnumber2<- gsub("L",L,Ablnumber2,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1445 Ablnumber2<- gsub("M",M,Ablnumber2,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1446 Ablnumber2<- gsub("N",N,Ablnumber2,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1447 Ablnumber2<- gsub("P",P,Ablnumber2,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1448 Ablnumber2<- gsub("Q",Q,Ablnumber2,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1449 Ablnumber2<- gsub("R",R,Ablnumber2,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1450 Ablnumber2<- gsub("S",S,Ablnumber2,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1451 Ablnumber2<- gsub("T",T,Ablnumber2,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1452 Ablnumber2<- gsub("V",V,Ablnumber2,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1453 Ablnumber2<- gsub("W",W,Ablnumber2,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1454 Ablnumber2<- gsub("Y",Y,Ablnumber2,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1455
da1012f014bd Uploaded
jfb
parents:
diff changeset
1456 Ablnumber3<- gsub("A",A,Ablnumber3,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1457 Ablnumber3<- gsub("C",C,Ablnumber3,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1458 Ablnumber3<- gsub("D",D,Ablnumber3,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1459 Ablnumber3<- gsub("E",E,Ablnumber3,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1460 Ablnumber3<- gsub("F",F,Ablnumber3,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1461 Ablnumber3<- gsub("G",G,Ablnumber3,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1462 Ablnumber3<- gsub("H",H,Ablnumber3,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1463 Ablnumber3<- gsub("I",I,Ablnumber3,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1464 Ablnumber3<- gsub("K",K,Ablnumber3,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1465 Ablnumber3<- gsub("L",L,Ablnumber3,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1466 Ablnumber3<- gsub("M",M,Ablnumber3,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1467 Ablnumber3<- gsub("N",N,Ablnumber3,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1468 Ablnumber3<- gsub("P",P,Ablnumber3,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1469 Ablnumber3<- gsub("Q",Q,Ablnumber3,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1470 Ablnumber3<- gsub("R",R,Ablnumber3,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1471 Ablnumber3<- gsub("S",S,Ablnumber3,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1472 Ablnumber3<- gsub("T",T,Ablnumber3,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1473 Ablnumber3<- gsub("V",V,Ablnumber3,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1474 Ablnumber3<- gsub("W",W,Ablnumber3,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1475 Ablnumber3<- gsub("Y",Y,Ablnumber3,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1476
da1012f014bd Uploaded
jfb
parents:
diff changeset
1477 Ablnumber4<- gsub("A",A,Ablnumber4,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1478 Ablnumber4<- gsub("C",C,Ablnumber4,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1479 Ablnumber4<- gsub("D",D,Ablnumber4,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1480 Ablnumber4<- gsub("E",E,Ablnumber4,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1481 Ablnumber4<- gsub("F",F,Ablnumber4,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1482 Ablnumber4<- gsub("G",G,Ablnumber4,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1483 Ablnumber4<- gsub("H",H,Ablnumber4,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1484 Ablnumber4<- gsub("I",I,Ablnumber4,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1485 Ablnumber4<- gsub("K",K,Ablnumber4,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1486 Ablnumber4<- gsub("L",L,Ablnumber4,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1487 Ablnumber4<- gsub("M",M,Ablnumber4,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1488 Ablnumber4<- gsub("N",N,Ablnumber4,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1489 Ablnumber4<- gsub("P",P,Ablnumber4,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1490 Ablnumber4<- gsub("Q",Q,Ablnumber4,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1491 Ablnumber4<- gsub("R",R,Ablnumber4,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1492 Ablnumber4<- gsub("S",S,Ablnumber4,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1493 Ablnumber4<- gsub("T",T,Ablnumber4,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1494 Ablnumber4<- gsub("V",V,Ablnumber4,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1495 Ablnumber4<- gsub("W",W,Ablnumber4,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1496 Ablnumber4<- gsub("Y",Y,Ablnumber4,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1497
da1012f014bd Uploaded
jfb
parents:
diff changeset
1498 Ablnumber5<- gsub("A",A,Ablnumber5,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1499 Ablnumber5<- gsub("C",C,Ablnumber5,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1500 Ablnumber5<- gsub("D",D,Ablnumber5,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1501 Ablnumber5<- gsub("E",E,Ablnumber5,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1502 Ablnumber5<- gsub("F",F,Ablnumber5,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1503 Ablnumber5<- gsub("G",G,Ablnumber5,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1504 Ablnumber5<- gsub("H",H,Ablnumber5,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1505 Ablnumber5<- gsub("I",I,Ablnumber5,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1506 Ablnumber5<- gsub("K",K,Ablnumber5,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1507 Ablnumber5<- gsub("L",L,Ablnumber5,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1508 Ablnumber5<- gsub("M",M,Ablnumber5,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1509 Ablnumber5<- gsub("N",N,Ablnumber5,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1510 Ablnumber5<- gsub("P",P,Ablnumber5,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1511 Ablnumber5<- gsub("Q",Q,Ablnumber5,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1512 Ablnumber5<- gsub("R",R,Ablnumber5,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1513 Ablnumber5<- gsub("S",S,Ablnumber5,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1514 Ablnumber5<- gsub("T",T,Ablnumber5,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1515 Ablnumber5<- gsub("V",V,Ablnumber5,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1516 Ablnumber5<- gsub("W",W,Ablnumber5,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1517 Ablnumber5<- gsub("Y",Y,Ablnumber5,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1518
da1012f014bd Uploaded
jfb
parents:
diff changeset
1519 Ablnumber6<- gsub("A",A,Ablnumber6,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1520 Ablnumber6<- gsub("C",C,Ablnumber6,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1521 Ablnumber6<- gsub("D",D,Ablnumber6,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1522 Ablnumber6<- gsub("E",E,Ablnumber6,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1523 Ablnumber6<- gsub("F",F,Ablnumber6,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1524 Ablnumber6<- gsub("G",G,Ablnumber6,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1525 Ablnumber6<- gsub("H",H,Ablnumber6,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1526 Ablnumber6<- gsub("I",I,Ablnumber6,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1527 Ablnumber6<- gsub("K",K,Ablnumber6,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1528 Ablnumber6<- gsub("L",L,Ablnumber6,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1529 Ablnumber6<- gsub("M",M,Ablnumber6,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1530 Ablnumber6<- gsub("N",N,Ablnumber6,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1531 Ablnumber6<- gsub("P",P,Ablnumber6,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1532 Ablnumber6<- gsub("Q",Q,Ablnumber6,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1533 Ablnumber6<- gsub("R",R,Ablnumber6,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1534 Ablnumber6<- gsub("S",S,Ablnumber6,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1535 Ablnumber6<- gsub("T",T,Ablnumber6,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1536 Ablnumber6<- gsub("V",V,Ablnumber6,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1537 Ablnumber6<- gsub("W",W,Ablnumber6,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1538 Ablnumber6<- gsub("Y",Y,Ablnumber6,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1539
da1012f014bd Uploaded
jfb
parents:
diff changeset
1540 Ablnumber7<- gsub("A",A,Ablnumber7,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1541 Ablnumber7<- gsub("C",C,Ablnumber7,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1542 Ablnumber7<- gsub("D",D,Ablnumber7,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1543 Ablnumber7<- gsub("E",E,Ablnumber7,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1544 Ablnumber7<- gsub("F",F,Ablnumber7,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1545 Ablnumber7<- gsub("G",G,Ablnumber7,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1546 Ablnumber7<- gsub("H",H,Ablnumber7,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1547 Ablnumber7<- gsub("I",I,Ablnumber7,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1548 Ablnumber7<- gsub("K",K,Ablnumber7,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1549 Ablnumber7<- gsub("L",L,Ablnumber7,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1550 Ablnumber7<- gsub("M",M,Ablnumber7,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1551 Ablnumber7<- gsub("N",N,Ablnumber7,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1552 Ablnumber7<- gsub("P",P,Ablnumber7,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1553 Ablnumber7<- gsub("Q",Q,Ablnumber7,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1554 Ablnumber7<- gsub("R",R,Ablnumber7,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1555 Ablnumber7<- gsub("S",S,Ablnumber7,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1556 Ablnumber7<- gsub("T",T,Ablnumber7,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1557 Ablnumber7<- gsub("V",V,Ablnumber7,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1558 Ablnumber7<- gsub("W",W,Ablnumber7,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1559 Ablnumber7<- gsub("Y",Y,Ablnumber7,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1560
da1012f014bd Uploaded
jfb
parents:
diff changeset
1561 Ablnumber8<- gsub("A",A,Ablnumber8,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1562 Ablnumber8<- gsub("C",C,Ablnumber8,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1563 Ablnumber8<- gsub("D",D,Ablnumber8,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1564 Ablnumber8<- gsub("E",E,Ablnumber8,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1565 Ablnumber8<- gsub("F",F,Ablnumber8,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1566 Ablnumber8<- gsub("G",G,Ablnumber8,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1567 Ablnumber8<- gsub("H",H,Ablnumber8,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1568 Ablnumber8<- gsub("I",I,Ablnumber8,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1569 Ablnumber8<- gsub("K",K,Ablnumber8,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1570 Ablnumber8<- gsub("L",L,Ablnumber8,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1571 Ablnumber8<- gsub("M",M,Ablnumber8,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1572 Ablnumber8<- gsub("N",N,Ablnumber8,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1573 Ablnumber8<- gsub("P",P,Ablnumber8,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1574 Ablnumber8<- gsub("Q",Q,Ablnumber8,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1575 Ablnumber8<- gsub("R",R,Ablnumber8,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1576 Ablnumber8<- gsub("S",S,Ablnumber8,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1577 Ablnumber8<- gsub("T",T,Ablnumber8,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1578 Ablnumber8<- gsub("V",V,Ablnumber8,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1579 Ablnumber8<- gsub("W",W,Ablnumber8,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1580 Ablnumber8<- gsub("Y",Y,Ablnumber8,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1581
da1012f014bd Uploaded
jfb
parents:
diff changeset
1582 Ablnumber9<- gsub("A",A,Ablnumber9,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1583 Ablnumber9<- gsub("C",C,Ablnumber9,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1584 Ablnumber9<- gsub("D",D,Ablnumber9,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1585 Ablnumber9<- gsub("E",E,Ablnumber9,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1586 Ablnumber9<- gsub("F",F,Ablnumber9,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1587 Ablnumber9<- gsub("G",G,Ablnumber9,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1588 Ablnumber9<- gsub("H",H,Ablnumber9,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1589 Ablnumber9<- gsub("I",I,Ablnumber9,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1590 Ablnumber9<- gsub("K",K,Ablnumber9,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1591 Ablnumber9<- gsub("L",L,Ablnumber9,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1592 Ablnumber9<- gsub("M",M,Ablnumber9,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1593 Ablnumber9<- gsub("N",N,Ablnumber9,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1594 Ablnumber9<- gsub("P",P,Ablnumber9,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1595 Ablnumber9<- gsub("Q",Q,Ablnumber9,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1596 Ablnumber9<- gsub("R",R,Ablnumber9,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1597 Ablnumber9<- gsub("S",S,Ablnumber9,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1598 Ablnumber9<- gsub("T",T,Ablnumber9,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1599 Ablnumber9<- gsub("V",V,Ablnumber9,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1600 Ablnumber9<- gsub("W",W,Ablnumber9,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1601 Ablnumber9<- gsub("Y",Y,Ablnumber9,perl = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1602 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
1603 ########################################
da1012f014bd Uploaded
jfb
parents:
diff changeset
1604
da1012f014bd Uploaded
jfb
parents:
diff changeset
1605
da1012f014bd Uploaded
jfb
parents:
diff changeset
1606 total=length(Positionp7)*length(Positionp6)*length(Positionp5)*length(Positionp4)*length(Positionp3)*(length(Positionp2))*length(Positionp1)*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1607 length(Positiond0)*length(Positionm1)*length(Positionm2)*length(Positionm3)*length(Positionm4)*length(Positionm5)*length(Positionm6)*length(Positionm7)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1608 #this is just a way to doublecheck that the length of the generated peptides vector is correct
da1012f014bd Uploaded
jfb
parents:
diff changeset
1609
da1012f014bd Uploaded
jfb
parents:
diff changeset
1610 GeneratedPeptides<-rep(NA, times=total*15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1611 GeneratedPeptides<-matrix(data = GeneratedPeptides,ncol = 15)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1612
da1012f014bd Uploaded
jfb
parents:
diff changeset
1613 NumeratedPeptides<-GeneratedPeptides
da1012f014bd Uploaded
jfb
parents:
diff changeset
1614 #create an empty vector of correct length by finding the number of each AAs per position and multiplying them
da1012f014bd Uploaded
jfb
parents:
diff changeset
1615 count<-0
da1012f014bd Uploaded
jfb
parents:
diff changeset
1616 for (t in 1:length(Positionm7)) {
da1012f014bd Uploaded
jfb
parents:
diff changeset
1617 for (s in 1:length(Positionm6)) {
da1012f014bd Uploaded
jfb
parents:
diff changeset
1618 for (r in 1:length(Positionm5)) {
da1012f014bd Uploaded
jfb
parents:
diff changeset
1619 for (i in 1:length(Positionm4)) {
da1012f014bd Uploaded
jfb
parents:
diff changeset
1620 for (j in 1:length(Positionm3)) {
da1012f014bd Uploaded
jfb
parents:
diff changeset
1621 for (k in 1:length(Positionm2)) {
da1012f014bd Uploaded
jfb
parents:
diff changeset
1622 for (l in 1:length(Positionm1)) {
da1012f014bd Uploaded
jfb
parents:
diff changeset
1623 for (m in 1:length(Positiond0)) {
da1012f014bd Uploaded
jfb
parents:
diff changeset
1624 for (n in 1:length(Positionp1)) {
da1012f014bd Uploaded
jfb
parents:
diff changeset
1625 for (o in 1:length(Positionp2)) {
da1012f014bd Uploaded
jfb
parents:
diff changeset
1626 for (p in 1:length(Positionp3)) {
da1012f014bd Uploaded
jfb
parents:
diff changeset
1627 for (q in 1:length(Positionp4)) {
da1012f014bd Uploaded
jfb
parents:
diff changeset
1628 for (u in 1:length(Positionp5)) {
da1012f014bd Uploaded
jfb
parents:
diff changeset
1629 for (v in 1:length(Positionp6)) {
da1012f014bd Uploaded
jfb
parents:
diff changeset
1630 for (w in 1:length(Positionp7)) {
da1012f014bd Uploaded
jfb
parents:
diff changeset
1631 # i=1
da1012f014bd Uploaded
jfb
parents:
diff changeset
1632 # j=1
da1012f014bd Uploaded
jfb
parents:
diff changeset
1633 # k=1
da1012f014bd Uploaded
jfb
parents:
diff changeset
1634 # l=1
da1012f014bd Uploaded
jfb
parents:
diff changeset
1635 # m=1
da1012f014bd Uploaded
jfb
parents:
diff changeset
1636 # n=1
da1012f014bd Uploaded
jfb
parents:
diff changeset
1637 # o=1
da1012f014bd Uploaded
jfb
parents:
diff changeset
1638 # p=1
da1012f014bd Uploaded
jfb
parents:
diff changeset
1639 # q=1
da1012f014bd Uploaded
jfb
parents:
diff changeset
1640 #
da1012f014bd Uploaded
jfb
parents:
diff changeset
1641 #for every single position, increment the count number, create a peptide using the AAs at that position
da1012f014bd Uploaded
jfb
parents:
diff changeset
1642 #then put them together into the generated peptides sequencex
da1012f014bd Uploaded
jfb
parents:
diff changeset
1643 count<-count+1
da1012f014bd Uploaded
jfb
parents:
diff changeset
1644 tabulation<-c(Positionm7[t],Positionm6[s],Positionm5[r],Positionm4[i],Positionm3[j],Positionm2[k],Positionm1[l],Positiond0[m],Positionp1[n],
da1012f014bd Uploaded
jfb
parents:
diff changeset
1645 Positionp2[o],Positionp3[p],Positionp4[q],Positionp5[u],Positionp6[v],Positionp7[w])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1646 numeration<-c(number15[t],number14[s],number13[r],number1[i],number2[j],number3[k],number4[l],number5[m],number6[n],number7[o],number8[p],number9[q],number10[u],number11[v],
da1012f014bd Uploaded
jfb
parents:
diff changeset
1647 number12[w])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1648 #tabulation<-paste(tabulation, sep="", collapse="")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1649 GeneratedPeptides[count,1:15]<-tabulation
da1012f014bd Uploaded
jfb
parents:
diff changeset
1650 NumeratedPeptides[count,1:15]<-numeration
da1012f014bd Uploaded
jfb
parents:
diff changeset
1651 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
1652 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
1653 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
1654 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
1655 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
1656 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
1657 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
1658 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
1659 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
1660 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
1661 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
1662 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
1663 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
1664 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
1665 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
1666 ####################################################################
da1012f014bd Uploaded
jfb
parents:
diff changeset
1667 #now here I use the Endogenous Probabilty matrix from the previous script, which is called EMPtable
da1012f014bd Uploaded
jfb
parents:
diff changeset
1668 #to score the created peptides
da1012f014bd Uploaded
jfb
parents:
diff changeset
1669 ThisKinTable<-EPMtableu#[1:nrow(SDtable),]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1670 TKTcolumn<-c(data=rep(1,times=21))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1671 TKTcolumn<-as.matrix(TKTcolumn,ncol=1)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1672 ThisKinTable<-cbind(TKTcolumn,ThisKinTable)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1673
da1012f014bd Uploaded
jfb
parents:
diff changeset
1674 ThisKinGeneratedScores<-rep(NA,times=nrow(GeneratedPeptides))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1675 ThisKinGenWeirdScore<-rep(NA,times=nrow(GeneratedPeptides))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1676
da1012f014bd Uploaded
jfb
parents:
diff changeset
1677 for (x in 1:nrow(GeneratedPeptides)){
da1012f014bd Uploaded
jfb
parents:
diff changeset
1678 Scoringpeptide<-NumeratedPeptides[x,1:15]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1679 Scoringpeptide<-Scoringpeptide+1
da1012f014bd Uploaded
jfb
parents:
diff changeset
1680 ThisKinTableScore<-as.numeric(ThisKinTable[Scoringpeptide[1],3])*ThisKinTable[as.numeric(Scoringpeptide[2]),4]*ThisKinTable[as.numeric(Scoringpeptide[3]),5]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1681 ThisKinTable[as.numeric(Scoringpeptide[4]),6]*ThisKinTable[as.numeric(Scoringpeptide[5]),7]*ThisKinTable[as.numeric(Scoringpeptide[6]),8]*ThisKinTable[as.numeric(Scoringpeptide[7]),9]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1682 #ThisKinTable[as.numeric(Scoringpeptide[8]),10]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1683 ThisKinTable[as.numeric(Scoringpeptide[9]),11]*ThisKinTable[as.numeric(Scoringpeptide[10]),12]*ThisKinTable[as.numeric(Scoringpeptide[11]),13]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1684 ThisKinTable[as.numeric(Scoringpeptide[12]),14]*ThisKinTable[as.numeric(Scoringpeptide[13]),15]*ThisKinTable[as.numeric(Scoringpeptide[14]),16]*ThisKinTable[as.numeric(Scoringpeptide[15]),17]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1685 ThisKinGeneratedScores[x]<-ThisKinTableScore
da1012f014bd Uploaded
jfb
parents:
diff changeset
1686 ThisKinTableScore<-(ThisKinTableScore/(ThisKinTableScore+1/as.numeric(NormalizationScore[2])))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1687 ThisKinGenWeirdScore[x]<-ThisKinTableScore
da1012f014bd Uploaded
jfb
parents:
diff changeset
1688 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
1689
da1012f014bd Uploaded
jfb
parents:
diff changeset
1690 AblGeneratedScores<-rep(NA,times=nrow(GeneratedPeptides))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1691 ArgGeneratedScores<-rep(NA,times=nrow(GeneratedPeptides))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1692 BtkGeneratedScores<-rep(NA,times=nrow(GeneratedPeptides))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1693 CskGeneratedScores<-rep(NA,times=nrow(GeneratedPeptides))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1694 FynGeneratedScores<-rep(NA,times=nrow(GeneratedPeptides))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1695 HckGeneratedScores<-rep(NA,times=nrow(GeneratedPeptides))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1696 JAK2GeneratedScores<-rep(NA,times=nrow(GeneratedPeptides))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1697 LckGeneratedScores<-rep(NA,times=nrow(GeneratedPeptides))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1698 LynGeneratedScores<-rep(NA,times=nrow(GeneratedPeptides))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1699 Pyk2GeneratedScores<-rep(NA,times=nrow(GeneratedPeptides))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1700 SrcGeneratedScores<-rep(NA,times=nrow(GeneratedPeptides))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1701 SykGeneratedScores<-rep(NA,times=nrow(GeneratedPeptides))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1702 YesGeneratedScores<-rep(NA,times=nrow(GeneratedPeptides))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1703
da1012f014bd Uploaded
jfb
parents:
diff changeset
1704
da1012f014bd Uploaded
jfb
parents:
diff changeset
1705 for (x in 1:nrow(GeneratedPeptides)){
da1012f014bd Uploaded
jfb
parents:
diff changeset
1706 Scoringpeptide<-NumeratedPeptides[x,1:15]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1707 AblScore<-Abl[Scoringpeptide[1],2]*Abl[Scoringpeptide[2],3]*Abl[Scoringpeptide[3],4]*Abl[Scoringpeptide[4],5]*Abl[Scoringpeptide[5],6]*Abl[Scoringpeptide[6],7]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1708 Abl[Scoringpeptide[7],8]*Abl[Scoringpeptide[9],10]*Abl[Scoringpeptide[10],11]*Abl[Scoringpeptide[11],12]*Abl[Scoringpeptide[12],13]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1709 Abl[Scoringpeptide[13],14]*Abl[Scoringpeptide[14],15]*Abl[Scoringpeptide[15],16]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1710 AblGeneratedScores[x]<-AblScore
da1012f014bd Uploaded
jfb
parents:
diff changeset
1711
da1012f014bd Uploaded
jfb
parents:
diff changeset
1712 ArgScore<-Arg[Scoringpeptide[1],2]*Arg[Scoringpeptide[2],3]*Arg[Scoringpeptide[3],4]*Arg[Scoringpeptide[4],5]*Arg[Scoringpeptide[5],6]*Arg[Scoringpeptide[6],7]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1713 Arg[Scoringpeptide[7],8]*Arg[Scoringpeptide[9],10]*Arg[Scoringpeptide[10],11]*Arg[Scoringpeptide[11],12]*Arg[Scoringpeptide[12],13]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1714 Arg[Scoringpeptide[13],14]*Arg[Scoringpeptide[14],15]*Arg[Scoringpeptide[15],16]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1715 ArgGeneratedScores[x]<-ArgScore
da1012f014bd Uploaded
jfb
parents:
diff changeset
1716
da1012f014bd Uploaded
jfb
parents:
diff changeset
1717 BtkScore<-Btk[Scoringpeptide[1],2]*Btk[Scoringpeptide[2],3]*Btk[Scoringpeptide[3],4]*Btk[Scoringpeptide[4],5]*Btk[Scoringpeptide[5],6]*Btk[Scoringpeptide[6],7]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1718 Btk[Scoringpeptide[7],8]*Btk[Scoringpeptide[9],10]*Btk[Scoringpeptide[10],11]*Btk[Scoringpeptide[11],12]*Btk[Scoringpeptide[12],13]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1719 Btk[Scoringpeptide[13],14]*Btk[Scoringpeptide[14],15]*Btk[Scoringpeptide[15],16]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1720 BtkGeneratedScores[x]<-BtkScore
da1012f014bd Uploaded
jfb
parents:
diff changeset
1721
da1012f014bd Uploaded
jfb
parents:
diff changeset
1722 CskScore<-Csk[Scoringpeptide[1],2]*Csk[Scoringpeptide[2],3]*Csk[Scoringpeptide[3],4]*Csk[Scoringpeptide[4],5]*Csk[Scoringpeptide[5],6]*Csk[Scoringpeptide[6],7]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1723 Csk[Scoringpeptide[7],8]*Csk[Scoringpeptide[9],10]*Csk[Scoringpeptide[10],11]*Csk[Scoringpeptide[11],12]*Csk[Scoringpeptide[12],13]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1724 Csk[Scoringpeptide[13],14]*Csk[Scoringpeptide[14],15]*Csk[Scoringpeptide[15],16]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1725 CskGeneratedScores[x]<-CskScore
da1012f014bd Uploaded
jfb
parents:
diff changeset
1726
da1012f014bd Uploaded
jfb
parents:
diff changeset
1727 FynScore<-Fyn[Scoringpeptide[1],2]*Fyn[Scoringpeptide[2],3]*Fyn[Scoringpeptide[3],4]*Fyn[Scoringpeptide[4],5]*Fyn[Scoringpeptide[5],6]*Fyn[Scoringpeptide[6],7]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1728 Fyn[Scoringpeptide[7],8]*Fyn[Scoringpeptide[9],10]*Fyn[Scoringpeptide[10],11]*Fyn[Scoringpeptide[11],12]*Fyn[Scoringpeptide[12],13]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1729 Fyn[Scoringpeptide[13],14]*Fyn[Scoringpeptide[14],15]*Fyn[Scoringpeptide[15],16]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1730 FynGeneratedScores[x]<-FynScore
da1012f014bd Uploaded
jfb
parents:
diff changeset
1731
da1012f014bd Uploaded
jfb
parents:
diff changeset
1732 HckScore<-Hck[Scoringpeptide[1],2]*Hck[Scoringpeptide[2],3]*Hck[Scoringpeptide[3],4]*Hck[Scoringpeptide[4],5]*Hck[Scoringpeptide[5],6]*Hck[Scoringpeptide[6],7]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1733 Hck[Scoringpeptide[7],8]*Hck[Scoringpeptide[9],10]*Hck[Scoringpeptide[10],11]*Hck[Scoringpeptide[11],12]*Hck[Scoringpeptide[12],13]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1734 Hck[Scoringpeptide[13],14]*Hck[Scoringpeptide[14],15]*Hck[Scoringpeptide[15],16]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1735 HckGeneratedScores[x]<-HckScore
da1012f014bd Uploaded
jfb
parents:
diff changeset
1736
da1012f014bd Uploaded
jfb
parents:
diff changeset
1737 JAK2Score<-JAK2[Scoringpeptide[1],2]*JAK2[Scoringpeptide[2],3]*JAK2[Scoringpeptide[3],4]*JAK2[Scoringpeptide[4],5]*JAK2[Scoringpeptide[5],6]*JAK2[Scoringpeptide[6],7]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1738 JAK2[Scoringpeptide[7],8]*JAK2[Scoringpeptide[9],10]*JAK2[Scoringpeptide[10],11]*JAK2[Scoringpeptide[11],12]*JAK2[Scoringpeptide[12],13]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1739 JAK2[Scoringpeptide[13],14]*JAK2[Scoringpeptide[14],15]*JAK2[Scoringpeptide[15],16]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1740 JAK2GeneratedScores[x]<-JAK2Score
da1012f014bd Uploaded
jfb
parents:
diff changeset
1741
da1012f014bd Uploaded
jfb
parents:
diff changeset
1742 LckScore<-Lck[Scoringpeptide[1],2]*Lck[Scoringpeptide[2],3]*Lck[Scoringpeptide[3],4]*Lck[Scoringpeptide[4],5]*Lck[Scoringpeptide[5],6]*Lck[Scoringpeptide[6],7]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1743 Lck[Scoringpeptide[7],8]*Lck[Scoringpeptide[9],10]*Lck[Scoringpeptide[10],11]*Lck[Scoringpeptide[11],12]*Lck[Scoringpeptide[12],13]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1744 Lck[Scoringpeptide[13],14]*Lck[Scoringpeptide[14],15]*Lck[Scoringpeptide[15],16]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1745 LckGeneratedScores[x]<-LckScore
da1012f014bd Uploaded
jfb
parents:
diff changeset
1746
da1012f014bd Uploaded
jfb
parents:
diff changeset
1747 LynScore<-Lyn[Scoringpeptide[1],2]*Lyn[Scoringpeptide[2],3]*Lyn[Scoringpeptide[3],4]*Lyn[Scoringpeptide[4],5]*Lyn[Scoringpeptide[5],6]*Lyn[Scoringpeptide[6],7]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1748 Lyn[Scoringpeptide[7],8]*Lyn[Scoringpeptide[9],10]*Lyn[Scoringpeptide[10],11]*Lyn[Scoringpeptide[11],12]*Lyn[Scoringpeptide[12],13]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1749 Lyn[Scoringpeptide[13],14]*Lyn[Scoringpeptide[14],15]*Lyn[Scoringpeptide[15],16]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1750 LynGeneratedScores[x]<-LynScore
da1012f014bd Uploaded
jfb
parents:
diff changeset
1751
da1012f014bd Uploaded
jfb
parents:
diff changeset
1752 Pyk2Score<-Pyk2[Scoringpeptide[1],2]*Pyk2[Scoringpeptide[2],3]*Pyk2[Scoringpeptide[3],4]*Pyk2[Scoringpeptide[4],5]*Pyk2[Scoringpeptide[5],6]*Pyk2[Scoringpeptide[6],7]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1753 Pyk2[Scoringpeptide[7],8]*Pyk2[Scoringpeptide[9],10]*Pyk2[Scoringpeptide[10],11]*Pyk2[Scoringpeptide[11],12]*Pyk2[Scoringpeptide[12],13]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1754 Pyk2[Scoringpeptide[13],14]*Pyk2[Scoringpeptide[14],15]*Pyk2[Scoringpeptide[15],16]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1755 Pyk2GeneratedScores[x]<-Pyk2Score
da1012f014bd Uploaded
jfb
parents:
diff changeset
1756
da1012f014bd Uploaded
jfb
parents:
diff changeset
1757 SrcScore<-Src[Scoringpeptide[1],2]*Src[Scoringpeptide[2],3]*Src[Scoringpeptide[3],4]*Src[Scoringpeptide[4],5]*Src[Scoringpeptide[5],6]*Src[Scoringpeptide[6],7]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1758 Src[Scoringpeptide[7],8]*Src[Scoringpeptide[9],10]*Src[Scoringpeptide[10],11]*Src[Scoringpeptide[11],12]*Src[Scoringpeptide[12],13]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1759 Src[Scoringpeptide[13],14]*Src[Scoringpeptide[14],15]*Src[Scoringpeptide[15],16]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1760 SrcGeneratedScores[x]<-SrcScore
da1012f014bd Uploaded
jfb
parents:
diff changeset
1761
da1012f014bd Uploaded
jfb
parents:
diff changeset
1762 SykScore<-Syk[Scoringpeptide[1],2]*Syk[Scoringpeptide[2],3]*Syk[Scoringpeptide[3],4]*Syk[Scoringpeptide[4],5]*Syk[Scoringpeptide[5],6]*Syk[Scoringpeptide[6],7]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1763 Syk[Scoringpeptide[7],8]*Syk[Scoringpeptide[9],10]*Syk[Scoringpeptide[10],11]*Syk[Scoringpeptide[11],12]*Syk[Scoringpeptide[12],13]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1764 Syk[Scoringpeptide[13],14]*Syk[Scoringpeptide[14],15]*Syk[Scoringpeptide[15],16]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1765 SykGeneratedScores[x]<-SykScore
da1012f014bd Uploaded
jfb
parents:
diff changeset
1766
da1012f014bd Uploaded
jfb
parents:
diff changeset
1767 YesScore<-Yes[Scoringpeptide[1],2]*Yes[Scoringpeptide[2],3]*Yes[Scoringpeptide[3],4]*Yes[Scoringpeptide[4],5]*Yes[Scoringpeptide[5],6]*Yes[Scoringpeptide[6],7]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1768 Yes[Scoringpeptide[7],8]*Yes[Scoringpeptide[9],10]*Yes[Scoringpeptide[10],11]*Yes[Scoringpeptide[11],12]*Yes[Scoringpeptide[12],13]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1769 Yes[Scoringpeptide[13],14]*Yes[Scoringpeptide[14],15]*Yes[Scoringpeptide[15],16]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1770 YesGeneratedScores[x]<-YesScore
da1012f014bd Uploaded
jfb
parents:
diff changeset
1771
da1012f014bd Uploaded
jfb
parents:
diff changeset
1772 # ThisKinTableScore<-ThisKinTable[as.numeric(Scoringpeptide[1]),3]*ThisKinTable[as.numeric(Scoringpeptide[2]),4]*ThisKinTable[as.numeric(Scoringpeptide[3]),5]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1773 # ThisKinTable[as.numeric(Scoringpeptide[4]),6]*ThisKinTable[as.numeric(Scoringpeptide[6]),8]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1774 # ThisKinTable[as.numeric(Scoringpeptide[7]),9]*ThisKinTable[as.numeric(Scoringpeptide[8]),10]*ThisKinTable[as.numeric(Scoringpeptide[9]),11]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1775 # ThisKinGeneratedScores[x]<-ThisKinTableScore
da1012f014bd Uploaded
jfb
parents:
diff changeset
1776 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
1777
da1012f014bd Uploaded
jfb
parents:
diff changeset
1778
da1012f014bd Uploaded
jfb
parents:
diff changeset
1779
da1012f014bd Uploaded
jfb
parents:
diff changeset
1780 AblNorm<-1/as.numeric(Abl[22,1])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1781 AblThresh<-as.numeric(Abl[24,1])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1782 AblTrueThresh<-((AblThresh*AblNorm)/(100-AblThresh))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1783 AblActive<-unlist(AblGeneratedScores)>AblTrueThresh
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1784 if (TodaysKinase=="ABL"){AblActive<-rep(0,times=nrow(GeneratedPeptides))}
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1785
da1012f014bd Uploaded
jfb
parents:
diff changeset
1786 ArgNorm<-1/as.numeric(Arg[22,1])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1787 ArgThresh<-as.numeric(Arg[24,1])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1788 ArgTrueThresh<-((ArgThresh*ArgNorm)/(100-ArgThresh))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1789 ArgActive<-unlist(ArgGeneratedScores)>ArgTrueThresh
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1790 if (TodaysKinase=="ARG"){ArgActive<-rep(0,times=nrow(GeneratedPeptides))}
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1791
da1012f014bd Uploaded
jfb
parents:
diff changeset
1792 BtkNorm<-1/as.numeric(Btk[22,1])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1793 BtkThresh<-as.numeric(Btk[24,1])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1794 BtkTrueThresh<-((BtkThresh*BtkNorm)/(100-BtkThresh))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1795 BtkActive<-unlist(BtkGeneratedScores)>BtkTrueThresh
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1796 if (TodaysKinase=="BTK"){BtkActive<-rep(0,times=nrow(GeneratedPeptides))}
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1797
da1012f014bd Uploaded
jfb
parents:
diff changeset
1798 CskNorm<-1/as.numeric(Csk[22,1])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1799 CskThresh<-as.numeric(Csk[24,1])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1800 CskTrueThresh<-((CskThresh*CskNorm)/(100-CskThresh))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1801 CskActive<-(CskGeneratedScores)>CskTrueThresh
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1802 if (TodaysKinase=="CSK"){CskActive<-rep(0,times=nrow(GeneratedPeptides))}
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1803
da1012f014bd Uploaded
jfb
parents:
diff changeset
1804 FynNorm<-1/as.numeric(Fyn[22,1])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1805 FynThresh<-as.numeric(Fyn[24,1])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1806 FynTrueThresh<-((FynThresh*FynNorm)/(100-FynThresh))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1807 FynActive<-unlist(FynGeneratedScores)>FynTrueThresh
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1808 if (TodaysKinase=="FYN"){FynActive<-rep(0,times=nrow(GeneratedPeptides))}
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1809
da1012f014bd Uploaded
jfb
parents:
diff changeset
1810 HckNorm<-1/as.numeric(Hck[22,1])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1811 HckThresh<-as.numeric(Hck[24,1])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1812 HckTrueThresh<-((HckThresh*HckNorm)/(100-HckThresh))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1813 HckActive<-unlist(HckGeneratedScores)>HckTrueThresh
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1814 if (TodaysKinase=="HCK"){HckActive<-rep(0,times=nrow(GeneratedPeptides))}
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1815
da1012f014bd Uploaded
jfb
parents:
diff changeset
1816 JAK2Norm<-1/as.numeric(JAK2[22,1])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1817 JAK2Thresh<-as.numeric(JAK2[24,1])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1818 JAK2TrueThresh<-((JAK2Thresh*JAK2Norm)/(100-JAK2Thresh))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1819 JAk2Active<-unlist(JAK2GeneratedScores)>JAK2TrueThresh
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1820 if (TodaysKinase=="JAK2"){JAk2Active<-rep(0,times=nrow(GeneratedPeptides))}
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1821
da1012f014bd Uploaded
jfb
parents:
diff changeset
1822 LckNorm<-1/as.numeric(Lck[22,1])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1823 LckThresh<-as.numeric(Lck[24,1])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1824 LckTrueThresh<-((LckThresh*LckNorm)/(100-LckThresh))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1825 LckActive<-unlist(LckGeneratedScores)>LckTrueThresh
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1826 if (TodaysKinase=="LCK"){LckActive<-rep(0,times=nrow(GeneratedPeptides))}
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1827
da1012f014bd Uploaded
jfb
parents:
diff changeset
1828 LynNorm<-1/as.numeric(Lyn[22,1])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1829 LynThresh<-as.numeric(Lyn[24,1])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1830 LynTrueThresh<-((LynThresh*LynNorm)/(100-LynThresh))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1831 LynActive<-unlist(LynGeneratedScores)>LynTrueThresh
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1832 if (TodaysKinase=="LYN"){LynActive<-rep(0,times=nrow(GeneratedPeptides))}
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1833
da1012f014bd Uploaded
jfb
parents:
diff changeset
1834 Pyk2Norm<-1/as.numeric(Pyk2[22,1])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1835 Pyk2Thresh<-as.numeric(Pyk2[24,1])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1836 Pyk2TrueThresh<-((Pyk2Thresh*Pyk2Norm)/(100-Pyk2Thresh))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1837 Pyk2Active<-unlist(Pyk2GeneratedScores)>Pyk2TrueThresh
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1838 if (TodaysKinase=="PYK2"){Pyk2Active<-rep(0,times=nrow(GeneratedPeptides))}
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1839
da1012f014bd Uploaded
jfb
parents:
diff changeset
1840 SrcNorm<-1/as.numeric(Src[22,1])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1841 SrcThresh<-as.numeric(Src[24,1])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1842 SrcTrueThresh<-((SrcThresh*SrcNorm)/(100-SrcThresh))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1843 SrcActive<-unlist(SrcGeneratedScores)>SrcTrueThresh
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1844 if (TodaysKinase=="SRC"){SrcActive<-rep(0,times=nrow(GeneratedPeptides))}
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1845
da1012f014bd Uploaded
jfb
parents:
diff changeset
1846 SykNorm<-1/as.numeric(Syk[22,1])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1847 SykThresh<-as.numeric(Syk[24,1])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1848 SykTrueThresh<-((SykThresh*SykNorm)/(100-SykThresh))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1849 SykActive<-unlist(SykGeneratedScores)>SykTrueThresh
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1850 if (TodaysKinase=="SYK"){SykActive<-rep(0,times=nrow(GeneratedPeptides))}
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1851
da1012f014bd Uploaded
jfb
parents:
diff changeset
1852 YesNorm<-1/as.numeric(Yes[22,1])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1853 YesThresh<-as.numeric(Yes[24,1])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1854 YesTrueThresh<-((YesThresh*YesNorm)/(100-YesThresh))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1855 YesActive<-unlist(YesGeneratedScores)>YesTrueThresh
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1856 if (TodaysKinase=="YES"){YesActive<-rep(0,times=nrow(GeneratedPeptides))}
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1857
da1012f014bd Uploaded
jfb
parents:
diff changeset
1858 AllActive<-AblActive+ArgActive+BtkActive+CskActive+FynActive+HckActive+JAk2Active+LckActive+LynActive+Pyk2Active+SrcActive+SykActive+YesActive
da1012f014bd Uploaded
jfb
parents:
diff changeset
1859 #Btkactive+
da1012f014bd Uploaded
jfb
parents:
diff changeset
1860
da1012f014bd Uploaded
jfb
parents:
diff changeset
1861 Scores<-ThisKinGeneratedScores
da1012f014bd Uploaded
jfb
parents:
diff changeset
1862 ThresholdValues<-ThisKinGenWeirdScore
da1012f014bd Uploaded
jfb
parents:
diff changeset
1863
da1012f014bd Uploaded
jfb
parents:
diff changeset
1864 FullMotifs<-rep("Z",times=nrow(GeneratedPeptides))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1865 for (i in 1:nrow(GeneratedPeptides)) {
da1012f014bd Uploaded
jfb
parents:
diff changeset
1866 motif<-GeneratedPeptides[i,1:15]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1867 motif<-paste(motif,sep = "", collapse = "")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1868 FullMotifs[i]<-motif
da1012f014bd Uploaded
jfb
parents:
diff changeset
1869 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
1870
da1012f014bd Uploaded
jfb
parents:
diff changeset
1871 PeptidesWithRanks<-cbind.data.frame(FullMotifs,GeneratedPeptides,Scores,ThresholdValues)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1872 PeptidesWithRanks<-cbind.data.frame(PeptidesWithRanks,AllActive,AblActive,ArgActive,BtkActive,CskActive,FynActive,HckActive,JAk2Active,LckActive,LynActive,Pyk2Active,SrcActive,SykActive,YesActive)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1873 RanksPeptides<-PeptidesWithRanks[order(PeptidesWithRanks$AllActive,decreasing = FALSE),]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1874 # PepRankHead<-c(1:9,"Sequence","RPMS","PMS")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1875 # RanksPeptides<-rbind.data.frame(PepRankHead,PeptidesWithRanks)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1876 #head(RanksPeptides)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1877
da1012f014bd Uploaded
jfb
parents:
diff changeset
1878
da1012f014bd Uploaded
jfb
parents:
diff changeset
1879 #now I have to score the negative sequences... for some reason
da1012f014bd Uploaded
jfb
parents:
diff changeset
1880 #write up how we transfect with lipofectamine
da1012f014bd Uploaded
jfb
parents:
diff changeset
1881 #3,4,5 questions
da1012f014bd Uploaded
jfb
parents:
diff changeset
1882
da1012f014bd Uploaded
jfb
parents:
diff changeset
1883 #PAUSED EHRE AT 4:50, HOPING THAT FIXING MINERVOTHING SO THAT LEFT SPACES WORKS FIXES A THING. OTHERWISE
da1012f014bd Uploaded
jfb
parents:
diff changeset
1884 #I FUCKED WITH THE MCC TABLE AND NEED TO FINISH IT
da1012f014bd Uploaded
jfb
parents:
diff changeset
1885
da1012f014bd Uploaded
jfb
parents:
diff changeset
1886 ThisKinBlanks<-rep(1,times=17)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1887 #indx <- sapply(breast, is.factor)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1888 #ThisKinTable[indx] <- lapply(ThisKinTable[indx], function(x) as.character(x))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1889 ThisKinTable$SetOfAAs<-as.character(ThisKinTable$SetOfAAs)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1890
da1012f014bd Uploaded
jfb
parents:
diff changeset
1891 #ThisKinTest<-rbind.data.frame(ThisKinTable,ThisKinBlanks)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1892 ThisKinTable<-rbind.data.frame(ThisKinTable,ThisKinBlanks)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1893
da1012f014bd Uploaded
jfb
parents:
diff changeset
1894 NegativeScores<-rep(NA,times=nrow(NegativeSubstrateList))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1895 NegativeWeirdScores<-rep(NA,times=nrow(NegativeSubstrateList))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1896 for (v in 1:nrow(NegativeSubstrateList)) {
da1012f014bd Uploaded
jfb
parents:
diff changeset
1897 motif<-NegativeSubstrateList[v,2]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1898 motif<-unlist(strsplit(motif,""))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1899 #if (length(motif)<9){print(v)}}
da1012f014bd Uploaded
jfb
parents:
diff changeset
1900 # motif[1] <- sapply(motif[1], function (x) aa_props[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1901 # motif[2] <- sapply(motif[2], function (x) aa_props[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1902 # motif[3] <- sapply(motif[3], function (x) aa_props[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1903 # motif[4] <- sapply(motif[4], function (x) aa_props[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1904 # motif[5] <- sapply(motif[5], function (x) aa_props[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1905 # motif[6] <- sapply(motif[6], function (x) aa_props[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1906 # motif[7] <- sapply(motif[7], function (x) aa_props[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1907 # motif[8] <- sapply(motif[8], function (x) aa_props[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1908 # motif[9] <- sapply(motif[9], function (x) aa_props[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1909 motif<- gsub(" ","O",motif)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1910 motif <- sapply(motif, function (x) aa_props[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1911 Scoringpeptide<-motif
da1012f014bd Uploaded
jfb
parents:
diff changeset
1912 Scoringpeptide<-Scoringpeptide+1
da1012f014bd Uploaded
jfb
parents:
diff changeset
1913 ThisKinTableScore<-as.numeric(ThisKinTable[Scoringpeptide[1],3])*ThisKinTable[as.numeric(Scoringpeptide[2]),4]*ThisKinTable[as.numeric(Scoringpeptide[3]),5]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1914 ThisKinTable[as.numeric(Scoringpeptide[4]),6]*ThisKinTable[as.numeric(Scoringpeptide[5]),7]*ThisKinTable[as.numeric(Scoringpeptide[6]),8]*ThisKinTable[as.numeric(Scoringpeptide[7]),9]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1915 #ThisKinTable[as.numeric(Scoringpeptide[8]),10]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1916 ThisKinTable[as.numeric(Scoringpeptide[9]),11]*ThisKinTable[as.numeric(Scoringpeptide[10]),12]*ThisKinTable[as.numeric(Scoringpeptide[11]),13]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1917 ThisKinTable[as.numeric(Scoringpeptide[12]),14]*ThisKinTable[as.numeric(Scoringpeptide[13]),15]*ThisKinTable[as.numeric(Scoringpeptide[14]),16]*ThisKinTable[as.numeric(Scoringpeptide[15]),17]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1918 NegativeScores[v]<-ThisKinTableScore
da1012f014bd Uploaded
jfb
parents:
diff changeset
1919 ThisKinTableScore<-(ThisKinTableScore/(ThisKinTableScore+1/as.numeric(NormalizationScore[2])))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1920 NegativeWeirdScores[v]<-ThisKinTableScore*100
da1012f014bd Uploaded
jfb
parents:
diff changeset
1921 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
1922
da1012f014bd Uploaded
jfb
parents:
diff changeset
1923 negativesubstrates<-NegativeSubstrateList[,2]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1924 NegativeWithScores<-cbind(negativesubstrates,as.character(NegativeScores),as.character(NegativeWeirdScores))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1925
da1012f014bd Uploaded
jfb
parents:
diff changeset
1926
da1012f014bd Uploaded
jfb
parents:
diff changeset
1927 #NEED TO HAVE THE NEGATIVE SUBSTRATES BE OUTPUTTED
da1012f014bd Uploaded
jfb
parents:
diff changeset
1928
da1012f014bd Uploaded
jfb
parents:
diff changeset
1929 PositiveScores<-rep(NA,times=nrow(ImportedSubstrateList))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1930 PositiveWeirdScores<-rep(NA,times=nrow(ImportedSubstrateList))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1931
da1012f014bd Uploaded
jfb
parents:
diff changeset
1932 for (v in 1:nrow(ImportedSubstrateList)) {
da1012f014bd Uploaded
jfb
parents:
diff changeset
1933 motif<-ImportedSubstrateList[v,4:18]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1934 motif<-unlist(motif)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1935 motif<- gsub("^$","O",motif)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1936 motif <- sapply(motif, function (x) aa_props[x])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1937 Scoringpeptide<-motif
da1012f014bd Uploaded
jfb
parents:
diff changeset
1938 Scoringpeptide<-Scoringpeptide+1
da1012f014bd Uploaded
jfb
parents:
diff changeset
1939 ThisKinTableScore<-as.numeric(ThisKinTable[Scoringpeptide[1],3])*ThisKinTable[as.numeric(Scoringpeptide[2]),4]*ThisKinTable[as.numeric(Scoringpeptide[3]),5]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1940 ThisKinTable[as.numeric(Scoringpeptide[4]),6]*ThisKinTable[as.numeric(Scoringpeptide[5]),7]*ThisKinTable[as.numeric(Scoringpeptide[6]),8]*ThisKinTable[as.numeric(Scoringpeptide[7]),9]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1941 #ThisKinTable[as.numeric(Scoringpeptide[8]),10]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1942 ThisKinTable[as.numeric(Scoringpeptide[9]),11]*ThisKinTable[as.numeric(Scoringpeptide[10]),12]*ThisKinTable[as.numeric(Scoringpeptide[11]),13]*
da1012f014bd Uploaded
jfb
parents:
diff changeset
1943 ThisKinTable[as.numeric(Scoringpeptide[12]),14]*ThisKinTable[as.numeric(Scoringpeptide[13]),15]*ThisKinTable[as.numeric(Scoringpeptide[14]),16]*ThisKinTable[as.numeric(Scoringpeptide[15]),17]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1944
da1012f014bd Uploaded
jfb
parents:
diff changeset
1945 PositiveScores[v]<-ThisKinTableScore
da1012f014bd Uploaded
jfb
parents:
diff changeset
1946 ThisKinTableScore<-(ThisKinTableScore/(ThisKinTableScore+1/as.numeric(NormalizationScore[2])))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1947 PositiveWeirdScores[v]<-ThisKinTableScore*100
da1012f014bd Uploaded
jfb
parents:
diff changeset
1948 }
da1012f014bd Uploaded
jfb
parents:
diff changeset
1949
da1012f014bd Uploaded
jfb
parents:
diff changeset
1950 positivesubstrates<-ImportedSubstrateList[,4:18]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1951 positivewithscores<-cbind.data.frame(positivesubstrates,PositiveScores,PositiveWeirdScores)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1952
da1012f014bd Uploaded
jfb
parents:
diff changeset
1953
da1012f014bd Uploaded
jfb
parents:
diff changeset
1954 #write down the transient transfection SOP and what we will be doing with them
da1012f014bd Uploaded
jfb
parents:
diff changeset
1955 #write down the vector names I will be using
da1012f014bd Uploaded
jfb
parents:
diff changeset
1956 #write down something about transforming bacteria and with what
da1012f014bd Uploaded
jfb
parents:
diff changeset
1957
da1012f014bd Uploaded
jfb
parents:
diff changeset
1958 #90% whatevernness
da1012f014bd Uploaded
jfb
parents:
diff changeset
1959 # TPninetyone<-length(PositiveWeirdScores[PositiveWeirdScores>=0.91])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1960 # Senseninetyone<-TPninetyone/nrow(positivesubstrates)
da1012f014bd Uploaded
jfb
parents:
diff changeset
1961 #
da1012f014bd Uploaded
jfb
parents:
diff changeset
1962 # TNninetyone<-length(NegativeWeirdScores[NegativeWeirdScores<91])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1963 # Specninetyone<-TNninetyone/100
da1012f014bd Uploaded
jfb
parents:
diff changeset
1964
da1012f014bd Uploaded
jfb
parents:
diff changeset
1965 #create the MCC table
da1012f014bd Uploaded
jfb
parents:
diff changeset
1966
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1967 threshold<-c(1:100,(1:9)/10,(1:9)/100,0,-.1)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1968 threshold<-threshold[order(threshold,decreasing = TRUE)]
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1969 threshold
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1970
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1971 Truepositives<-c(1:120)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1972 Falsenegatives<-c(1:120)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1973 Sensitivity<-c(1:120)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1974 TrueNegatives<-c(1:120)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1975 FalsePositives<-c(1:120)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1976 Specificity<-c(1:120)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1977 Accuracy<-c(1:120)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1978 MCC<-c(1:120)
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1979 EER<-c(1:120)
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1980
da1012f014bd Uploaded
jfb
parents:
diff changeset
1981 #MAKE DAMN SURE THAT THE ACCESSION NUMBERS FOLLOW THE MOTIFS
da1012f014bd Uploaded
jfb
parents:
diff changeset
1982
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1983 for (z in 1:120) {
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1984 thres<-threshold[z]
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1985 Truepositives[z]<-length(PositiveWeirdScores[PositiveWeirdScores>=(thres)])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1986 Falsenegatives[z]<-nrow(positivesubstrates)-Truepositives[z]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1987 Sensitivity[z]<-Truepositives[z]/(Falsenegatives[z]+Truepositives[z])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1988 TrueNegatives[z]<-length(NegativeWeirdScores[NegativeWeirdScores<(thres)])
da1012f014bd Uploaded
jfb
parents:
diff changeset
1989 # at thresh 100 this should be 0, because it is total minus true negatives
da1012f014bd Uploaded
jfb
parents:
diff changeset
1990 FalsePositives[z]<-nrow(NegativeSubstrateList)-TrueNegatives[z]
da1012f014bd Uploaded
jfb
parents:
diff changeset
1991 Specificity[z]<-1-(TrueNegatives[z]/(FalsePositives[z]+TrueNegatives[z]))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1992 Accuracy[z]<-100*(Truepositives[z]+TrueNegatives[z])/(Falsenegatives[z]+FalsePositives[z]+TrueNegatives[z]+Truepositives[z])
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1993 MCC[z]<-((Truepositives[z]*TrueNegatives[z])-(Falsenegatives[z]*FalsePositives[z]))/sqrt(round(round(Truepositives[z]+Falsenegatives[z])*round(TrueNegatives[z]+FalsePositives[z])*round(Truepositives[z]+FalsePositives[z])*round(TrueNegatives[z]+Falsenegatives[z])))
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1994 EER[z]<-.01*(((1-(Sensitivity[z]))*(Truepositives[z]+Falsenegatives[z]))+(Specificity[z]*(1-(Truepositives[z]+Falsenegatives[z]))))
da1012f014bd Uploaded
jfb
parents:
diff changeset
1995 }
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
1996 Characterization<-cbind.data.frame(threshold,Truepositives,Falsenegatives,Sensitivity,TrueNegatives,FalsePositives,Specificity,MCC,EER)
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
1997
da1012f014bd Uploaded
jfb
parents:
diff changeset
1998 positiveheader<-c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,"RPMS","PMS")
da1012f014bd Uploaded
jfb
parents:
diff changeset
1999 positivewithscores<-rbind.data.frame(positiveheader,positivewithscores)
da1012f014bd Uploaded
jfb
parents:
diff changeset
2000
da1012f014bd Uploaded
jfb
parents:
diff changeset
2001 negativeheader<-c("Substrate","RPMS","PMS")
da1012f014bd Uploaded
jfb
parents:
diff changeset
2002 colnames(NegativeWithScores)<-negativeheader
da1012f014bd Uploaded
jfb
parents:
diff changeset
2003
da1012f014bd Uploaded
jfb
parents:
diff changeset
2004 # write.xlsx(NegativeWithScores,file = FILENAME, sheetName = "Negative Sequences Scored",col.names = TRUE,row.names = FALSE,append = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
2005 # write.xlsx(Characterization,file = FILENAME,sheetName = "Characterization Table",col.names = TRUE,row.names = FALSE,append = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
2006 # write.xlsx(RanksPeptides,file = FILENAME,sheetName = "Ranked Generated Peptides",col.names = FALSE,row.names = FALSE,append = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
2007 # write.xlsx(positivewithscores,file = FILENAME, sheetName = "Positive Sequences Scored",col.names = FALSE,row.names = FALSE,append = TRUE)
da1012f014bd Uploaded
jfb
parents:
diff changeset
2008 write.table(x=c("Characterzation Table"),file = FILENAME2, col.names = FALSE,row.names = FALSE, append = TRUE,sep = ",")
da1012f014bd Uploaded
jfb
parents:
diff changeset
2009 header<-colnames(Characterization)
da1012f014bd Uploaded
jfb
parents:
diff changeset
2010 Characterization<-rbind.data.frame(header,Characterization)
da1012f014bd Uploaded
jfb
parents:
diff changeset
2011 write.table(Characterization,file = FILENAME2, col.names = FALSE,row.names = FALSE, append = TRUE,sep = ",")
da1012f014bd Uploaded
jfb
parents:
diff changeset
2012
da1012f014bd Uploaded
jfb
parents:
diff changeset
2013 # header<-colnames(RanksPeptides)
da1012f014bd Uploaded
jfb
parents:
diff changeset
2014 # RanksPeptides<-rbind.data.frame(header,RanksPeptides)
17
26ef4add9f7b Uploaded
jfb
parents: 16
diff changeset
2015 write.table(x="Off Target Kinase activity (your kinase of interest should have zeros here because it is ON-target)",file = FILENAME3,append = FALSE,row.names = FALSE,col.names = TRUE,sep = ",")
14
da1012f014bd Uploaded
jfb
parents:
diff changeset
2016 write.table(RanksPeptides,file = FILENAME3,append = FALSE,row.names = FALSE,col.names = TRUE,sep = ",")
20
f7a6a3ec7710 Uploaded
jfb
parents: 19
diff changeset
2017
f7a6a3ec7710 Uploaded
jfb
parents: 19
diff changeset
2018 PositivesWithScores<-as.data.frame(ImportedSubstrateList)
f7a6a3ec7710 Uploaded
jfb
parents: 19
diff changeset
2019 PositiveOutput<-cbind(PositivesWithScores,PositiveWeirdScores)
f7a6a3ec7710 Uploaded
jfb
parents: 19
diff changeset
2020 write.table(PositiveOutput,file = FILENAME4, sep = ",", na="",row.names = FALSE, append = FALSE)
f7a6a3ec7710 Uploaded
jfb
parents: 19
diff changeset
2021
f7a6a3ec7710 Uploaded
jfb
parents: 19
diff changeset
2022 NegativeOutput<-as.data.frame(NegativeSubstrateList)
f7a6a3ec7710 Uploaded
jfb
parents: 19
diff changeset
2023 NegativeOutput<-cbind(NegativeOutput,NegativeWeirdScores)
f7a6a3ec7710 Uploaded
jfb
parents: 19
diff changeset
2024 write.table(NegativeOutput,file = FILENAME5,sep = ",",na="",row.names = FALSE, append = FALSE)