Commit a12e8938 by Mustafa Tekpinar

Some changes to make the program run on python3 (tested with 3.9.7 ).

parent f61b87d1
*~ *~
._* ._*
.Rhistory
example/.RData
gemmeAnal.pyc
\ No newline at end of file
...@@ -135,14 +135,14 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N): ...@@ -135,14 +135,14 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N):
createPDB(prot,seq) createPDB(prot,seq)
print "query protein: "+prot print("query protein: "+prot)
print "computing conservation levels..." print("computing conservation levels...")
#I intend to run JET2 completely externally!! #I intend to run JET2 completely externally!!
#It is too much buggy and it has too many dependencies. #It is too much buggy and it has too many dependencies.
#Using it with a Docker or Singularity may be the best solution! #Using it with a Docker or Singularity may be the best solution!
launchJET(prot,retMet,bFile,fFile,n,N,nl) launchJET(prot,retMet,bFile,fFile,n,N,nl)
print "done" print("done")
launchPred(prot,inAli,mutFile) launchPred(prot,inAli,mutFile)
cleanTheMess(prot,bFile,fFile) cleanTheMess(prot,bFile,fFile)
......
...@@ -62,7 +62,6 @@ def createPDB(prot,seq): ...@@ -62,7 +62,6 @@ def createPDB(prot,seq):
# Edit JET configuration file with correct number of Seqs & MSA # Edit JET configuration file with correct number of Seqs & MSA
def editConfJET(N): def editConfJET(N):
reCode=subprocess.call("sed -i 's/results\t\t5000/results\t\t"+str(N)+"/' default.conf",shell=True) reCode=subprocess.call("sed -i 's/results\t\t5000/results\t\t"+str(N)+"/' default.conf",shell=True)
return(reCode) return(reCode)
...@@ -105,10 +104,14 @@ def launchJET(prot,retMet,bFile,fFile,n,N,nl): ...@@ -105,10 +104,14 @@ def launchJET(prot,retMet,bFile,fFile,n,N,nl):
subprocess.call("cp $GEMME_PATH/default.conf .",shell=True) subprocess.call("cp $GEMME_PATH/default.conf .",shell=True)
if retMet=="input": if retMet=="input":
if bFile!='': if bFile!='':
subprocess.call("cp "+bFile+" "+prot+"_A.psiblast",shell=True) if(bFile == prot+"_A.psiblast"):
shutil.copy2(bFile, bFile+".orig")
shutil.copy2(bFile+".orig ", prot+"_A.psiblast")
else:
shutil.copy2(bFile+" ", prot+"_A.psiblast")
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+"_A.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 "+prot+".pdb -o `pwd` -p J -r input -b "+prot+"_A.psiblast -d chain -n "+n+" > "+prot+".out"
else: else:
print N print(N)
editConfJET(N) editConfJET(N)
if(fFile == prot+"_A.fasta"): if(fFile == prot+"_A.fasta"):
...@@ -139,7 +142,7 @@ def launchPred(prot,inAli,mutFile): ...@@ -139,7 +142,7 @@ def launchPred(prot,inAli,mutFile):
else: else:
rcmd="Rscript --save $GEMME_PATH/computePred.R "+prot+" "+inAli+" TRUE none" rcmd="Rscript --save $GEMME_PATH/computePred.R "+prot+" "+inAli+" TRUE none"
print rcmd print("\nRunning: \n"+rcmd)
reCode=subprocess.call(rcmd,shell=True) reCode=subprocess.call(rcmd,shell=True)
#Add plots here with gemmemore #Add plots here with gemmemore
......
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