Commit d7774e36 by Mustafa Tekpinar

Changed the argument --isjet2off to --jetfile.

parent 49dff695
...@@ -17,7 +17,7 @@ then ...@@ -17,7 +17,7 @@ then
echo "Running GEMME with a user-provided alignment file." echo "Running GEMME with a user-provided alignment file."
echo "Using a previously produced prot_jet.res file to check reproducibility!" echo "Using a previously produced prot_jet.res file to check reproducibility!"
cp ../tests/BLAT_jet.res . cp ../tests/BLAT_jet.res .
python $GEMME_PATH/gemme.py aliBLAT.fasta -r input -f aliBLAT.fasta --isjet2on false python $GEMME_PATH/gemme.py aliBLAT.fasta -r input -f aliBLAT.fasta --jetfile BLAT_jet.res
else else
echo "Running GEMME with a user-provided alignment file." echo "Running GEMME with a user-provided alignment file."
......
...@@ -256,9 +256,9 @@ def parse_command_line(): ...@@ -256,9 +256,9 @@ def parse_command_line():
default='' default=''
) )
retMet_args.add_argument('--isjet2on', dest='isjet2on', type=str, \ retMet_args.add_argument('--jetfile', dest='jetfile', type=str, \
help="If false, it will skip JET2 calculation and use a precalculated JET2 file. Default is true", help="If a jet file is provided, it will skip JET2 calculation and use the precalculated JET2 data in that file. Default is None",
required=False, default="True") 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', 'trace+pc', 'trace+cv' or 'trace+pc+cv'. Default is 'trace'.", help="It can be one of these: 'trace', 'trace+pc', 'trace+cv' or 'trace+pc+cv'. Default is 'trace'.",
...@@ -277,11 +277,11 @@ def parse_command_line(): ...@@ -277,11 +277,11 @@ def parse_command_line():
return args return args
def doit(inAli,mutFile,retMet,bFile,fFile,n,N, isjet2on, normWeightMode): def doit(inAli,mutFile,retMet,bFile,fFile,n,N, jetfile, normWeightMode):
""" """
Perfect explanation for a function: typing the function call exactly! Perfect explanation for a function: typing the function call exactly!
doit is basically the main function in disguise! doit is basically the main function in disguise!
doit(args.input,args.mutations,args.retrievingMethod,args.blastFile,args.fastaFile, args.isjet2on) doit(args.input,args.mutations,args.retrievingMethod,args.blastFile,args.fastaFile, args.jetfile)
""" """
simple = True simple = True
...@@ -291,19 +291,24 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N, isjet2on, normWeightMode): ...@@ -291,19 +291,24 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N, isjet2on, normWeightMode):
print("query protein: "+prot) print("query protein: "+prot)
if((isjet2on.lower()) == "true"): if((jetfile) == None):
#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!
print("computing conservation levels...") print("computing conservation levels...")
launchJET(prot,retMet,bFile,fFile,n,N,nl) launchJET(prot,retMet,bFile,fFile,n,N,nl)
print("done") print("done")
elif((isjet2on.lower()) == "false"):
print("using previously calculated JET2 conservation levels...")
print("done")
else: else:
print("ERROR: You can only use true or false after --isjet2on!") print("using previously calculated JET2 data from "+jetfile+"...")
sys.exit(-1)
#Doing this copy operation just due to a peculiar behaviour of JET2.
#According to JET2, all input files must have the same name obtained
#from the fasta file right after the > symbol.
#Weird but true!
if(jetfile!=prot+"_jet.res"):
shutil.copy2(jetfile, prot+"_jet.res")
print("done")
launchPred(prot,inAli,mutFile, normWeightMode) launchPred(prot,inAli,mutFile, normWeightMode)
#Do Python plotting here #Do Python plotting here
...@@ -350,7 +355,7 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N, isjet2on, normWeightMode): ...@@ -350,7 +355,7 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N, isjet2on, normWeightMode):
def main(): def main():
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.isjet2on, args.normweightmode) args.fastaFile,args.nIter,args.NSeqs, args.jetfile, args.normweightmode)
if (__name__ == '__main__'): if (__name__ == '__main__'):
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