Commit bd075e8c by Mustafa Tekpinar

Added mt.20.txt, namely full alphabet!

parent 2eef3ef9
P
G
E
K
R
Q
D
S
N
T
H
C
I
V
W
Y
F
A
L
M
......@@ -50,6 +50,9 @@ if(sum(colnames(jet)=="traceMax")==1){trace=jet[,"traceMax"]}else{trace=jet[,"tr
# compute evolutionary distances of all sequences with respect to the query
distTrace = binAli[2:N[1],] %*% trace^2
# print("Printing evolutionary distance matrix")
# print(distTrace)
wt=read.fasta(paste(prot,".fasta",sep=""))
n = length(wt[[1]])
wt = wt[[1]][1:n]
......@@ -219,7 +222,7 @@ print(paste("Reading frequencies:"))
for (row in 1:nrow(jet)) {
frequencies<-append(frequencies, jet[row, "freq"] )
}
print(frequencies)
#print(frequencies)
freq_mean = mean(frequencies)
#alpha = 0.6
......@@ -238,7 +241,7 @@ for (row in 1:nrow(jet)) {
# alpha<-append(alpha, (1.0 - alpha_val))
# }
# }
print(alpha)
# print(alpha)
......
......@@ -512,7 +512,7 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N, jetfile, pdbfile, normWeightMode,
print(" Can not generate "+prot+"_normPred_evolCombi.png file!")
print("done")
cleanTheMess(prot,bFile,fFile, chainID=chains[0])
#cleanTheMess(prot,bFile,fFile, chainID=chains[0])
def main():
......
......@@ -169,6 +169,12 @@ def launchJET(prot, retMet, bFile, fFile, pdbfile, chains, n, N, nl):
reCode=subprocess.call(jetcmd,shell=True)
if os.path.isfile(prot+"/"+prot+"_jet.res"):
os.rename(prot+"/"+prot+"_jet.res",prot+"_jet.res")
# # Copy the refined MSA file!
# if os.path.isfile(prot+"/"+prot+"_"+chainID+".fasta"):
# os.rename(prot+"/"+prot+"_"+chainID+".fasta",prot+"_"+chainID+".fasta")
# if os.path.isfile(prot+"/"+prot+"_"+chainID+".psiblast"):
# os.rename(prot+"/"+prot+"_"+chainID+".psiblast",prot+"_"+chainID+".psiblast")
return(reCode)
# Run Rscript to compute predictions
......
......@@ -350,11 +350,23 @@ computePredSimple<-function(mat, distTrace, wt, thresh){
# matAli = convertAliToTrace(mat,trace,wt)
# go over all positions
for(i in 1:leSeq){
res = vector()
for(a in aa){
if(a!=wt[i]){
sel = which(mat[,i]==a)
if(length(sel)>0){sortedDist=sort(distTrace[sel-1])}
# print(sel)
if(length(sel)>0){
sortedDist=sort(distTrace[sel-1])
if((i==694) & (a=="v")) {
print(i)
print(sel)
#print(distTrace[sel-1])
print(sortedDist)
}
}
else{sortedDist = c()}
res = c(res,findMinDist(sortedDist,thresh))
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment