Commit e82bf1a9 by Mustafa Tekpinar

Added more options to the normweightmode!

parent 00a298ae
......@@ -127,16 +127,26 @@ if((normWeightMode=="max-trace-pc") | (normWeightMode=="max-pc-trace")){
trace<-append(trace, max(jet[row, "trace"], max(jet[row, "pc"], jet[row, "cv"])))
}
}
} else if ((normWeightMode=="half-cv+pc") | (normWeightMode=="half-pc+cv")){
} else if ((normWeightMode=="max-trace-half-pc+cv")|(normWeightMode=="max-trace-half-cv+pc")){
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"]))
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=="half-cv+pc") | (normWeightMode=="half-pc+cv")){
print(paste("Using ", normWeightMode))
for (row in 1:nrow(jet)) {
trace<-append(trace, (jet[row, "pc"]+jet[row, "cv"])/2.0)
}
} else if ((normWeightMode=="max-cv-pc") | (normWeightMode=="max-pc-cv")){
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")
for (row in 1:nrow(jet)) {
if(sum(colnames(jet)=="traceMax")==1){
......@@ -145,9 +155,19 @@ if((normWeightMode=="max-trace-pc") | (normWeightMode=="max-pc-trace")){
trace<-append(trace, jet[row, "trace"])
}
}
}else if (normWeightMode=="cv"){
print("Using only CV traces")
for (row in 1:nrow(jet)) {
trace<-append(trace, jet[row, "cv"])
}
}else if (normWeightMode=="pc"){
print("Using only PC traces")
for (row in 1:nrow(jet)) {
trace<-append(trace, jet[row, "pc"])
}
}else{
print("ERROR: Unknown --normWeightMode selected!")
print("It can only be 'trace', 'max-trace-pc', 'max-trace-cv', 'max-trace-pc-cv' or 'half-cv+pc'!")
print("It can only be 'trace', 'pc', 'cv', 'max-trace-pc', 'max-trace-cv', 'max-trace-pc-cv' or 'half-cv+pc'!")
}
print(trace)
......
......@@ -304,15 +304,21 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N, jetfile, pdbfile, normWeightMode)
print("query protein: "+prot)
if( (normWeightMode != 'trace') and \
(normWeightMode != 'cv') and \
(normWeightMode != 'pc') and \
(normWeightMode != 'max-trace-pc') and \
(normWeightMode != 'max-pc-trace') and \
(normWeightMode != 'max-pc-cv') and \
(normWeightMode != 'max-cv-pc') and \
(normWeightMode != 'max-trace-cv') and \
(normWeightMode != 'max-cv-trace') and \
(normWeightMode != 'max-trace-pc-cv') and \
(normWeightMode != 'max-trace-cv-pc') and \
(normWeightMode != 'half-pc+cv') and \
(normWeightMode != 'half-cv+pc')):
print("ERROR: normWeightMode can only be 'trace', 'max-trace-pc', 'max-trace-cv', 'max-trace-pc-cv' or 'half-cv+pc'!")
(normWeightMode != 'half-cv+pc') and \
(normWeightMode != 'max-trace-half-cv+pc') and \
(normWeightMode != 'max-trace-half-pc+cv')):
print("ERROR: normWeightMode can only be 'trace', 'cv', 'pc', 'max-trace-pc', 'max-pc-cv', 'max-trace-cv', 'max-trace-pc-cv', 'half-cv+pc' or max-trace-half-cv+pc!")
sys.exit(-1)
if((jetfile) == None):
......
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