Commit e9dcd04c by Mustafa Tekpinar

Reverted NA values from 2.0 to 0.0 bbc it was causing too much difference in the…

Reverted NA values from 2.0 to 0.0 bbc it was causing too much difference in the epistatic model maps.
parent 606b4597
P
G
E
K
R
Q
D
S
N
T
H
C
I
V
W
Y
F
A
L
M
...@@ -50,9 +50,6 @@ if(sum(colnames(jet)=="traceMax")==1){trace=jet[,"traceMax"]}else{trace=jet[,"tr ...@@ -50,9 +50,6 @@ if(sum(colnames(jet)=="traceMax")==1){trace=jet[,"traceMax"]}else{trace=jet[,"tr
# compute evolutionary distances of all sequences with respect to the query # compute evolutionary distances of all sequences with respect to the query
distTrace = binAli[2:N[1],] %*% trace^2 distTrace = binAli[2:N[1],] %*% trace^2
# print("Printing evolutionary distance matrix")
# print(distTrace)
wt=read.fasta(paste(prot,".fasta",sep="")) wt=read.fasta(paste(prot,".fasta",sep=""))
n = length(wt[[1]]) n = length(wt[[1]])
wt = wt[[1]][1:n] wt = wt[[1]][1:n]
...@@ -222,7 +219,7 @@ print(paste("Reading frequencies:")) ...@@ -222,7 +219,7 @@ print(paste("Reading frequencies:"))
for (row in 1:nrow(jet)) { for (row in 1:nrow(jet)) {
frequencies<-append(frequencies, jet[row, "freq"] ) frequencies<-append(frequencies, jet[row, "freq"] )
} }
#print(frequencies) print(frequencies)
freq_mean = mean(frequencies) freq_mean = mean(frequencies)
#alpha = 0.6 #alpha = 0.6
...@@ -241,7 +238,7 @@ for (row in 1:nrow(jet)) { ...@@ -241,7 +238,7 @@ for (row in 1:nrow(jet)) {
# alpha<-append(alpha, (1.0 - alpha_val)) # alpha<-append(alpha, (1.0 - alpha_val))
# } # }
# } # }
# print(alpha) print(alpha)
......
...@@ -146,7 +146,7 @@ def parseGEMMEoutput(inputFile, verbose): ...@@ -146,7 +146,7 @@ def parseGEMMEoutput(inputFile, verbose):
if item[0] == "\"": if item[0] == "\"":
aaColumn.append(item) aaColumn.append(item)
elif (item == 'NA'): elif (item == 'NA'):
tempList.append(2.0000000) tempList.append(0.0000000)
else: else:
tempList.append(float(item)) tempList.append(float(item))
matrixData.append(tempList) matrixData.append(tempList)
......
...@@ -169,12 +169,6 @@ def launchJET(prot, retMet, bFile, fFile, pdbfile, chains, n, N, nl): ...@@ -169,12 +169,6 @@ def launchJET(prot, retMet, bFile, fFile, pdbfile, chains, n, N, nl):
reCode=subprocess.call(jetcmd,shell=True) reCode=subprocess.call(jetcmd,shell=True)
if os.path.isfile(prot+"/"+prot+"_jet.res"): if os.path.isfile(prot+"/"+prot+"_jet.res"):
os.rename(prot+"/"+prot+"_jet.res",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) return(reCode)
# Run Rscript to compute predictions # Run Rscript to compute predictions
......
...@@ -350,11 +350,11 @@ computePredSimple<-function(mat, distTrace, wt, thresh){ ...@@ -350,11 +350,11 @@ computePredSimple<-function(mat, distTrace, wt, thresh){
# matAli = convertAliToTrace(mat,trace,wt) # matAli = convertAliToTrace(mat,trace,wt)
# go over all positions # go over all positions
for(i in 1:leSeq){ for(i in 1:leSeq){
res = vector() res = vector()
for(a in aa){ for(a in aa){
if(a!=wt[i]){ if(a!=wt[i]){
sel = which(mat[,i]==a) sel = which(mat[,i]==a)
<<<<<<< HEAD
# print(sel) # print(sel)
if(length(sel)>0){ if(length(sel)>0){
sortedDist=sort(distTrace[sel-1]) sortedDist=sort(distTrace[sel-1])
...@@ -367,6 +367,9 @@ computePredSimple<-function(mat, distTrace, wt, thresh){ ...@@ -367,6 +367,9 @@ computePredSimple<-function(mat, distTrace, wt, thresh){
} }
} }
=======
if(length(sel)>0){sortedDist=sort(distTrace[sel-1])}
>>>>>>> parent of bd075e8... Added mt.20.txt, namely full alphabet!
else{sortedDist = c()} else{sortedDist = c()}
res = c(res,findMinDist(sortedDist,thresh)) 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