annotate kinatestid_r/Kinatest-R_part2.R @ 13:d71eb1d66a88 draft

Uploaded
author jfb
date Thu, 08 Feb 2018 15:10:42 -0500
parents f80306fc5d69
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
1 #test myself: this script should take in amino acids for each of the 9 positions and give out every single combination of those AAs
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
2
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
3 #need to do following: fix it so that the accession numbers stay with the substrates,
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
4 #also the neg false constant is totaly unphos'd Ys found by FASTA-2-CSV system# uniprot
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
5
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
6 #HOW MANY: IF THERE'S two aas in each position you get 2^9, so I assume the numbers are:
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
7 #(number in position-4)*(number in position -3)*(number in position -2)...=total
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
8 # require(rJava)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
9 # require(xlsxjars)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
10 # require(xlsx)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
11 # # require(readxl)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
12
9
f80306fc5d69 Uploaded
jfb
parents: 4
diff changeset
13 #View(SDtable)
4
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
14 bareSDs<-SDtable[2:21,2:16]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
15 goodones<-bareSDs>2
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
16
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
17 Positionm7<-which(goodones[,1] %in% TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
18 if (length(Positionm7)<1){Positionm7<-which(bareSDs[,1]==max(bareSDs[,1]))}
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
19 Positionm6<-which(goodones[,2] %in% TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
20 if (length(Positionm6)<1){Positionm6<-which(bareSDs[,2]==max(bareSDs[,2]))}
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
21 Positionm5<-which(goodones[,3] %in% TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
22 if (length(Positionm5)<1){Positionm5<-which(bareSDs[,3]==max(bareSDs[,3]))}
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
23 Positionm4<-which(goodones[,4] %in% TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
24 if (length(Positionm4)<1){Positionm4<-which(bareSDs[,4]==max(bareSDs[,4]))}
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
25 Positionm3<-which(goodones[,5] %in% TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
26 if (length(Positionm3)<1){Positionm3<-which(bareSDs[,5]==max(bareSDs[,5]))}
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
27 Positionm2<-which(goodones[,6] %in% TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
28 if (length(Positionm2)<1){Positionm2<-which(bareSDs[,6]==max(bareSDs[,6]))}
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
29 Positionm1<-which(goodones[,7] %in% TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
30 if (length(Positionm1)<1){Positionm1<-which(bareSDs[,7]==max(bareSDs[,7]))}
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
31
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
32 Positiond0<-which(goodones[,8] %in% TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
33 if (length(Positiond0)<1){Positiond0<-which(bareSDs[,8]==max(bareSDs[,8]))}
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
34
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
35 Positionp1<-which(goodones[,9] %in% TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
36 if (length(Positionp1)<1){Positionp1<-which(bareSDs[,9]==max(bareSDs[,9]))}
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
37 Positionp2<-which(goodones[,10] %in% TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
38 if (length(Positionp2)<1){Positionp2<-which(bareSDs[,10]==max(bareSDs[,10]))}
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
39 Positionp3<-which(goodones[,11] %in% TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
40 if (length(Positionp3)<1){Positionp3<-which(bareSDs[,11]==max(bareSDs[,11]))}
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
41 Positionp4<-which(goodones[,12] %in% TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
42 if (length(Positionp4)<1){Positionp4<-which(bareSDs[,12]==max(bareSDs[,12]))}
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
43 Positionp5<-which(goodones[,13] %in% TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
44 if (length(Positionp5)<1){Positionp5<-which(bareSDs[,13]==max(bareSDs[,13]))}
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
45 Positionp6<-which(goodones[,14] %in% TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
46 if (length(Positionp6)<1){Positionp6<-which(bareSDs[,14]==max(bareSDs[,14]))}
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
47 Positionp7<-which(goodones[,15] %in% TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
48 if (length(Positionp7)<1){Positionp7<-which(bareSDs[,15]==max(bareSDs[,15]))}
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
49
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
50 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",
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
51 "13"="P", "14"="Q", "15"="R", "16"="S", "17"="T", "18"="V", "19"="W", "20"="Y")
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
52
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
53 Positionm7<-sapply(Positionm7, function (x) aa_props2[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
54 Positionm6<-sapply(Positionm6, function (x) aa_props2[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
55 Positionm5<-sapply(Positionm5, function (x) aa_props2[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
56 Positionm4<-sapply(Positionm4, function (x) aa_props2[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
57 Positionm3<-sapply(Positionm3, function (x) aa_props2[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
58 Positionm2<-sapply(Positionm2, function (x) aa_props2[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
59 Positionm1<-sapply(Positionm1, function (x) aa_props2[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
60 Positiond0<-sapply(Positiond0, function (x) aa_props2[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
61 Positionp1<-sapply(Positionp1, function (x) aa_props2[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
62 Positionp2<-sapply(Positionp2, function (x) aa_props2[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
63 Positionp3<-sapply(Positionp3, function (x) aa_props2[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
64 Positionp4<-sapply(Positionp4, function (x) aa_props2[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
65 Positionp5<-sapply(Positionp5, function (x) aa_props2[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
66 Positionp6<-sapply(Positionp6, function (x) aa_props2[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
67 Positionp7<-sapply(Positionp7, function (x) aa_props2[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
68
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
69
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
70 # Positionm7<-c("D","H","N","V")
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
71 # Positionm6<-c("E","V")
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
72 # Positionm5<-c("D","H")
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
73 # Positionm4<-c("D","N")
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
74 # Positionm3<-c("D","E","F","Q")
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
75 # Positionm2<-c("D","N","Q","S")
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
76 # Positionm1<-c("F","I","L")
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
77 # Positiond0<-c("Y")
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
78 # Positionp1<-c("A","E")
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
79 # Positionp2<-c("T","S","Q","E")
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
80 # Positionp3<-c("V")
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
81 # Positionp4<-c("K")
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
82 # Positionp5<-c("K")
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
83 # Positionp6<-c("K")
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
84 # Positionp7<-c("R")
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
85 #this is where the amino acids for each position are given. m means minus, p mean plus
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
86 ########################################
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
87 # ScreenerFilename<-"C:/Users/User Name/Desktop/UMN 2017 Spring/Parker Lab/Kinatest ID/Screener.xls"
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
88
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
89
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
90
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
91
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
92
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
93
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
94
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
95
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
96
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
97
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
98
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
99 screaner<-read.csv(ScreenerFilename, header = FALSE, stringsAsFactors = FALSE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
100
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
101
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
102 Abl<-screaner[2:25,]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
103 Arg<-screaner[27:50,]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
104 Btk<-screaner[52:75,]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
105 Csk<-screaner[77:100,]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
106 Fyn<-screaner[102:125,]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
107 Hck<-screaner[127:150,]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
108 JAK2<-screaner[152:175,]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
109 Lck<-screaner[177:200,]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
110 Lyn<-screaner[202:225,]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
111 Pyk2<-screaner[227:250,]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
112 Src<-screaner[252:275,]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
113 Syk<-screaner[277:300,]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
114 Yes<-screaner[302:325,]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
115
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
116 #two questions: why are we doing BTK when we already have a bioninformatics page about it?
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
117 #two I reran everything and only get 96 positions of interest in the SD table
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
118
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
119
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
120
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
121
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
122
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
123
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
124
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
125
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
126
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
127 #Do_You_want_An_Excel_Output_Questionmark<-"NO"
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
128 GeneratedPeptidesFile<-"GeneratedPeptidesFile.csv"
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
129
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
130
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
131 # Abl<-read.xlsx("C:/Users/User Name/Desktop/UMN 2017 Spring/Parker Lab/Kinatest ID/Screener.xls", sheetIndex = 4)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
132 # Arg<-read.xlsx("C:/Users/User Name/Desktop/UMN 2017 Spring/Parker Lab/Kinatest ID/Screener.xls", sheetIndex = 5)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
133 # Btk<-read.xlsx("C:/Users/User Name/Desktop/UMN 2017 Spring/Parker Lab/Kinatest ID/Screener.xls", sheetIndex = 6)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
134 # Csk<-read.xlsx("C:/Users/User Name/Desktop/UMN 2017 Spring/Parker Lab/Kinatest ID/Screener.xls", sheetIndex = 7)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
135 # Fyn<-read.xlsx("C:/Users/User Name/Desktop/UMN 2017 Spring/Parker Lab/Kinatest ID/Screener.xls", sheetIndex = 8)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
136 # Hck<-read.xlsx("C:/Users/User Name/Desktop/UMN 2017 Spring/Parker Lab/Kinatest ID/Screener.xls", sheetIndex = 9)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
137 # JAK2<-read.xlsx("C:/Users/User Name/Desktop/UMN 2017 Spring/Parker Lab/Kinatest ID/Screener.xls", sheetIndex = 10)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
138 # Lck<-read.xlsx("C:/Users/User Name/Desktop/UMN 2017 Spring/Parker Lab/Kinatest ID/Screener.xls", sheetIndex = 11)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
139 # Lyn<-read.xlsx("C:/Users/User Name/Desktop/UMN 2017 Spring/Parker Lab/Kinatest ID/Screener.xls", sheetIndex = 12)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
140 # Pyk2<-read.xlsx("C:/Users/User Name/Desktop/UMN 2017 Spring/Parker Lab/Kinatest ID/Screener.xls", sheetIndex = 13)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
141 # Src<-read.xlsx("C:/Users/User Name/Desktop/UMN 2017 Spring/Parker Lab/Kinatest ID/Screener.xls", sheetIndex = 14)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
142 # Syk<-read.xlsx("C:/Users/User Name/Desktop/UMN 2017 Spring/Parker Lab/Kinatest ID/Screener.xls", sheetIndex = 15)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
143 # Yes<-read.xlsx("C:/Users/User Name/Desktop/UMN 2017 Spring/Parker Lab/Kinatest ID/Screener.xls", sheetIndex = 16)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
144 #
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
145
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
146
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
147 "A"=1
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
148 "C"=2
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
149 "D"=3
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
150 "E"=4
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
151 "F"=5
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
152 "G"=6
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
153 "H"=7
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
154 "I"=8
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
155 "K"=9
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
156 "L"=10
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
157 "M"=11
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
158 "N"=12
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
159 "P"=13
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
160 "Q"=14
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
161 "R"=15
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
162 "S"=16
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
163 "T"=17
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
164 "V"=18
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
165 "W"=19
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
166 "Y"=20
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
167
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
168 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,
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
169 "S"=S,"T"=T,"V"=V,"W"=W,"Y"=Y,"xY"=Y,"O"=21)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
170
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
171 number15<-sapply(Positionm7, function (x) aa_props[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
172 number14<-sapply(Positionm6, function (x) aa_props[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
173 number13<-sapply(Positionm5, function (x) aa_props[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
174 number1 <- sapply(Positionm4, function (x) aa_props[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
175 number2 <- sapply(Positionm3, function (x) aa_props[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
176 number3 <- sapply(Positionm2, function (x) aa_props[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
177 number4 <- sapply(Positionm1, function (x) aa_props[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
178 number5 <- sapply(Positiond0, function (x) aa_props[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
179 number6 <- sapply(Positionp1, function (x) aa_props[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
180 number7 <- sapply(Positionp2, function (x) aa_props[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
181 number8 <- sapply(Positionp3, function (x) aa_props[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
182 number9 <- sapply(Positionp4, function (x) aa_props[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
183 number10<-sapply(Positionp5, function (x) aa_props[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
184 number11<-sapply(Positionp6, function (x) aa_props[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
185 number12<-sapply(Positionp7, function (x) aa_props[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
186
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
187 # number1<-Positionm4
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
188 # number2<-Positionm3
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
189 # number3<-Positionm2
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
190 # number4<-Positionm1
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
191 # number5<-Positiond0
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
192 # number6<-Positionp1
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
193 # number7<-Positionp2
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
194 # number8<-Positionp3
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
195 # number9<-Positionp4
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
196
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
197 #############################
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
198 #here I create the Abl seqs with proper value for each number
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
199 if (1==0){
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
200 Ablnumber1<- gsub("A",A,Ablnumber1,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
201 Ablnumber1<- gsub("C",C,Ablnumber1,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
202 Ablnumber1<- gsub("D",D,Ablnumber1,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
203 Ablnumber1<- gsub("E",E,Ablnumber1,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
204 Ablnumber1<- gsub("F",F,Ablnumber1,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
205 Ablnumber1<- gsub("G",G,Ablnumber1,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
206 Ablnumber1<- gsub("H",H,Ablnumber1,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
207 Ablnumber1<- gsub("I",I,Ablnumber1,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
208 Ablnumber1<- gsub("K",K,Ablnumber1,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
209 Ablnumber1<- gsub("L",L,Ablnumber1,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
210 Ablnumber1<- gsub("M",M,Ablnumber1,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
211 Ablnumber1<- gsub("N",N,Ablnumber1,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
212 Ablnumber1<- gsub("P",P,Ablnumber1,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
213 Ablnumber1<- gsub("Q",Q,Ablnumber1,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
214 Ablnumber1<- gsub("R",R,Ablnumber1,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
215 Ablnumber1<- gsub("S",S,Ablnumber1,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
216 Ablnumber1<- gsub("T",T,Ablnumber1,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
217 Ablnumber1<- gsub("V",V,Ablnumber1,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
218 Ablnumber1<- gsub("W",W,Ablnumber1,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
219 Ablnumber1<- gsub("Y",Y,Ablnumber1,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
220
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
221 Ablnumber2<- gsub("A",A,Ablnumber2,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
222 Ablnumber2<- gsub("C",C,Ablnumber2,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
223 Ablnumber2<- gsub("D",D,Ablnumber2,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
224 Ablnumber2<- gsub("E",E,Ablnumber2,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
225 Ablnumber2<- gsub("F",F,Ablnumber2,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
226 Ablnumber2<- gsub("G",G,Ablnumber2,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
227 Ablnumber2<- gsub("H",H,Ablnumber2,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
228 Ablnumber2<- gsub("I",I,Ablnumber2,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
229 Ablnumber2<- gsub("K",K,Ablnumber2,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
230 Ablnumber2<- gsub("L",L,Ablnumber2,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
231 Ablnumber2<- gsub("M",M,Ablnumber2,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
232 Ablnumber2<- gsub("N",N,Ablnumber2,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
233 Ablnumber2<- gsub("P",P,Ablnumber2,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
234 Ablnumber2<- gsub("Q",Q,Ablnumber2,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
235 Ablnumber2<- gsub("R",R,Ablnumber2,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
236 Ablnumber2<- gsub("S",S,Ablnumber2,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
237 Ablnumber2<- gsub("T",T,Ablnumber2,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
238 Ablnumber2<- gsub("V",V,Ablnumber2,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
239 Ablnumber2<- gsub("W",W,Ablnumber2,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
240 Ablnumber2<- gsub("Y",Y,Ablnumber2,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
241
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
242 Ablnumber3<- gsub("A",A,Ablnumber3,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
243 Ablnumber3<- gsub("C",C,Ablnumber3,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
244 Ablnumber3<- gsub("D",D,Ablnumber3,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
245 Ablnumber3<- gsub("E",E,Ablnumber3,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
246 Ablnumber3<- gsub("F",F,Ablnumber3,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
247 Ablnumber3<- gsub("G",G,Ablnumber3,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
248 Ablnumber3<- gsub("H",H,Ablnumber3,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
249 Ablnumber3<- gsub("I",I,Ablnumber3,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
250 Ablnumber3<- gsub("K",K,Ablnumber3,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
251 Ablnumber3<- gsub("L",L,Ablnumber3,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
252 Ablnumber3<- gsub("M",M,Ablnumber3,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
253 Ablnumber3<- gsub("N",N,Ablnumber3,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
254 Ablnumber3<- gsub("P",P,Ablnumber3,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
255 Ablnumber3<- gsub("Q",Q,Ablnumber3,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
256 Ablnumber3<- gsub("R",R,Ablnumber3,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
257 Ablnumber3<- gsub("S",S,Ablnumber3,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
258 Ablnumber3<- gsub("T",T,Ablnumber3,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
259 Ablnumber3<- gsub("V",V,Ablnumber3,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
260 Ablnumber3<- gsub("W",W,Ablnumber3,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
261 Ablnumber3<- gsub("Y",Y,Ablnumber3,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
262
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
263 Ablnumber4<- gsub("A",A,Ablnumber4,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
264 Ablnumber4<- gsub("C",C,Ablnumber4,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
265 Ablnumber4<- gsub("D",D,Ablnumber4,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
266 Ablnumber4<- gsub("E",E,Ablnumber4,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
267 Ablnumber4<- gsub("F",F,Ablnumber4,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
268 Ablnumber4<- gsub("G",G,Ablnumber4,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
269 Ablnumber4<- gsub("H",H,Ablnumber4,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
270 Ablnumber4<- gsub("I",I,Ablnumber4,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
271 Ablnumber4<- gsub("K",K,Ablnumber4,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
272 Ablnumber4<- gsub("L",L,Ablnumber4,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
273 Ablnumber4<- gsub("M",M,Ablnumber4,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
274 Ablnumber4<- gsub("N",N,Ablnumber4,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
275 Ablnumber4<- gsub("P",P,Ablnumber4,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
276 Ablnumber4<- gsub("Q",Q,Ablnumber4,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
277 Ablnumber4<- gsub("R",R,Ablnumber4,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
278 Ablnumber4<- gsub("S",S,Ablnumber4,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
279 Ablnumber4<- gsub("T",T,Ablnumber4,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
280 Ablnumber4<- gsub("V",V,Ablnumber4,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
281 Ablnumber4<- gsub("W",W,Ablnumber4,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
282 Ablnumber4<- gsub("Y",Y,Ablnumber4,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
283
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
284 Ablnumber5<- gsub("A",A,Ablnumber5,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
285 Ablnumber5<- gsub("C",C,Ablnumber5,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
286 Ablnumber5<- gsub("D",D,Ablnumber5,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
287 Ablnumber5<- gsub("E",E,Ablnumber5,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
288 Ablnumber5<- gsub("F",F,Ablnumber5,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
289 Ablnumber5<- gsub("G",G,Ablnumber5,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
290 Ablnumber5<- gsub("H",H,Ablnumber5,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
291 Ablnumber5<- gsub("I",I,Ablnumber5,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
292 Ablnumber5<- gsub("K",K,Ablnumber5,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
293 Ablnumber5<- gsub("L",L,Ablnumber5,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
294 Ablnumber5<- gsub("M",M,Ablnumber5,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
295 Ablnumber5<- gsub("N",N,Ablnumber5,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
296 Ablnumber5<- gsub("P",P,Ablnumber5,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
297 Ablnumber5<- gsub("Q",Q,Ablnumber5,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
298 Ablnumber5<- gsub("R",R,Ablnumber5,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
299 Ablnumber5<- gsub("S",S,Ablnumber5,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
300 Ablnumber5<- gsub("T",T,Ablnumber5,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
301 Ablnumber5<- gsub("V",V,Ablnumber5,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
302 Ablnumber5<- gsub("W",W,Ablnumber5,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
303 Ablnumber5<- gsub("Y",Y,Ablnumber5,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
304
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
305 Ablnumber6<- gsub("A",A,Ablnumber6,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
306 Ablnumber6<- gsub("C",C,Ablnumber6,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
307 Ablnumber6<- gsub("D",D,Ablnumber6,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
308 Ablnumber6<- gsub("E",E,Ablnumber6,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
309 Ablnumber6<- gsub("F",F,Ablnumber6,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
310 Ablnumber6<- gsub("G",G,Ablnumber6,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
311 Ablnumber6<- gsub("H",H,Ablnumber6,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
312 Ablnumber6<- gsub("I",I,Ablnumber6,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
313 Ablnumber6<- gsub("K",K,Ablnumber6,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
314 Ablnumber6<- gsub("L",L,Ablnumber6,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
315 Ablnumber6<- gsub("M",M,Ablnumber6,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
316 Ablnumber6<- gsub("N",N,Ablnumber6,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
317 Ablnumber6<- gsub("P",P,Ablnumber6,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
318 Ablnumber6<- gsub("Q",Q,Ablnumber6,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
319 Ablnumber6<- gsub("R",R,Ablnumber6,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
320 Ablnumber6<- gsub("S",S,Ablnumber6,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
321 Ablnumber6<- gsub("T",T,Ablnumber6,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
322 Ablnumber6<- gsub("V",V,Ablnumber6,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
323 Ablnumber6<- gsub("W",W,Ablnumber6,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
324 Ablnumber6<- gsub("Y",Y,Ablnumber6,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
325
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
326 Ablnumber7<- gsub("A",A,Ablnumber7,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
327 Ablnumber7<- gsub("C",C,Ablnumber7,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
328 Ablnumber7<- gsub("D",D,Ablnumber7,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
329 Ablnumber7<- gsub("E",E,Ablnumber7,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
330 Ablnumber7<- gsub("F",F,Ablnumber7,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
331 Ablnumber7<- gsub("G",G,Ablnumber7,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
332 Ablnumber7<- gsub("H",H,Ablnumber7,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
333 Ablnumber7<- gsub("I",I,Ablnumber7,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
334 Ablnumber7<- gsub("K",K,Ablnumber7,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
335 Ablnumber7<- gsub("L",L,Ablnumber7,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
336 Ablnumber7<- gsub("M",M,Ablnumber7,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
337 Ablnumber7<- gsub("N",N,Ablnumber7,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
338 Ablnumber7<- gsub("P",P,Ablnumber7,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
339 Ablnumber7<- gsub("Q",Q,Ablnumber7,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
340 Ablnumber7<- gsub("R",R,Ablnumber7,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
341 Ablnumber7<- gsub("S",S,Ablnumber7,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
342 Ablnumber7<- gsub("T",T,Ablnumber7,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
343 Ablnumber7<- gsub("V",V,Ablnumber7,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
344 Ablnumber7<- gsub("W",W,Ablnumber7,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
345 Ablnumber7<- gsub("Y",Y,Ablnumber7,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
346
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
347 Ablnumber8<- gsub("A",A,Ablnumber8,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
348 Ablnumber8<- gsub("C",C,Ablnumber8,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
349 Ablnumber8<- gsub("D",D,Ablnumber8,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
350 Ablnumber8<- gsub("E",E,Ablnumber8,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
351 Ablnumber8<- gsub("F",F,Ablnumber8,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
352 Ablnumber8<- gsub("G",G,Ablnumber8,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
353 Ablnumber8<- gsub("H",H,Ablnumber8,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
354 Ablnumber8<- gsub("I",I,Ablnumber8,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
355 Ablnumber8<- gsub("K",K,Ablnumber8,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
356 Ablnumber8<- gsub("L",L,Ablnumber8,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
357 Ablnumber8<- gsub("M",M,Ablnumber8,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
358 Ablnumber8<- gsub("N",N,Ablnumber8,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
359 Ablnumber8<- gsub("P",P,Ablnumber8,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
360 Ablnumber8<- gsub("Q",Q,Ablnumber8,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
361 Ablnumber8<- gsub("R",R,Ablnumber8,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
362 Ablnumber8<- gsub("S",S,Ablnumber8,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
363 Ablnumber8<- gsub("T",T,Ablnumber8,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
364 Ablnumber8<- gsub("V",V,Ablnumber8,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
365 Ablnumber8<- gsub("W",W,Ablnumber8,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
366 Ablnumber8<- gsub("Y",Y,Ablnumber8,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
367
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
368 Ablnumber9<- gsub("A",A,Ablnumber9,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
369 Ablnumber9<- gsub("C",C,Ablnumber9,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
370 Ablnumber9<- gsub("D",D,Ablnumber9,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
371 Ablnumber9<- gsub("E",E,Ablnumber9,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
372 Ablnumber9<- gsub("F",F,Ablnumber9,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
373 Ablnumber9<- gsub("G",G,Ablnumber9,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
374 Ablnumber9<- gsub("H",H,Ablnumber9,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
375 Ablnumber9<- gsub("I",I,Ablnumber9,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
376 Ablnumber9<- gsub("K",K,Ablnumber9,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
377 Ablnumber9<- gsub("L",L,Ablnumber9,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
378 Ablnumber9<- gsub("M",M,Ablnumber9,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
379 Ablnumber9<- gsub("N",N,Ablnumber9,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
380 Ablnumber9<- gsub("P",P,Ablnumber9,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
381 Ablnumber9<- gsub("Q",Q,Ablnumber9,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
382 Ablnumber9<- gsub("R",R,Ablnumber9,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
383 Ablnumber9<- gsub("S",S,Ablnumber9,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
384 Ablnumber9<- gsub("T",T,Ablnumber9,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
385 Ablnumber9<- gsub("V",V,Ablnumber9,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
386 Ablnumber9<- gsub("W",W,Ablnumber9,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
387 Ablnumber9<- gsub("Y",Y,Ablnumber9,perl = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
388 }
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
389 ########################################
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
390
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
391
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
392 total=length(Positionp7)*length(Positionp6)*length(Positionp5)*length(Positionp4)*length(Positionp3)*(length(Positionp2))*length(Positionp1)*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
393 length(Positiond0)*length(Positionm1)*length(Positionm2)*length(Positionm3)*length(Positionm4)*length(Positionm5)*length(Positionm6)*length(Positionm7)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
394 #this is just a way to doublecheck that the length of the generated peptides vector is correct
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
395
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
396 GeneratedPeptides<-rep(NA, times=total*15)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
397 GeneratedPeptides<-matrix(data = GeneratedPeptides,ncol = 15)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
398
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
399 NumeratedPeptides<-GeneratedPeptides
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
400 #create an empty vector of correct length by finding the number of each AAs per position and multiplying them
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
401 count<-0
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
402 for (t in 1:length(Positionm7)) {
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
403 for (s in 1:length(Positionm6)) {
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
404 for (r in 1:length(Positionm5)) {
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
405 for (i in 1:length(Positionm4)) {
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
406 for (j in 1:length(Positionm3)) {
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
407 for (k in 1:length(Positionm2)) {
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
408 for (l in 1:length(Positionm1)) {
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
409 for (m in 1:length(Positiond0)) {
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
410 for (n in 1:length(Positionp1)) {
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
411 for (o in 1:length(Positionp2)) {
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
412 for (p in 1:length(Positionp3)) {
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
413 for (q in 1:length(Positionp4)) {
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
414 for (u in 1:length(Positionp5)) {
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
415 for (v in 1:length(Positionp6)) {
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
416 for (w in 1:length(Positionp7)) {
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
417 # i=1
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
418 # j=1
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
419 # k=1
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
420 # l=1
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
421 # m=1
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
422 # n=1
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
423 # o=1
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
424 # p=1
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
425 # q=1
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
426 #
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
427 #for every single position, increment the count number, create a peptide using the AAs at that position
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
428 #then put them together into the generated peptides sequencex
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
429 count<-count+1
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
430 tabulation<-c(Positionm7[t],Positionm6[s],Positionm5[r],Positionm4[i],Positionm3[j],Positionm2[k],Positionm1[l],Positiond0[m],Positionp1[n],
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
431 Positionp2[o],Positionp3[p],Positionp4[q],Positionp5[u],Positionp6[v],Positionp7[w])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
432 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],
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
433 number12[w])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
434 #tabulation<-paste(tabulation, sep="", collapse="")
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
435 GeneratedPeptides[count,1:15]<-tabulation
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
436 NumeratedPeptides[count,1:15]<-numeration
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
437 }
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
438 }
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
439 }
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
440 }
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
441 }
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
442 }
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
443 }
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
444 }
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
445 }
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
446 }
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
447 }
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
448 }
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
449 }
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
450 }
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
451 }
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
452 ####################################################################
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
453 #now here I use the Endogenous Probabilty matrix from the previous script, which is called EMPtable
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
454 #to score the created peptides
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
455 ThisKinTable<-EPMtableu#[1:nrow(SDtable),]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
456 TKTcolumn<-c(data=rep(1,times=21))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
457 TKTcolumn<-as.matrix(TKTcolumn,ncol=1)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
458 ThisKinTable<-cbind(TKTcolumn,ThisKinTable)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
459
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
460 ThisKinGeneratedScores<-rep(NA,times=nrow(GeneratedPeptides))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
461 ThisKinGenWeirdScore<-rep(NA,times=nrow(GeneratedPeptides))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
462
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
463 for (x in 1:nrow(GeneratedPeptides)){
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
464 Scoringpeptide<-NumeratedPeptides[x,1:15]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
465 Scoringpeptide<-Scoringpeptide+1
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
466 ThisKinTableScore<-as.numeric(ThisKinTable[Scoringpeptide[1],3])*ThisKinTable[as.numeric(Scoringpeptide[2]),4]*ThisKinTable[as.numeric(Scoringpeptide[3]),5]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
467 ThisKinTable[as.numeric(Scoringpeptide[4]),6]*ThisKinTable[as.numeric(Scoringpeptide[5]),7]*ThisKinTable[as.numeric(Scoringpeptide[6]),8]*ThisKinTable[as.numeric(Scoringpeptide[7]),9]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
468 #ThisKinTable[as.numeric(Scoringpeptide[8]),10]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
469 ThisKinTable[as.numeric(Scoringpeptide[9]),11]*ThisKinTable[as.numeric(Scoringpeptide[10]),12]*ThisKinTable[as.numeric(Scoringpeptide[11]),13]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
470 ThisKinTable[as.numeric(Scoringpeptide[12]),14]*ThisKinTable[as.numeric(Scoringpeptide[13]),15]*ThisKinTable[as.numeric(Scoringpeptide[14]),16]*ThisKinTable[as.numeric(Scoringpeptide[15]),17]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
471 ThisKinGeneratedScores[x]<-ThisKinTableScore
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
472 ThisKinTableScore<-(ThisKinTableScore/(ThisKinTableScore+1/as.numeric(NormalizationScore[2])))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
473 ThisKinGenWeirdScore[x]<-ThisKinTableScore
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
474 }
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
475
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
476 AblGeneratedScores<-rep(NA,times=nrow(GeneratedPeptides))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
477 ArgGeneratedScores<-rep(NA,times=nrow(GeneratedPeptides))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
478 BtkGeneratedScores<-rep(NA,times=nrow(GeneratedPeptides))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
479 CskGeneratedScores<-rep(NA,times=nrow(GeneratedPeptides))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
480 FynGeneratedScores<-rep(NA,times=nrow(GeneratedPeptides))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
481 HckGeneratedScores<-rep(NA,times=nrow(GeneratedPeptides))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
482 JAK2GeneratedScores<-rep(NA,times=nrow(GeneratedPeptides))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
483 LckGeneratedScores<-rep(NA,times=nrow(GeneratedPeptides))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
484 LynGeneratedScores<-rep(NA,times=nrow(GeneratedPeptides))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
485 Pyk2GeneratedScores<-rep(NA,times=nrow(GeneratedPeptides))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
486 SrcGeneratedScores<-rep(NA,times=nrow(GeneratedPeptides))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
487 SykGeneratedScores<-rep(NA,times=nrow(GeneratedPeptides))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
488 YesGeneratedScores<-rep(NA,times=nrow(GeneratedPeptides))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
489
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
490
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
491 for (x in 1:nrow(GeneratedPeptides)){
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
492 Scoringpeptide<-NumeratedPeptides[x,1:15]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
493 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]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
494 Abl[Scoringpeptide[7],8]*Abl[Scoringpeptide[9],10]*Abl[Scoringpeptide[10],11]*Abl[Scoringpeptide[11],12]*Abl[Scoringpeptide[12],13]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
495 Abl[Scoringpeptide[13],14]*Abl[Scoringpeptide[14],15]*Abl[Scoringpeptide[15],16]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
496 AblGeneratedScores[x]<-AblScore
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
497
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
498 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]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
499 Arg[Scoringpeptide[7],8]*Arg[Scoringpeptide[9],10]*Arg[Scoringpeptide[10],11]*Arg[Scoringpeptide[11],12]*Arg[Scoringpeptide[12],13]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
500 Arg[Scoringpeptide[13],14]*Arg[Scoringpeptide[14],15]*Arg[Scoringpeptide[15],16]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
501 ArgGeneratedScores[x]<-ArgScore
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
502
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
503 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]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
504 Btk[Scoringpeptide[7],8]*Btk[Scoringpeptide[9],10]*Btk[Scoringpeptide[10],11]*Btk[Scoringpeptide[11],12]*Btk[Scoringpeptide[12],13]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
505 Btk[Scoringpeptide[13],14]*Btk[Scoringpeptide[14],15]*Btk[Scoringpeptide[15],16]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
506 BtkGeneratedScores[x]<-BtkScore
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
507
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
508 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]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
509 Csk[Scoringpeptide[7],8]*Csk[Scoringpeptide[9],10]*Csk[Scoringpeptide[10],11]*Csk[Scoringpeptide[11],12]*Csk[Scoringpeptide[12],13]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
510 Csk[Scoringpeptide[13],14]*Csk[Scoringpeptide[14],15]*Csk[Scoringpeptide[15],16]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
511 CskGeneratedScores[x]<-CskScore
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
512
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
513 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]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
514 Fyn[Scoringpeptide[7],8]*Fyn[Scoringpeptide[9],10]*Fyn[Scoringpeptide[10],11]*Fyn[Scoringpeptide[11],12]*Fyn[Scoringpeptide[12],13]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
515 Fyn[Scoringpeptide[13],14]*Fyn[Scoringpeptide[14],15]*Fyn[Scoringpeptide[15],16]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
516 FynGeneratedScores[x]<-FynScore
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
517
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
518 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]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
519 Hck[Scoringpeptide[7],8]*Hck[Scoringpeptide[9],10]*Hck[Scoringpeptide[10],11]*Hck[Scoringpeptide[11],12]*Hck[Scoringpeptide[12],13]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
520 Hck[Scoringpeptide[13],14]*Hck[Scoringpeptide[14],15]*Hck[Scoringpeptide[15],16]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
521 HckGeneratedScores[x]<-HckScore
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
522
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
523 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]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
524 JAK2[Scoringpeptide[7],8]*JAK2[Scoringpeptide[9],10]*JAK2[Scoringpeptide[10],11]*JAK2[Scoringpeptide[11],12]*JAK2[Scoringpeptide[12],13]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
525 JAK2[Scoringpeptide[13],14]*JAK2[Scoringpeptide[14],15]*JAK2[Scoringpeptide[15],16]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
526 JAK2GeneratedScores[x]<-JAK2Score
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
527
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
528 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]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
529 Lck[Scoringpeptide[7],8]*Lck[Scoringpeptide[9],10]*Lck[Scoringpeptide[10],11]*Lck[Scoringpeptide[11],12]*Lck[Scoringpeptide[12],13]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
530 Lck[Scoringpeptide[13],14]*Lck[Scoringpeptide[14],15]*Lck[Scoringpeptide[15],16]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
531 LckGeneratedScores[x]<-LckScore
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
532
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
533 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]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
534 Lyn[Scoringpeptide[7],8]*Lyn[Scoringpeptide[9],10]*Lyn[Scoringpeptide[10],11]*Lyn[Scoringpeptide[11],12]*Lyn[Scoringpeptide[12],13]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
535 Lyn[Scoringpeptide[13],14]*Lyn[Scoringpeptide[14],15]*Lyn[Scoringpeptide[15],16]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
536 LynGeneratedScores[x]<-LynScore
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
537
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
538 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]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
539 Pyk2[Scoringpeptide[7],8]*Pyk2[Scoringpeptide[9],10]*Pyk2[Scoringpeptide[10],11]*Pyk2[Scoringpeptide[11],12]*Pyk2[Scoringpeptide[12],13]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
540 Pyk2[Scoringpeptide[13],14]*Pyk2[Scoringpeptide[14],15]*Pyk2[Scoringpeptide[15],16]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
541 Pyk2GeneratedScores[x]<-Pyk2Score
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
542
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
543 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]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
544 Src[Scoringpeptide[7],8]*Src[Scoringpeptide[9],10]*Src[Scoringpeptide[10],11]*Src[Scoringpeptide[11],12]*Src[Scoringpeptide[12],13]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
545 Src[Scoringpeptide[13],14]*Src[Scoringpeptide[14],15]*Src[Scoringpeptide[15],16]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
546 SrcGeneratedScores[x]<-SrcScore
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
547
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
548 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]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
549 Syk[Scoringpeptide[7],8]*Syk[Scoringpeptide[9],10]*Syk[Scoringpeptide[10],11]*Syk[Scoringpeptide[11],12]*Syk[Scoringpeptide[12],13]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
550 Syk[Scoringpeptide[13],14]*Syk[Scoringpeptide[14],15]*Syk[Scoringpeptide[15],16]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
551 SykGeneratedScores[x]<-SykScore
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
552
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
553 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]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
554 Yes[Scoringpeptide[7],8]*Yes[Scoringpeptide[9],10]*Yes[Scoringpeptide[10],11]*Yes[Scoringpeptide[11],12]*Yes[Scoringpeptide[12],13]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
555 Yes[Scoringpeptide[13],14]*Yes[Scoringpeptide[14],15]*Yes[Scoringpeptide[15],16]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
556 YesGeneratedScores[x]<-YesScore
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
557
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
558 # ThisKinTableScore<-ThisKinTable[as.numeric(Scoringpeptide[1]),3]*ThisKinTable[as.numeric(Scoringpeptide[2]),4]*ThisKinTable[as.numeric(Scoringpeptide[3]),5]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
559 # ThisKinTable[as.numeric(Scoringpeptide[4]),6]*ThisKinTable[as.numeric(Scoringpeptide[6]),8]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
560 # ThisKinTable[as.numeric(Scoringpeptide[7]),9]*ThisKinTable[as.numeric(Scoringpeptide[8]),10]*ThisKinTable[as.numeric(Scoringpeptide[9]),11]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
561 # ThisKinGeneratedScores[x]<-ThisKinTableScore
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
562 }
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
563
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
564
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
565
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
566 AblNorm<-1/as.numeric(Abl[22,1])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
567 AblThresh<-as.numeric(Abl[24,1])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
568 AblTrueThresh<-((AblThresh*AblNorm)/(100-AblThresh))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
569 AblActive<-unlist(AblGeneratedScores)>AblTrueThresh
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
570
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
571 ArgNorm<-1/as.numeric(Arg[22,1])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
572 ArgThresh<-as.numeric(Arg[24,1])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
573 ArgTrueThresh<-((ArgThresh*ArgNorm)/(100-ArgThresh))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
574 ArgActive<-unlist(ArgGeneratedScores)>ArgTrueThresh
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
575
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
576 BtkNorm<-1/as.numeric(Btk[22,1])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
577 BtkThresh<-as.numeric(Btk[24,1])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
578 BtkTrueThresh<-((BtkThresh*BtkNorm)/(100-BtkThresh))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
579 BtkActive<-unlist(BtkGeneratedScores)>BtkTrueThresh
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
580
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
581 CskNorm<-1/as.numeric(Csk[22,1])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
582 CskThresh<-as.numeric(Csk[24,1])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
583 CskTrueThresh<-((CskThresh*CskNorm)/(100-CskThresh))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
584 CskActive<-(CskGeneratedScores)>CskTrueThresh
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
585
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
586 FynNorm<-1/as.numeric(Fyn[22,1])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
587 FynThresh<-as.numeric(Fyn[24,1])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
588 FynTrueThresh<-((FynThresh*FynNorm)/(100-FynThresh))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
589 FynActive<-unlist(FynGeneratedScores)>FynTrueThresh
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
590
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
591 HckNorm<-1/as.numeric(Hck[22,1])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
592 HckThresh<-as.numeric(Hck[24,1])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
593 HckTrueThresh<-((HckThresh*HckNorm)/(100-HckThresh))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
594 HckActive<-unlist(HckGeneratedScores)>HckTrueThresh
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
595
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
596 JAK2Norm<-1/as.numeric(JAK2[22,1])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
597 JAK2Thresh<-as.numeric(JAK2[24,1])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
598 JAK2TrueThresh<-((JAK2Thresh*JAK2Norm)/(100-JAK2Thresh))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
599 JAk2Active<-unlist(JAK2GeneratedScores)>JAK2TrueThresh
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
600
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
601 LckNorm<-1/as.numeric(Lck[22,1])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
602 LckThresh<-as.numeric(Lck[24,1])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
603 LckTrueThresh<-((LckThresh*LckNorm)/(100-LckThresh))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
604 LckActive<-unlist(LckGeneratedScores)>LckTrueThresh
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
605
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
606 LynNorm<-1/as.numeric(Lyn[22,1])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
607 LynThresh<-as.numeric(Lyn[24,1])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
608 LynTrueThresh<-((LynThresh*LynNorm)/(100-LynThresh))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
609 LynActive<-unlist(LynGeneratedScores)>LynTrueThresh
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
610
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
611 Pyk2Norm<-1/as.numeric(Pyk2[22,1])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
612 Pyk2Thresh<-as.numeric(Pyk2[24,1])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
613 Pyk2TrueThresh<-((Pyk2Thresh*Pyk2Norm)/(100-Pyk2Thresh))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
614 Pyk2Active<-unlist(Pyk2GeneratedScores)>Pyk2TrueThresh
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
615
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
616 SrcNorm<-1/as.numeric(Src[22,1])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
617 SrcThresh<-as.numeric(Src[24,1])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
618 SrcTrueThresh<-((SrcThresh*SrcNorm)/(100-SrcThresh))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
619 SrcActive<-unlist(SrcGeneratedScores)>SrcTrueThresh
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
620
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
621 SykNorm<-1/as.numeric(Syk[22,1])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
622 SykThresh<-as.numeric(Syk[24,1])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
623 SykTrueThresh<-((SykThresh*SykNorm)/(100-SykThresh))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
624 SykActive<-unlist(SykGeneratedScores)>SykTrueThresh
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
625
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
626 YesNorm<-1/as.numeric(Yes[22,1])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
627 YesThresh<-as.numeric(Yes[24,1])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
628 YesTrueThresh<-((YesThresh*YesNorm)/(100-YesThresh))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
629 YesActive<-unlist(YesGeneratedScores)>YesTrueThresh
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
630
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
631 AllActive<-AblActive+ArgActive+BtkActive+CskActive+FynActive+HckActive+JAk2Active+LckActive+LynActive+Pyk2Active+SrcActive+SykActive+YesActive
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
632 #Btkactive+
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
633
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
634 Scores<-ThisKinGeneratedScores
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
635 ThresholdValues<-ThisKinGenWeirdScore
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
636
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
637 FullMotifs<-rep("Z",times=nrow(GeneratedPeptides))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
638 for (i in 1:nrow(GeneratedPeptides)) {
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
639 motif<-GeneratedPeptides[i,1:15]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
640 motif<-paste(motif,sep = "", collapse = "")
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
641 FullMotifs[i]<-motif
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
642 }
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
643
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
644 PeptidesWithRanks<-cbind.data.frame(FullMotifs,GeneratedPeptides,Scores,ThresholdValues)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
645 PeptidesWithRanks<-cbind.data.frame(PeptidesWithRanks,AllActive,AblActive,ArgActive,BtkActive,CskActive,FynActive,HckActive,JAk2Active,LckActive,LynActive,Pyk2Active,SrcActive,SykActive,YesActive)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
646 RanksPeptides<-PeptidesWithRanks[order(PeptidesWithRanks$AllActive,decreasing = FALSE),]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
647 # PepRankHead<-c(1:9,"Sequence","RPMS","PMS")
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
648 # RanksPeptides<-rbind.data.frame(PepRankHead,PeptidesWithRanks)
9
f80306fc5d69 Uploaded
jfb
parents: 4
diff changeset
649 #head(RanksPeptides)
4
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
650
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
651
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
652 #now I have to score the negative sequences... for some reason
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
653 #write up how we transfect with lipofectamine
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
654 #3,4,5 questions
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
655
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
656 #PAUSED EHRE AT 4:50, HOPING THAT FIXING MINERVOTHING SO THAT LEFT SPACES WORKS FIXES A THING. OTHERWISE
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
657 #I FUCKED WITH THE MCC TABLE AND NEED TO FINISH IT
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
658
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
659 ThisKinBlanks<-rep(1,times=17)
9
f80306fc5d69 Uploaded
jfb
parents: 4
diff changeset
660 #indx <- sapply(breast, is.factor)
f80306fc5d69 Uploaded
jfb
parents: 4
diff changeset
661 #ThisKinTable[indx] <- lapply(ThisKinTable[indx], function(x) as.character(x))
f80306fc5d69 Uploaded
jfb
parents: 4
diff changeset
662 ThisKinTable$SetOfAAs<-as.character(ThisKinTable$SetOfAAs)
f80306fc5d69 Uploaded
jfb
parents: 4
diff changeset
663
f80306fc5d69 Uploaded
jfb
parents: 4
diff changeset
664 #ThisKinTest<-rbind.data.frame(ThisKinTable,ThisKinBlanks)
f80306fc5d69 Uploaded
jfb
parents: 4
diff changeset
665 ThisKinTable<-rbind.data.frame(ThisKinTable,ThisKinBlanks)
4
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
666
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
667 NegativeScores<-rep(NA,times=nrow(NegativeSubstrateList))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
668 NegativeWeirdScores<-rep(NA,times=nrow(NegativeSubstrateList))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
669 for (v in 1:nrow(NegativeSubstrateList)) {
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
670 motif<-NegativeSubstrateList[v,2]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
671 motif<-unlist(strsplit(motif,""))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
672 #if (length(motif)<9){print(v)}}
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
673 # motif[1] <- sapply(motif[1], function (x) aa_props[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
674 # motif[2] <- sapply(motif[2], function (x) aa_props[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
675 # motif[3] <- sapply(motif[3], function (x) aa_props[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
676 # motif[4] <- sapply(motif[4], function (x) aa_props[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
677 # motif[5] <- sapply(motif[5], function (x) aa_props[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
678 # motif[6] <- sapply(motif[6], function (x) aa_props[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
679 # motif[7] <- sapply(motif[7], function (x) aa_props[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
680 # motif[8] <- sapply(motif[8], function (x) aa_props[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
681 # motif[9] <- sapply(motif[9], function (x) aa_props[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
682 motif<- gsub(" ","O",motif)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
683 motif <- sapply(motif, function (x) aa_props[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
684 Scoringpeptide<-motif
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
685 Scoringpeptide<-Scoringpeptide+1
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
686 ThisKinTableScore<-as.numeric(ThisKinTable[Scoringpeptide[1],3])*ThisKinTable[as.numeric(Scoringpeptide[2]),4]*ThisKinTable[as.numeric(Scoringpeptide[3]),5]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
687 ThisKinTable[as.numeric(Scoringpeptide[4]),6]*ThisKinTable[as.numeric(Scoringpeptide[5]),7]*ThisKinTable[as.numeric(Scoringpeptide[6]),8]*ThisKinTable[as.numeric(Scoringpeptide[7]),9]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
688 #ThisKinTable[as.numeric(Scoringpeptide[8]),10]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
689 ThisKinTable[as.numeric(Scoringpeptide[9]),11]*ThisKinTable[as.numeric(Scoringpeptide[10]),12]*ThisKinTable[as.numeric(Scoringpeptide[11]),13]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
690 ThisKinTable[as.numeric(Scoringpeptide[12]),14]*ThisKinTable[as.numeric(Scoringpeptide[13]),15]*ThisKinTable[as.numeric(Scoringpeptide[14]),16]*ThisKinTable[as.numeric(Scoringpeptide[15]),17]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
691 NegativeScores[v]<-ThisKinTableScore
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
692 ThisKinTableScore<-(ThisKinTableScore/(ThisKinTableScore+1/as.numeric(NormalizationScore[2])))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
693 NegativeWeirdScores[v]<-ThisKinTableScore*100
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
694 }
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
695
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
696 negativesubstrates<-NegativeSubstrateList[,2]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
697 NegativeWithScores<-cbind(negativesubstrates,as.character(NegativeScores),as.character(NegativeWeirdScores))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
698
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
699
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
700 #NEED TO HAVE THE NEGATIVE SUBSTRATES BE OUTPUTTED
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
701
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
702 PositiveScores<-rep(NA,times=nrow(ImportedSubstrateList))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
703 PositiveWeirdScores<-rep(NA,times=nrow(ImportedSubstrateList))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
704
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
705 for (v in 1:nrow(ImportedSubstrateList)) {
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
706 motif<-ImportedSubstrateList[v,4:18]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
707 motif<-unlist(motif)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
708 motif<- gsub("^$","O",motif)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
709 motif <- sapply(motif, function (x) aa_props[x])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
710 Scoringpeptide<-motif
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
711 Scoringpeptide<-Scoringpeptide+1
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
712 ThisKinTableScore<-as.numeric(ThisKinTable[Scoringpeptide[1],3])*ThisKinTable[as.numeric(Scoringpeptide[2]),4]*ThisKinTable[as.numeric(Scoringpeptide[3]),5]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
713 ThisKinTable[as.numeric(Scoringpeptide[4]),6]*ThisKinTable[as.numeric(Scoringpeptide[5]),7]*ThisKinTable[as.numeric(Scoringpeptide[6]),8]*ThisKinTable[as.numeric(Scoringpeptide[7]),9]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
714 #ThisKinTable[as.numeric(Scoringpeptide[8]),10]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
715 ThisKinTable[as.numeric(Scoringpeptide[9]),11]*ThisKinTable[as.numeric(Scoringpeptide[10]),12]*ThisKinTable[as.numeric(Scoringpeptide[11]),13]*
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
716 ThisKinTable[as.numeric(Scoringpeptide[12]),14]*ThisKinTable[as.numeric(Scoringpeptide[13]),15]*ThisKinTable[as.numeric(Scoringpeptide[14]),16]*ThisKinTable[as.numeric(Scoringpeptide[15]),17]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
717
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
718 PositiveScores[v]<-ThisKinTableScore
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
719 ThisKinTableScore<-(ThisKinTableScore/(ThisKinTableScore+1/as.numeric(NormalizationScore[2])))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
720 PositiveWeirdScores[v]<-ThisKinTableScore*100
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
721 }
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
722
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
723 positivesubstrates<-ImportedSubstrateList[,4:18]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
724 positivewithscores<-cbind.data.frame(positivesubstrates,PositiveScores,PositiveWeirdScores)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
725
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
726
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
727 #write down the transient transfection SOP and what we will be doing with them
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
728 #write down the vector names I will be using
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
729 #write down something about transforming bacteria and with what
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
730
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
731 #90% whatevernness
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
732 # TPninetyone<-length(PositiveWeirdScores[PositiveWeirdScores>=0.91])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
733 # Senseninetyone<-TPninetyone/nrow(positivesubstrates)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
734 #
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
735 # TNninetyone<-length(NegativeWeirdScores[NegativeWeirdScores<91])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
736 # Specninetyone<-TNninetyone/100
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
737
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
738 #create the MCC table
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
739
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
740 threshold<-c(1:100)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
741 threshold<-order(threshold,decreasing = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
742
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
743 Truepositives<-c(1:100)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
744 Falsenegatives<-c(1:100)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
745 Sensitivity<-c(1:100)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
746 TrueNegatives<-c(1:100)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
747 FalsePositives<-c(1:100)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
748 Specificity<-c(1:100)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
749 Accuracy<-c(1:100)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
750 MCC<-c(1:100)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
751 EER<-c(1:100)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
752
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
753 #MAKE DAMN SURE THAT THE ACCESSION NUMBERS FOLLOW THE MOTIFS
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
754
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
755 for (z in 1:100) {
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
756 thres<-101-z
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
757 Truepositives[z]<-length(PositiveWeirdScores[PositiveWeirdScores>=(thres)])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
758 Falsenegatives[z]<-nrow(positivesubstrates)-Truepositives[z]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
759 Sensitivity[z]<-Truepositives[z]/(Falsenegatives[z]+Truepositives[z])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
760 TrueNegatives[z]<-length(NegativeWeirdScores[NegativeWeirdScores<(thres)])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
761 # at thresh 100 this should be 0, because it is total minus true negatives
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
762 FalsePositives[z]<-nrow(NegativeSubstrateList)-TrueNegatives[z]
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
763 Specificity[z]<-1-(TrueNegatives[z]/(FalsePositives[z]+TrueNegatives[z]))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
764 Accuracy[z]<-100*(Truepositives[z]+TrueNegatives[z])/(Falsenegatives[z]+FalsePositives[z]+TrueNegatives[z]+Truepositives[z])
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
765 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])))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
766 EER[z]<-.01*(((1-(Sensitivity[z]))*(Truepositives[z]+Falsenegatives[z]))+(Specificity[z]*(1-(Truepositives[z]+Falsenegatives[z]))))
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
767 }
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
768 Characterization<-cbind.data.frame(threshold,Truepositives,Falsenegatives,Sensitivity,TrueNegatives,FalsePositives,Specificity,Accuracy,MCC,EER)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
769
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
770 positiveheader<-c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,"RPMS","PMS")
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
771 positivewithscores<-rbind.data.frame(positiveheader,positivewithscores)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
772
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
773 negativeheader<-c("Substrate","RPMS","PMS")
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
774 colnames(NegativeWithScores)<-negativeheader
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
775
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
776 # write.xlsx(NegativeWithScores,file = FILENAME, sheetName = "Negative Sequences Scored",col.names = TRUE,row.names = FALSE,append = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
777 # write.xlsx(Characterization,file = FILENAME,sheetName = "Characterization Table",col.names = TRUE,row.names = FALSE,append = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
778 # write.xlsx(RanksPeptides,file = FILENAME,sheetName = "Ranked Generated Peptides",col.names = FALSE,row.names = FALSE,append = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
779 # write.xlsx(positivewithscores,file = FILENAME, sheetName = "Positive Sequences Scored",col.names = FALSE,row.names = FALSE,append = TRUE)
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
780 write.table(x=c("Characterzation Table"),file = FILENAME2, col.names = FALSE,row.names = FALSE, append = TRUE,sep = ",")
9
f80306fc5d69 Uploaded
jfb
parents: 4
diff changeset
781 header<-colnames(Characterization)
f80306fc5d69 Uploaded
jfb
parents: 4
diff changeset
782 Characterization<-rbind.data.frame(header,Characterization)
f80306fc5d69 Uploaded
jfb
parents: 4
diff changeset
783 write.table(Characterization,file = FILENAME2, col.names = FALSE,row.names = FALSE, append = TRUE,sep = ",")
f80306fc5d69 Uploaded
jfb
parents: 4
diff changeset
784
f80306fc5d69 Uploaded
jfb
parents: 4
diff changeset
785 # header<-colnames(RanksPeptides)
f80306fc5d69 Uploaded
jfb
parents: 4
diff changeset
786 # RanksPeptides<-rbind.data.frame(header,RanksPeptides)
f80306fc5d69 Uploaded
jfb
parents: 4
diff changeset
787 write.table(RanksPeptides,file = FILENAME3,append = FALSE,row.names = FALSE,col.names = TRUE,sep = ",")
4
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
788
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
789
2f3df9b1c05b Uploaded
jfb
parents:
diff changeset
790