Mercurial > repos > jfb > kinatest_7_7
changeset 9:9eb8e3c3bac6 draft
Uploaded
author | jfb |
---|---|
date | Wed, 28 Feb 2018 13:42:27 -0500 |
parents | bdf3a0688d67 |
children | 493658aefce8 |
files | kinatestid_r/Kinatest-R.R |
diffstat | 1 files changed, 52 insertions(+), 48 deletions(-) [+] |
line wrap: on
line diff
--- a/kinatestid_r/Kinatest-R.R Wed Feb 28 11:09:09 2018 -0500 +++ b/kinatestid_r/Kinatest-R.R Wed Feb 28 13:42:27 2018 -0500 @@ -1187,71 +1187,75 @@ # if (length(Positionp7)<1){Positionp7<-which(bareSDs[,15]==max(bareSDs[,15]))} + + +# Positionm7<-which(goodones[,1] %in% TRUE) +# if (length(Positionm7)<1){Positionm7<-which(bareSDs[,1]==max(bareSDs[,1]))} +# Positionm6<-which(goodones[,2] %in% TRUE) +# if (length(Positionm6)<1){Positionm6<-which(bareSDs[,2]==max(bareSDs[,2]))} +# Positionm5<-which(goodones[,3] %in% TRUE) +# if (length(Positionm5)<1){Positionm5<-which(bareSDs[,3]==max(bareSDs[,3]))} +# Positionm4<-which(goodones[,4] %in% TRUE) +# if (length(Positionm4)<1){Positionm4<-which(bareSDs[,4]==max(bareSDs[,4]))} +# Positionm3<-which(goodones[,5] %in% TRUE) +# if (length(Positionm3)<1){Positionm3<-which(bareSDs[,5]==max(bareSDs[,5]))} +# Positionm2<-which(goodones[,6] %in% TRUE) +# if (length(Positionm2)<1){Positionm2<-which(bareSDs[,6]==max(bareSDs[,6]))} +# Positionm1<-which(goodones[,7] %in% TRUE) +# if (length(Positionm1)<1){Positionm1<-which(bareSDs[,7]==max(bareSDs[,7]))} +# +# Positiond0<-which(goodones[,8] %in% TRUE) +# if (length(Positiond0)<1){Positiond0<-which(bareSDs[,8]==max(bareSDs[,8]))} +# +# Positionp1<-which(goodones[,9] %in% TRUE) +# if (length(Positionp1)<1){Positionp1<-which(bareSDs[,9]==max(bareSDs[,9]))} +# Positionp2<-which(goodones[,10] %in% TRUE) +# if (length(Positionp2)<1){Positionp2<-which(bareSDs[,10]==max(bareSDs[,10]))} +# Positionp3<-which(goodones[,11] %in% TRUE) +# if (length(Positionp3)<1){Positionp3<-which(bareSDs[,11]==max(bareSDs[,11]))} +# Positionp4<-which(goodones[,12] %in% TRUE) +# if (length(Positionp4)<1){Positionp4<-which(bareSDs[,12]==max(bareSDs[,12]))} +# Positionp5<-which(goodones[,13] %in% TRUE) +# if (length(Positionp5)<1){Positionp5<-which(bareSDs[,13]==max(bareSDs[,13]))} +# Positionp6<-which(goodones[,14] %in% TRUE) +# if (length(Positionp6)<1){Positionp6<-which(bareSDs[,14]==max(bareSDs[,14]))} +# Positionp7<-which(goodones[,15] %in% TRUE) +# if (length(Positionp7)<1){Positionp7<-which(bareSDs[,15]==max(bareSDs[,15]))} + +match(c(bareSDs[,2][order(bareSDs[,2])[1:2]]),bareSDs[,2]) + Positionm7<-which(goodones[,1] %in% TRUE) -if (length(Positionm7)<1){Positionm7<-which(bareSDs[,1]==max(bareSDs[,1]))} +if (length(Positionm7)<3){Positionm7<-match(c(bareSDs[,1][order(bareSDs[,1])[1:2]]),bareSDs[,1])} Positionm6<-which(goodones[,2] %in% TRUE) -if (length(Positionm6)<1){Positionm6<-which(bareSDs[,2]==max(bareSDs[,2]))} +if (length(Positionm6)<3){Positionm6<-match(c(bareSDs[,2][order(bareSDs[,2])[1:2]]),bareSDs[,2])} Positionm5<-which(goodones[,3] %in% TRUE) -if (length(Positionm5)<1){Positionm5<-which(bareSDs[,3]==max(bareSDs[,3]))} +if (length(Positionm5)<3){Positionm5<-match(c(bareSDs[,3][order(bareSDs[,3])[1:2]]),bareSDs[,3])} Positionm4<-which(goodones[,4] %in% TRUE) -if (length(Positionm4)<1){Positionm4<-which(bareSDs[,4]==max(bareSDs[,4]))} +if (length(Positionm4)<3){Positionm4<-match(c(bareSDs[,4][order(bareSDs[,4])[1:2]]),bareSDs[,4])} Positionm3<-which(goodones[,5] %in% TRUE) -if (length(Positionm3)<1){Positionm3<-which(bareSDs[,5]==max(bareSDs[,5]))} +if (length(Positionm3)<3){Positionm3<-match(c(bareSDs[,5][order(bareSDs[,5])[1:2]]),bareSDs[,5])} Positionm2<-which(goodones[,6] %in% TRUE) -if (length(Positionm2)<1){Positionm2<-which(bareSDs[,6]==max(bareSDs[,6]))} +if (length(Positionm2)<3){Positionm2<-match(c(bareSDs[,6][order(bareSDs[,6])[1:2]]),bareSDs[,6])} Positionm1<-which(goodones[,7] %in% TRUE) -if (length(Positionm1)<1){Positionm1<-which(bareSDs[,7]==max(bareSDs[,7]))} +if (length(Positionm1)<3){Positionm1<-match(c(bareSDs[,7][order(bareSDs[,7])[1:2]]),bareSDs[,7])} Positiond0<-which(goodones[,8] %in% TRUE) -if (length(Positiond0)<1){Positiond0<-which(bareSDs[,8]==max(bareSDs[,8]))} +#if (length(Positiond0)<3){Positiond0<-bareSDs[,8][order(bareSDs[,8])[1:2]]} Positionp1<-which(goodones[,9] %in% TRUE) -if (length(Positionp1)<1){Positionp1<-which(bareSDs[,9]==max(bareSDs[,9]))} +if (length(Positionp1)<3){Positionp1<-match(c(bareSDs[,9][order(bareSDs[,9])[1:2]]),bareSDs[,9])} Positionp2<-which(goodones[,10] %in% TRUE) -if (length(Positionp2)<1){Positionp2<-which(bareSDs[,10]==max(bareSDs[,10]))} +if (length(Positionp2)<3){Positionp2<-match(c(bareSDs[,10][order(bareSDs[,10])[1:2]]),bareSDs[,10])} Positionp3<-which(goodones[,11] %in% TRUE) -if (length(Positionp3)<1){Positionp3<-which(bareSDs[,11]==max(bareSDs[,11]))} +if (length(Positionp3)<3){Positionp3<-match(c(bareSDs[,11][order(bareSDs[,11])[1:2]]),bareSDs[,11])} Positionp4<-which(goodones[,12] %in% TRUE) -if (length(Positionp4)<1){Positionp4<-which(bareSDs[,12]==max(bareSDs[,12]))} +if (length(Positionp4)<3){Positionp4<-match(c(bareSDs[,12][order(bareSDs[,12])[1:2]]),bareSDs[,12])} Positionp5<-which(goodones[,13] %in% TRUE) -if (length(Positionp5)<1){Positionp5<-which(bareSDs[,13]==max(bareSDs[,13]))} +if (length(Positionp5)<3){Positionp5<-match(c(bareSDs[,13][order(bareSDs[,13])[1:2]]),bareSDs[,13])} Positionp6<-which(goodones[,14] %in% TRUE) -if (length(Positionp6)<1){Positionp6<-which(bareSDs[,14]==max(bareSDs[,14]))} +if (length(Positionp6)<3){Positionp6<-match(c(bareSDs[,14][order(bareSDs[,14])[1:2]]),bareSDs[,14])} Positionp7<-which(goodones[,15] %in% TRUE) -if (length(Positionp7)<1){Positionp7<-which(bareSDs[,15]==max(bareSDs[,15]))} - -# Positionm7<-which(goodones[,1] %in% TRUE) -# if (length(Positionm7)<3){Positionm7<-bareSDs[,1][order(bareSDs[,1])[1:3]]} -# Positionm6<-which(goodones[,2] %in% TRUE) -# if (length(Positionm6)<3){Positionm6<-bareSDs[,2][order(bareSDs[,2])[1:3]]} -# Positionm5<-which(goodones[,3] %in% TRUE) -# if (length(Positionm5)<3){Positionm5<-bareSDs[,3][order(bareSDs[,3])[1:3]]} -# Positionm4<-which(goodones[,4] %in% TRUE) -# if (length(Positionm4)<3){Positionm4<-bareSDs[,4][order(bareSDs[,4])[1:3]]} -# Positionm3<-which(goodones[,5] %in% TRUE) -# if (length(Positionm3)<3){Positionm3<-bareSDs[,5][order(bareSDs[,5])[1:3]]} -# Positionm2<-which(goodones[,6] %in% TRUE) -# if (length(Positionm2)<3){Positionm2<-bareSDs[,6][order(bareSDs[,6])[1:3]]} -# Positionm1<-which(goodones[,7] %in% TRUE) -# if (length(Positionm1)<3){Positionm1<-bareSDs[,7][order(bareSDs[,7])[1:3]]} -# -# Positiond0<-which(goodones[,8] %in% TRUE) -# #if (length(Positiond0)<3){Positiond0<-bareSDs[,8][order(bareSDs[,8])[1:3]]} -# -# Positionp1<-which(goodones[,9] %in% TRUE) -# if (length(Positionp1)<3){Positionp1<-bareSDs[,9][order(bareSDs[,9])[1:3]]} -# Positionp2<-which(goodones[,10] %in% TRUE) -# if (length(Positionp2)<3){Positionp2<-bareSDs[,10][order(bareSDs[,10])[1:3]]} -# Positionp3<-which(goodones[,11] %in% TRUE) -# if (length(Positionp3)<3){Positionp3<-bareSDs[,11][order(bareSDs[,11])[1:3]]} -# Positionp4<-which(goodones[,12] %in% TRUE) -# if (length(Positionp4)<3){Positionp4<-bareSDs[,12][order(bareSDs[,12])[1:3]]} -# Positionp5<-which(goodones[,13] %in% TRUE) -# if (length(Positionp5)<3){Positionp5<-bareSDs[,13][order(bareSDs[,13])[1:3]]} -# Positionp6<-which(goodones[,14] %in% TRUE) -# if (length(Positionp6)<3){Positionp6<-bareSDs[,14][order(bareSDs[,14])[1:3]]} -# Positionp7<-which(goodones[,15] %in% TRUE) -# if (length(Positionp7)<3){Positionp7<-bareSDs[,15][order(bareSDs[,15])[1:3]]} +if (length(Positionp7)<3){Positionp7<-match(c(bareSDs[,15][order(bareSDs[,15])[1:2]]),bareSDs[,15])} 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",