Commit 4e510021 by Mustafa Tekpinar

Removed some commented/unused code from computePred.R

parent 4e82cee0
...@@ -283,122 +283,6 @@ write.table(evolDist,paste0(prot,"_pred_evolEpi.txt")) ...@@ -283,122 +283,6 @@ write.table(evolDist,paste0(prot,"_pred_evolEpi.txt"))
print("done") print("done")
print("running normalization...") print("running normalization...")
#normWeightMode="trace+pc+cv"
#normWeightMode="trace+pc"
#normWeightMode="trace+cv"
#normWeightMode="trace"
#print(normWeightMode)
#In future, you may need to comment line 44 to use this functionality if you do
#weighting not just in normalization.
#This part of the code obtains max values of Trace, PC, or CV for weighting the
#normalized results.
# 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=="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=="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=="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=="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)) {
# if(sum(colnames(jet)=="traceMax")==1){
# trace<-append(trace, jet[row, "traceMax"])
# }else{
# 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)) {
# 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 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{
# print("ERROR: Unknown --normWeightMode selected!")
# print("It can only be 'trace', 'tracemovingaverage', 'pc', 'cv', 'dfi', 'bfactor', 'maxtracepc', 'maxtracecv', 'maxtracepccv', 'halfcvpc', 'maxtracedfi' or 'maxtracebfactor'!")
# }
#print(trace)
if(simple){ if(simple){
#Independent model normalization #Independent model normalization
......
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