Commit 9874e7e7 by Mustafa Tekpinar

Added maxtracesc and maxtracepchalfpccv options as normweightmode options.

parent 00f40390
...@@ -64,6 +64,15 @@ if((normWeightMode=="maxtracepc") | (normWeightMode=="maxpctrace")){ ...@@ -64,6 +64,15 @@ if((normWeightMode=="maxtracepc") | (normWeightMode=="maxpctrace")){
trace<-append(trace, max(jet[row, "trace"], jet[row, "cv"])) 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")){ } else if ((normWeightMode=="maxtracedfi") | (normWeightMode=="maxdfitrace")){
print(paste("Using ", normWeightMode)) print(paste("Using ", normWeightMode))
for (row in 1:nrow(jet)) { for (row in 1:nrow(jet)) {
...@@ -91,7 +100,16 @@ if((normWeightMode=="maxtracepc") | (normWeightMode=="maxpctrace")){ ...@@ -91,7 +100,16 @@ if((normWeightMode=="maxtracepc") | (normWeightMode=="maxpctrace")){
trace<-append(trace, max(jet[row, "trace"], max(jet[row, "pc"], jet[row, "cv"]))) trace<-append(trace, max(jet[row, "trace"], max(jet[row, "pc"], jet[row, "cv"])))
} }
} }
} else if ((normWeightMode=="maxtracehalfpccv")|(normWeightMode=="maxtracehalfcvpc")){ }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)) 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){
...@@ -100,6 +118,15 @@ if((normWeightMode=="maxtracepc") | (normWeightMode=="maxpctrace")){ ...@@ -100,6 +118,15 @@ if((normWeightMode=="maxtracepc") | (normWeightMode=="maxpctrace")){
trace<-append(trace, max(jet[row, "trace"], (jet[row, "pc"]+jet[row, "cv"])/2.0 )) trace<-append(trace, max(jet[row, "trace"], (jet[row, "pc"]+jet[row, "cv"])/2.0 ))
} }
} }
}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")){ }else if ((normWeightMode=="halfcvpc") | (normWeightMode=="halfpccv")){
print(paste("Using ", normWeightMode)) print(paste("Using ", normWeightMode))
for (row in 1:nrow(jet)) { for (row in 1:nrow(jet)) {
...@@ -148,7 +175,9 @@ if((normWeightMode=="maxtracepc") | (normWeightMode=="maxpctrace")){ ...@@ -148,7 +175,9 @@ 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', 'maxtracepc', 'maxtracecv', 'maxtracepccv', 'halfcvpc', 'maxtracedfi' or 'maxtracebfactor'!") print("It can only be 'trace', 'tracemovingaverage', 'pc', 'cv', 'dfi', 'bfactor',")
print(" 'maxtracepc', 'maxtracecv', 'maxtracepccv', 'halfcvpc', 'maxtracepchalfpccv',")
print(" 'maxtracesc', 'maxtracescpc', 'maxtracedfi' or 'maxtracebfactor'!")
} }
print(trace) print(trace)
##################################################################################################################### #####################################################################################################################
......
...@@ -451,7 +451,8 @@ def parse_command_line(): ...@@ -451,7 +451,8 @@ def parse_command_line():
required=False, default=None) required=False, default=None)
retMet_args.add_argument('--normweightmode', dest='normweightmode', type=str, \ retMet_args.add_argument('--normweightmode', dest='normweightmode', type=str, \
help="It can be one of these: 'trace', 'tracemovingaverage', 'cv', 'pc', 'dfi', 'maxtracepc', 'maxtracecv', 'maxtracepccv' or 'halfcvpc'. Default is 'trace'.", help="It can be one of these: 'trace', 'tracemovingaverage', 'cv', 'pc', 'dfi', 'maxtracesc',"+\
"'maxtracepc', 'maxtracecv', 'maxtracepccv', 'maxtracepcsc', 'maxtracepchalfpccv' or 'halfcvpc'. Default is 'trace'.",
required=False, default="trace") required=False, default="trace")
args = parser.parse_args() args = parser.parse_args()
...@@ -502,12 +503,15 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N, jetfile, pdbfile, normWeightMode, ...@@ -502,12 +503,15 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N, jetfile, pdbfile, normWeightMode,
(normWeightMode != 'maxpccv') and \ (normWeightMode != 'maxpccv') and \
(normWeightMode != 'maxcvpc') and \ (normWeightMode != 'maxcvpc') and \
(normWeightMode != 'maxtracecv') and \ (normWeightMode != 'maxtracecv') and \
(normWeightMode != 'maxtracesc') and \
(normWeightMode != 'maxcvtrace') and \ (normWeightMode != 'maxcvtrace') and \
(normWeightMode != 'maxtracedfi') and \ (normWeightMode != 'maxtracedfi') and \
(normWeightMode != 'maxtracebfactor') and \ (normWeightMode != 'maxtracebfactor') and \
(normWeightMode != 'maxdfitrace') and \ (normWeightMode != 'maxdfitrace') and \
(normWeightMode != 'maxbfactortrace') and \ (normWeightMode != 'maxbfactortrace') and \
(normWeightMode != 'maxtracepccv') and \ (normWeightMode != 'maxtracepccv') and \
(normWeightMode != 'maxtracepcsc') and \
(normWeightMode != 'maxtracepchalfpccv') and \
(normWeightMode != 'maxtracecvpc') and \ (normWeightMode != 'maxtracecvpc') and \
(normWeightMode != 'halfpccv') and \ (normWeightMode != 'halfpccv') and \
(normWeightMode != 'halfcvpc') and \ (normWeightMode != 'halfcvpc') and \
...@@ -515,9 +519,9 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N, jetfile, pdbfile, normWeightMode, ...@@ -515,9 +519,9 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N, jetfile, pdbfile, normWeightMode,
(normWeightMode != 'tracemovingaverage') and \ (normWeightMode != 'tracemovingaverage') and \
(normWeightMode != 'maxtracehalfpccv')): (normWeightMode != 'maxtracehalfpccv')):
print("ERROR: normWeightMode can only be 'trace', 'tracemovingaverage', 'cv', 'pc', 'dfi', bfactor,\n"+\ print("ERROR: normWeightMode can only be 'trace', 'tracemovingaverage', 'cv', 'pc', 'dfi', bfactor,\n"+\
" 'maxtracepc', 'maxtracedfi', 'maxpccv', "+\ " 'maxtracepc', 'maxtracedfi', 'maxpccv', 'maxtracesc',"+\
" 'maxtracebfactor'"+\ " 'maxtracebfactor', 'maxtracepcsc', "+\
" 'maxtracecv', 'maxtracepccv'"+\ " 'maxtracecv', 'maxtracepccv', maxtracepchalfpccv"+\
" 'halfcvpc' or maxtracehalfcvpc!") " 'halfcvpc' or maxtracehalfcvpc!")
sys.exit(-1) sys.exit(-1)
......
...@@ -135,8 +135,11 @@ def launchJET(prot, retMet, bFile, fFile, pdbfile, chains, n, N, nl): ...@@ -135,8 +135,11 @@ def launchJET(prot, retMet, bFile, fFile, pdbfile, chains, n, N, nl):
jetcmd = "java -Xmx1000m -cp $JET2_PATH:$JET2_PATH/jet/extLibs/vecmath.jar jet.JET -c default.conf -i "+\ jetcmd = "java -Xmx1000m -cp $JET2_PATH:$JET2_PATH/jet/extLibs/vecmath.jar jet.JET -c default.conf -i "+\
prot+".pdb -o `pwd` -p J -r input -b "+prot+"_"+chainID+".psiblast -d chain -n "+n+" > "+prot+".out" prot+".pdb -o `pwd` -p J -r input -b "+prot+"_"+chainID+".psiblast -d chain -n "+n+" > "+prot+".out"
else: else:
# jetcmd = "java -Xmx1000m -cp $JET2_PATH:$JET2_PATH/jet/extLibs/vecmath.jar jet.JET -c default.conf -i "+\
# prot+".pdb -o `pwd` -p AVJ -r input -b "+prot+"_"+chainID+".psiblast -d chain -n "+n+" > "+prot+".out"
jetcmd = "java -Xmx1000m -cp $JET2_PATH:$JET2_PATH/jet/extLibs/vecmath.jar jet.JET -c default.conf -i "+\ jetcmd = "java -Xmx1000m -cp $JET2_PATH:$JET2_PATH/jet/extLibs/vecmath.jar jet.JET -c default.conf -i "+\
prot+".pdb -o `pwd` -p AVJ -r input -b "+prot+"_"+chainID+".psiblast -d chain -n "+n+" > "+prot+".out" prot+".pdb -o `pwd` -p AVJCG -r input -f "+prot+"_"+chainID+".psiblast -d chain -n "+n+" -a 5"+" > "+prot+".out"
#One can also add: -g 'trace,pc,cv,clusters,axs'
else: else:
print(N) print(N)
...@@ -157,15 +160,20 @@ def launchJET(prot, retMet, bFile, fFile, pdbfile, chains, n, N, nl): ...@@ -157,15 +160,20 @@ def launchJET(prot, retMet, bFile, fFile, pdbfile, chains, n, N, nl):
jetcmd = "java -Xmx1000m -cp $JET2_PATH:$JET2_PATH/jet/extLibs/vecmath.jar jet.JET -c default.conf -i "+\ jetcmd = "java -Xmx1000m -cp $JET2_PATH:$JET2_PATH/jet/extLibs/vecmath.jar jet.JET -c default.conf -i "+\
prot+".pdb -o `pwd` -p J -r input -f "+prot+"_"+chainID+".fasta -d chain -n "+n+" > "+prot+".out" prot+".pdb -o `pwd` -p J -r input -f "+prot+"_"+chainID+".fasta -d chain -n "+n+" > "+prot+".out"
else: else:
# jetcmd = "java -Xmx1000m -cp $JET2_PATH:$JET2_PATH/jet/extLibs/vecmath.jar jet.JET -c default.conf -i "+\
# prot+".pdb -o `pwd` -p AVJ -r input -f "+prot+"_"+chainID+".fasta -d chain -n "+n+" > "+prot+".out"
jetcmd = "java -Xmx1000m -cp $JET2_PATH:$JET2_PATH/jet/extLibs/vecmath.jar jet.JET -c default.conf -i "+\ jetcmd = "java -Xmx1000m -cp $JET2_PATH:$JET2_PATH/jet/extLibs/vecmath.jar jet.JET -c default.conf -i "+\
prot+".pdb -o `pwd` -p AVJ -r input -f "+prot+"_"+chainID+".fasta -d chain -n "+n+" > "+prot+".out" prot+".pdb -o `pwd` -p AVJCG -r input -f "+prot+"_"+chainID+".fasta -d chain -n "+n+" -a 5"+" > "+prot+".out"
#One can also add: -g 'trace,pc,cv,clusters,axs'
else: else:
if(pdbfile == None): if(pdbfile == None):
jetcmd = "java -Xmx1000m -cp $JET2_PATH:$JET2_PATH/jet/extLibs/vecmath.jar jet.JET -c default.conf -i "+\ jetcmd = "java -Xmx1000m -cp $JET2_PATH:$JET2_PATH/jet/extLibs/vecmath.jar jet.JET -c default.conf -i "+\
prot+".pdb -o `pwd` -p J -r "+retMet+" -d chain -n "+n+" > "+prot+".out" prot+".pdb -o `pwd` -p J -r "+retMet+" -d chain -n "+n+" > "+prot+".out"
else: else:
# jetcmd = "java -Xmx1000m -cp $JET2_PATH:$JET2_PATH/jet/extLibs/vecmath.jar jet.JET -c default.conf -i "+\
# prot+".pdb -o `pwd` -p AVJ -r "+retMet+" -d chain -n "+n+" > "+prot+".out"
jetcmd = "java -Xmx1000m -cp $JET2_PATH:$JET2_PATH/jet/extLibs/vecmath.jar jet.JET -c default.conf -i "+\ jetcmd = "java -Xmx1000m -cp $JET2_PATH:$JET2_PATH/jet/extLibs/vecmath.jar jet.JET -c default.conf -i "+\
prot+".pdb -o `pwd` -p AVJ -r "+retMet+" -d chain -n "+n+" > "+prot+".out" prot+".pdb -o `pwd` -p AVJCG -r "+retMet+" -d chain -n "+n+" -a 5"+" > "+prot+".out"
print("\nRunning:\n"+jetcmd) print("\nRunning:\n"+jetcmd)
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"):
......
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