Commit 5ffaa0e3 by Mustafa Tekpinar

Removed unused normWeightMode options in esgemme.py and computePred.R.

parent 4e510021
...@@ -46,88 +46,7 @@ write.table(res[[3]][[3]],paste0(prot,"_pssm80.txt")) ...@@ -46,88 +46,7 @@ write.table(res[[3]][[3]],paste0(prot,"_pssm80.txt"))
jet=read.table(paste(prot,"_jet.res",sep=""),head=TRUE) jet=read.table(paste(prot,"_jet.res",sep=""),head=TRUE)
############################################Added by MT to test effect of PC, CV, DFI, Bfactor etc. ############################################Added by MT to test effect of PC, CV, DFI, Bfactor etc.
trace = c() trace = c()
if((normWeightMode=="maxtracepc") | (normWeightMode=="maxpctrace")){ if ((normWeightMode=="maxhalftracepchalftracecvhalfcvpc")){
print(paste("Using ", normWeightMode))
for (row in 1:nrow(jet)) {
if(sum(colnames(jet)=="traceMax")==1){
trace<-append(trace, max(jet[row, "traceMax"], jet[row, "pc"]))
}else{
trace<-append(trace, max(jet[row, "trace"], jet[row, "pc"]))
}
}
} else if ((normWeightMode=="maxtracecv") | (normWeightMode=="maxcvtrace")){
print(paste("Using ", normWeightMode))
for (row in 1:nrow(jet)) {
if(sum(colnames(jet)=="traceMax")==1){
trace<-append(trace, max(jet[row, "traceMax"], jet[row, "cv"]))
}else{
trace<-append(trace, max(jet[row, "trace"], jet[row, "cv"]))
}
}
} else if ((normWeightMode=="maxtracesc") | (normWeightMode=="maxsctrace")){
print(paste("Using ", normWeightMode))
for (row in 1:nrow(jet)) {
if(sum(colnames(jet)=="traceMax")==1){
trace<-append(trace, max(jet[row, "traceMax"], jet[row, "clusters"]))
}else{
trace<-append(trace, max(jet[row, "trace"], jet[row, "clusters"]))
}
}
} else if ((normWeightMode=="maxtracedfi") | (normWeightMode=="maxdfitrace")){
print(paste("Using ", normWeightMode))
for (row in 1:nrow(jet)) {
if(sum(colnames(jet)=="traceMax")==1){
trace<-append(trace, max(jet[row, "traceMax"], jet[row, "dfi"]))
}else{
trace<-append(trace, max(jet[row, "trace"], jet[row, "dfi"]))
}
}
} else if ((normWeightMode=="maxtracebfactor") | (normWeightMode=="maxbfactortrace")){
print(paste("Using ", normWeightMode))
for (row in 1:nrow(jet)) {
if(sum(colnames(jet)=="traceMax")==1){
trace<-append(trace, max(jet[row, "traceMax"], jet[row, "bfactor"]))
}else{
trace<-append(trace, max(jet[row, "trace"], jet[row, "bfactor"]))
}
}
}else if ((normWeightMode=="maxtracepccv")|(normWeightMode=="maxtracecvpc")){
print(paste("Using ", normWeightMode))
for (row in 1:nrow(jet)) {
if(sum(colnames(jet)=="traceMax")==1){
trace<-append(trace, max(jet[row, "traceMax"], max(jet[row, "pc"], jet[row, "cv"])))
}else{
trace<-append(trace, max(jet[row, "trace"], max(jet[row, "pc"], jet[row, "cv"])))
}
}
}else if ((normWeightMode=="maxtracepcsc")|(normWeightMode=="maxtracescpc")){
print(paste("Using ", normWeightMode))
for (row in 1:nrow(jet)) {
if(sum(colnames(jet)=="traceMax")==1){
trace<-append(trace, max(jet[row, "traceMax"], max(jet[row, "pc"], jet[row, "clusters"])))
}else{
trace<-append(trace, max(jet[row, "trace"], max(jet[row, "pc"], jet[row, "clusters"])))
}
}
}else if ((normWeightMode=="maxtracehalfpccv")|(normWeightMode=="maxtracehalfcvpc")){
print(paste("Using ", normWeightMode))
for (row in 1:nrow(jet)) {
if(sum(colnames(jet)=="traceMax")==1){
trace<-append(trace, max(jet[row, "traceMax"], (jet[row, "pc"]+jet[row, "cv"])/2.0 ))
}else{
trace<-append(trace, max(jet[row, "trace"], (jet[row, "pc"]+jet[row, "cv"])/2.0 ))
}
}
}else if ((normWeightMode=="maxtracehalftracecvhalfcvpc")){
print(paste("Using ", normWeightMode))
for (row in 1:nrow(jet)) {
if(sum(colnames(jet)=="traceMax")==1){
trace<-append(trace, max(jet[row, "traceMax"], max((jet[row, "traceMax"]+jet[row, "cv"])/2.0, (jet[row, "pc"]+jet[row, "cv"])/2.0 )))
}else{
trace<-append(trace, max(jet[row, "trace"], max((jet[row, "trace"]+jet[row, "cv"])/2.0, (jet[row, "pc"]+jet[row, "cv"])/2.0 )))
}
}
}else if ((normWeightMode=="maxhalftracepchalftracecvhalfcvpc")){
print(paste("Using ", normWeightMode)) print(paste("Using ", normWeightMode))
for (row in 1:nrow(jet)) { for (row in 1:nrow(jet)) {
if(sum(colnames(jet)=="traceMax")==1){ if(sum(colnames(jet)=="traceMax")==1){
...@@ -136,47 +55,6 @@ if((normWeightMode=="maxtracepc") | (normWeightMode=="maxpctrace")){ ...@@ -136,47 +55,6 @@ if((normWeightMode=="maxtracepc") | (normWeightMode=="maxpctrace")){
trace<-append(trace, max((jet[row, "trace"]+jet[row, "pc"])/2.0, max((jet[row, "trace"]+jet[row, "cv"])/2.0, (jet[row, "pc"]+jet[row, "cv"])/2.0 ))) trace<-append(trace, max((jet[row, "trace"]+jet[row, "pc"])/2.0, max((jet[row, "trace"]+jet[row, "cv"])/2.0, (jet[row, "pc"]+jet[row, "cv"])/2.0 )))
} }
} }
}else if ((normWeightMode=="jetormax")){
print(paste("Using ", normWeightMode))
for (row in 1:nrow(jet)) {
if(sum(colnames(jet)=="traceMax")==1){
maxValue = max((jet[row, "traceMax"]+jet[row, "pc"])/2.0, max((jet[row, "traceMax"]+jet[row, "cv"])/2.0, (jet[row, "pc"]+jet[row, "cv"])/2.0 ))
traceValue = jet[row, "traceMax"]
trace<-append(trace, max((traceValue), (maxValue)))
}else{
maxValue = max((jet[row, "trace"]+jet[row, "pc"])/2.0, max((jet[row, "trace"]+jet[row, "cv"])/2.0, (jet[row, "pc"]+jet[row, "cv"])/2.0 ))
traceValue = jet[row, "trace"]
trace<-append(trace, max((traceValue), (maxValue)))
}
}
}else if ((normWeightMode=="maxtracepchalfpccv")){
print(paste("Using ", normWeightMode))
for (row in 1:nrow(jet)) {
if(sum(colnames(jet)=="traceMax")==1){
trace<-append(trace, max(jet[row, "traceMax"], max(jet[row, "pc"], (jet[row, "pc"]+jet[row, "cv"])/2.0 )))
}else{
trace<-append(trace, max(jet[row, "trace"], max(jet[row, "pc"], (jet[row, "pc"]+jet[row, "cv"])/2.0 ) ))
}
}
}else if ((normWeightMode=="halfcvpc") | (normWeightMode=="halfpccv")){
print(paste("Using ", normWeightMode))
for (row in 1:nrow(jet)) {
trace<-append(trace, (jet[row, "pc"]+jet[row, "cv"])/2.0)
}
}else if ((normWeightMode=="halftracepc") | (normWeightMode=="halfpctrace")){
print(paste("Using ", normWeightMode))
for (row in 1:nrow(jet)) {
if(sum(colnames(jet)=="traceMax")==1){
trace<-append(trace, (jet[row, "traceMax"]+jet[row, "pc"])/2.0)
}else{
trace<-append(trace, (jet[row, "trace"]+jet[row, "pc"])/2.0)
}
}
} else if ((normWeightMode=="maxcvpc") | (normWeightMode=="maxpccv")){
print(paste("Using ", normWeightMode))
for (row in 1:nrow(jet)) {
trace<-append(trace, max(jet[row, "pc"], jet[row, "cv"]))
}
}else if (normWeightMode=="trace"){ }else if (normWeightMode=="trace"){
print("Using only JET2 traces") print("Using only JET2 traces")
for (row in 1:nrow(jet)) { for (row in 1:nrow(jet)) {
...@@ -186,13 +64,6 @@ if((normWeightMode=="maxtracepc") | (normWeightMode=="maxpctrace")){ ...@@ -186,13 +64,6 @@ if((normWeightMode=="maxtracepc") | (normWeightMode=="maxpctrace")){
trace<-append(trace, jet[row, "trace"]) trace<-append(trace, jet[row, "trace"])
} }
} }
}else if (normWeightMode=="tracemovingaverage"){
print("Using only tracemovingaverage")
for (row in 1:nrow(jet)) {
trace<-append(trace, jet[row, "tracemovingaverage"])
}
print("Here is the tracemovingaverage!")
print(trace)
}else if (normWeightMode=="cv"){ }else if (normWeightMode=="cv"){
print("Using only CV traces") print("Using only CV traces")
for (row in 1:nrow(jet)) { for (row in 1:nrow(jet)) {
...@@ -203,16 +74,6 @@ if((normWeightMode=="maxtracepc") | (normWeightMode=="maxpctrace")){ ...@@ -203,16 +74,6 @@ if((normWeightMode=="maxtracepc") | (normWeightMode=="maxpctrace")){
for (row in 1:nrow(jet)) { for (row in 1:nrow(jet)) {
trace<-append(trace, jet[row, "pc"]) trace<-append(trace, jet[row, "pc"])
} }
}else if (normWeightMode=="dfi"){
print("Using only DFI values")
for (row in 1:nrow(jet)) {
trace<-append(trace, jet[row, "dfi"])
}
}else if (normWeightMode=="bfactor"){
print("Using only Bfactor values")
for (row in 1:nrow(jet)) {
trace<-append(trace, jet[row, "bfactor"])
}
}else if (normWeightMode=="ssjetormax"){ }else if (normWeightMode=="ssjetormax"){
print("Using only ssjetormax") print("Using only ssjetormax")
for (row in 1:nrow(jet)) { for (row in 1:nrow(jet)) {
...@@ -226,9 +87,8 @@ if((normWeightMode=="maxtracepc") | (normWeightMode=="maxpctrace")){ ...@@ -226,9 +87,8 @@ if((normWeightMode=="maxtracepc") | (normWeightMode=="maxpctrace")){
}else{ }else{
print("ERROR: Unknown --normWeightMode selected!") print("ERROR: Unknown --normWeightMode selected!")
print("It can only be 'trace', 'tracemovingaverage', 'pc', 'cv', 'dfi', 'bfactor',") print("It can only be 'trace', 'pc', 'cv',")
print(" 'maxtracepc', 'maxtracecv', 'maxtracepccv', 'halfcvpc', 'halftracepc', 'maxtracepchalfpccv',") print("'maxhalftracepchalftracecvhalfcvpc'")
print(" 'maxtracesc', 'maxtracescpc', 'maxtracedfi', 'maxtracebfactor', 'maxhalftracepchalftracecvhalfcvpc'")
print(" or 'ssjetormax'!") print(" or 'ssjetormax'!")
} }
print(trace) print(trace)
...@@ -343,8 +203,6 @@ alpha = 0.6 ...@@ -343,8 +203,6 @@ alpha = 0.6
# } # }
#print(alpha) #print(alpha)
#alphabet = "lz-bl.7" #alphabet = "lz-bl.7"
alphabet = selectedAlphabet alphabet = selectedAlphabet
if(simple){ if(simple){
......
...@@ -847,38 +847,10 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N, jetfile, pdbfile, normWeightMode, ...@@ -847,38 +847,10 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N, jetfile, pdbfile, normWeightMode,
if( (normWeightMode != 'trace') and \ if( (normWeightMode != 'trace') and \
(normWeightMode != 'cv') and \ (normWeightMode != 'cv') and \
(normWeightMode != 'pc') and \ (normWeightMode != 'pc') and \
(normWeightMode != 'dfi') and \
(normWeightMode != 'bfactor') and \
(normWeightMode != 'maxtracepc') and \
(normWeightMode != 'maxpctrace') and \
(normWeightMode != 'maxpccv') and \
(normWeightMode != 'maxcvpc') and \
(normWeightMode != 'maxtracecv') and \
(normWeightMode != 'maxtracesc') and \
(normWeightMode != 'maxcvtrace') and \
(normWeightMode != 'maxtracedfi') and \
(normWeightMode != 'maxtracebfactor') and \
(normWeightMode != 'maxdfitrace') and \
(normWeightMode != 'maxbfactortrace') and \
(normWeightMode != 'maxtracepccv') and \
(normWeightMode != 'maxtracepcsc') and \
(normWeightMode != 'maxtracepchalfpccv') and \
(normWeightMode != 'maxtracecvpc') and \
(normWeightMode != 'halfpccv') and \
(normWeightMode != 'halfcvpc') and \
(normWeightMode != 'halftracepc') and \
(normWeightMode != 'maxtracehalfcvpc') and \
(normWeightMode != 'maxtracehalftracecvhalfcvpc') and \
(normWeightMode != 'maxhalftracepchalftracecvhalfcvpc') and \ (normWeightMode != 'maxhalftracepchalftracecvhalfcvpc') and \
(normWeightMode != 'jetormax') and \ (normWeightMode != 'ssjetormax')):
(normWeightMode != 'ssjetormax') and \ print("ERROR: normWeightMode can only be 'trace', 'cv', 'pc', "+\
(normWeightMode != 'tracemovingaverage') and \ "'maxhalftracepchalftracecvhalfcvpc' or 'ssjetormax'!")
(normWeightMode != 'maxtracehalfpccv')):
print("ERROR: normWeightMode can only be 'trace', 'tracemovingaverage', 'cv', 'pc', 'dfi', bfactor,\n"+\
" 'maxtracepc', 'maxtracedfi', 'maxpccv', 'maxtracesc',"+\
" 'maxtracebfactor', 'maxtracepcsc', 'maxhalftracepchalftracecvhalfcvpc', "+\
" 'maxtracecv', 'maxtracepccv', maxtracepchalfpccv"+\
" 'halfcvpc', 'halftracepc', 'maxtracehalfcvpc', 'maxtracehalftracecvhalfcvpc' or 'ssjetormax'!")
sys.exit(-1) sys.exit(-1)
structure = parsePDB(prot+".pdb") structure = parsePDB(prot+".pdb")
......
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