Commit 2eef3ef9 by Mustafa Tekpinar

alphabet selection was added as an input argument!

parent 49d39490
......@@ -23,6 +23,7 @@ aliFile = args[2]
simple = args[3]
fname = args[4]
normWeightMode = args[5]
selectedAlphabet = args[6]
# read alignment and convert to matrix
ali=as.matrix.alignment(read.alignment(aliFile,format="fasta"))
......@@ -241,7 +242,8 @@ print(alpha)
alphabet = "lz-bl.7"
#alphabet = "lz-bl.7"
alphabet = selectedAlphabet
if(simple){
normPredCombi = normalizePredWithNbSeqsPC(pred,trace,wt,alpha,nbSeqs,alphabet)
rownames(normPredCombi)=aa
......
......@@ -363,6 +363,10 @@ def parse_command_line():
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('--alphabet', dest='alphabet', type=str, \
help="Which alphabet to use. Default is lz-bl.7",
required=False, default="lz-bl.7")
retMet_args.add_argument('-p', '--pdbfile', dest='pdbfile', type=str, \
help="If a pdb file is provided, it will skip fake pdb file production step and use that file. Default is None",
required=False, default=None)
......@@ -384,7 +388,7 @@ def parse_command_line():
return args
def doit(inAli,mutFile,retMet,bFile,fFile,n,N, jetfile, pdbfile, normWeightMode):
def doit(inAli,mutFile,retMet,bFile,fFile,n,N, jetfile, pdbfile, normWeightMode, alphabet):
"""
Perfect explanation for a function: typing the function call exactly!
doit is basically the main function in disguise!
......@@ -468,7 +472,7 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N, jetfile, pdbfile, normWeightMode)
print(df)
launchPred(prot,inAli,mutFile, normWeightMode)
launchPred(prot,inAli,mutFile, normWeightMode, alphabet)
#Do Python plotting here
#TODO: Eventually, I will do the map plotting with a completely independent
......@@ -514,7 +518,8 @@ def doit(inAli,mutFile,retMet,bFile,fFile,n,N, jetfile, pdbfile, normWeightMode)
def main():
args = parse_command_line()
doit(args.input,args.mutations,args.retrievingMethod,args.blastFile,\
args.fastaFile,args.nIter,args.NSeqs, args.jetfile, args.pdbfile, args.normweightmode)
args.fastaFile,args.nIter,args.NSeqs, args.jetfile, args.pdbfile,\
args.normweightmode, args.alphabet)
if (__name__ == '__main__'):
main()
......
......@@ -172,12 +172,12 @@ def launchJET(prot, retMet, bFile, fFile, pdbfile, chains, n, N, nl):
return(reCode)
# Run Rscript to compute predictions
def launchPred(prot,inAli,mutFile, normWeightMode):
def launchPred(prot,inAli,mutFile, normWeightMode, alphabet):
if mutFile!='':
rcmd="Rscript --save $GEMME_PATH/computePred.R "+prot+" "+inAli+" FALSE "+mutFile+" "+normWeightMode
rcmd="Rscript --save $GEMME_PATH/computePred.R "+prot+" "+inAli+" FALSE "+mutFile+" "+normWeightMode+" "+alphabet
else:
rcmd="Rscript --save $GEMME_PATH/computePred.R "+prot+" "+inAli+" TRUE none "+normWeightMode
rcmd="Rscript --save $GEMME_PATH/computePred.R "+prot+" "+inAli+" TRUE none "+normWeightMode+" "+alphabet
print("\nRunning: \n"+rcmd)
reCode=subprocess.call(rcmd,shell=True)
......
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