Commit d7774e36 by Mustafa Tekpinar

Changed the argument --isjet2off to --jetfile.

parent 49dff695
......@@ -17,7 +17,7 @@ then
echo "Running GEMME with a user-provided alignment file."
echo "Using a previously produced prot_jet.res file to check reproducibility!"
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
echo "Running GEMME with a user-provided alignment file."
......
......@@ -256,9 +256,9 @@ def parse_command_line():
default=''
)
retMet_args.add_argument('--isjet2on', dest='isjet2on', type=str, \
help="If false, it will skip JET2 calculation and use a precalculated JET2 file. Default is true",
required=False, default="True")
retMet_args.add_argument('--jetfile', dest='jetfile', type=str, \
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=None)
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'.",
......@@ -277,11 +277,11 @@ def parse_command_line():
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!
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
......@@ -291,19 +291,24 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N, isjet2on, normWeightMode):
print("query protein: "+prot)
if((isjet2on.lower()) == "true"):
if((jetfile) == None):
#I intend to run JET2 completely externally!!
#It is too much buggy and it has too many dependencies.
#Using it with a Docker or Singularity may be the best solution!
print("computing conservation levels...")
launchJET(prot,retMet,bFile,fFile,n,N,nl)
print("done")
elif((isjet2on.lower()) == "false"):
print("using previously calculated JET2 conservation levels...")
print("done")
else:
print("ERROR: You can only use true or false after --isjet2on!")
sys.exit(-1)
print("using previously calculated JET2 data from "+jetfile+"...")
#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)
#Do Python plotting here
......@@ -350,7 +355,7 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N, isjet2on, normWeightMode):
def main():
args = parse_command_line()
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__'):
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