Commit 7b3f2711 by Mustafa Tekpinar

Moved the main function under if(__name__) block in sgemme.py.

parent a823960e
MIT License MIT License
Copyright (c) 2018: Elodie Laine, Yasaman Karami and Alessandra Carbone. Copyright (c) 2018: Elodie Laine, Yasaman Karami and Alessandra Carbone.
Copyright (c) 2022-2023: Mustafa Tekpinar and Alessandra Carbone.
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
...@@ -18,4 +19,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ...@@ -18,4 +19,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.
\ No newline at end of file
...@@ -357,6 +357,18 @@ def launchJET(prot, retMet, bFile, fFile, pdbfile, chains, n, N, nl): ...@@ -357,6 +357,18 @@ def launchJET(prot, retMet, bFile, fFile, pdbfile, chains, n, N, nl):
# prot+".pdb -o `pwd` -p AVJ -r "+retMet+" -d chain -n "+n+" > "+prot+".out" # prot+".pdb -o `pwd` -p AVJ -r "+retMet+" -d chain -n "+n+" > "+prot+".out"
jetcmd = "java -Xmx4096m -cp $JET2_PATH:$JET2_PATH/jet/extLibs/vecmath.jar jet.JET -c default.conf -i "+\ jetcmd = "java -Xmx4096m -cp $JET2_PATH:$JET2_PATH/jet/extLibs/vecmath.jar jet.JET -c default.conf -i "+\
prot+".pdb -o `pwd` -p AVJCG -r "+retMet+" -d chain -n "+n+" -a 5"+" > "+prot+".out" prot+".pdb -o `pwd` -p AVJCG -r "+retMet+" -d chain -n "+n+" -a 5"+" > "+prot+".out"
reCode=subprocess.call(jetcmd,shell=True)
if os.path.isfile(prot+"/"+prot+"_jet.res"):
os.rename(prot+"/"+prot+"_jet.res",prot+"_jet.res")
dir_name = prot+"/"
if os.path.isdir(dir_name):
for f in os.listdir(dir_name):
f_path = os.path.join(dir_name, f)
if os.path.isfile(f_path):
os.remove(f_path)
os.rmdir(dir_name)
# 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"):
......
# Copyright (c) 2018: Elodie Laine # Copyright (c) 2018: Elodie Laine
# Copyright (c) 2022: Mustafa Tekpinar # Copyright (c) 2022-2023: Mustafa Tekpinar
# This code is part of the gemme package and governed by its license. # This code is part of the gemme package and governed by its license.
# Please see the LICENSE.txt file included as part of this package. # Please see the LICENSE.txt file included as part of this package.
......
...@@ -657,7 +657,7 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N, jetfile, pdbfile, normWeightMode, ...@@ -657,7 +657,7 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N, jetfile, pdbfile, normWeightMode,
print(df) print(df)
launchPred(prot,inAli,mutFile, normWeightMode, alphabet) launchPred(prot, inAli, mutFile, normWeightMode, alphabet)
#Do Python plotting here #Do Python plotting here
#TODO: Eventually, I will do the map plotting with a completely independent #TODO: Eventually, I will do the map plotting with a completely independent
...@@ -699,19 +699,16 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N, jetfile, pdbfile, normWeightMode, ...@@ -699,19 +699,16 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N, jetfile, pdbfile, normWeightMode,
cleanTheMess(prot,bFile,fFile, chainID=chains[0]) cleanTheMess(prot,bFile,fFile, chainID=chains[0])
if (__name__ == '__main__'):
def main():
tic = time.perf_counter() tic = time.perf_counter()
args = parse_command_line() args = parse_command_line()
doit(args.input,args.mutations,args.retrievingMethod,args.blastFile,\ doit(args.input, args.mutations, args.retrievingMethod, args.blastFile,\
args.fastaFile,args.nIter,args.NSeqs, args.jetfile, args.pdbfile,\ args.fastaFile, args.nIter,args.NSeqs, args.jetfile, args.pdbfile,\
args.normweightmode, args.alphabet) args.normweightmode, args.alphabet)
toc = time.perf_counter() toc = time.perf_counter()
print(f"S-GEMME computation finished in {toc - tic:0.4f} seconds!") print(f"S-GEMME computation finished in {toc - tic:0.4f} seconds!")
if (__name__ == '__main__'):
main()
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