annotate kinatestid_r/Kinatest-R.R @ 14:da1012f014bd draft

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