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"))
jet=read.table(paste(prot,"_jet.res",sep=""),head=TRUE)
############################################Added by MT to test effect of PC, CV, DFI, Bfactor etc.
trace = c()
if((normWeightMode=="maxtracepc") | (normWeightMode=="maxpctrace")){
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")){
if ((normWeightMode=="maxhalftracepchalftracecvhalfcvpc")){
print(paste("Using ", normWeightMode))
for (row in 1:nrow(jet)) {
if(sum(colnames(jet)=="traceMax")==1){
......@@ -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 )))
}
}
}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"){
print("Using only JET2 traces")
for (row in 1:nrow(jet)) {
......@@ -186,13 +64,6 @@ if((normWeightMode=="maxtracepc") | (normWeightMode=="maxpctrace")){
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"){
print("Using only CV traces")
for (row in 1:nrow(jet)) {
......@@ -203,16 +74,6 @@ if((normWeightMode=="maxtracepc") | (normWeightMode=="maxpctrace")){
for (row in 1:nrow(jet)) {
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"){
print("Using only ssjetormax")
for (row in 1:nrow(jet)) {
......@@ -226,9 +87,8 @@ if((normWeightMode=="maxtracepc") | (normWeightMode=="maxpctrace")){
}else{
print("ERROR: Unknown --normWeightMode selected!")
print("It can only be 'trace', 'tracemovingaverage', 'pc', 'cv', 'dfi', 'bfactor',")
print(" 'maxtracepc', 'maxtracecv', 'maxtracepccv', 'halfcvpc', 'halftracepc', 'maxtracepchalfpccv',")
print(" 'maxtracesc', 'maxtracescpc', 'maxtracedfi', 'maxtracebfactor', 'maxhalftracepchalftracecvhalfcvpc'")
print("It can only be 'trace', 'pc', 'cv',")
print("'maxhalftracepchalftracecvhalfcvpc'")
print(" or 'ssjetormax'!")
}
print(trace)
......@@ -343,8 +203,6 @@ alpha = 0.6
# }
#print(alpha)
#alphabet = "lz-bl.7"
alphabet = selectedAlphabet
if(simple){
......
......@@ -847,38 +847,10 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N, jetfile, pdbfile, normWeightMode,
if( (normWeightMode != 'trace') and \
(normWeightMode != 'cv') 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 != 'jetormax') and \
(normWeightMode != 'ssjetormax') and \
(normWeightMode != 'tracemovingaverage') and \
(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'!")
(normWeightMode != 'ssjetormax')):
print("ERROR: normWeightMode can only be 'trace', 'cv', 'pc', "+\
"'maxhalftracepchalftracecvhalfcvpc' or 'ssjetormax'!")
sys.exit(-1)
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