def GetExec(self, optList, frame): # Respond to the "clustalw" type command. self.frame = frame self.boxList = optList plugin_exe = r"C:/Program Files (x86)/ClustalW2/clustalw2.exe" dummy = self.GetOutFile() dummy = self.GetOutType() cline = ClustalwCommandline(plugin_exe,infile=r".\plugins\my_seq.fasta", outfile=self.outfile) if self.frame.abet=="AA": cline.type="protein" else: cline.type="dna" if '1PairCheck' in self.frame.paramBoxes: if self.frame.paramBoxes['1PairCheck'].GetValue(): if '1PairwFastCheck' in sfbd: if self.frame.paramBoxes['1PairwFastCheck'].GetValue(): if 'FastPairGapPenSpin' in self.frame.paramBoxes: cline.pairgap = int(self.frame.paramBoxes['FastPairGapPenSpin'].GetValue()) if 'FastKTupleSpin' in self.frame.paramBoxes: cline.ktuple = int(self.frame.paramBoxes['FastKTupleSpin'].GetValue()) if '1DiagCheck' in self.frame.paramBoxes: if self.frame.paramBoxes['1DiagCheck'].GetValue: if 'DFastTopDiagsSpin' in self.frame.paramBoxes: cline.topdiags = int(self.frame.paramBoxes['DFastTopDiagsSpin'].GetValue()) if 'DFastDiagWinSpin' in self.frame.paramBoxes: cline.window = int(self.frame.paramBoxes['DFastDiagWinSpin'].GetValue()) else: if 'SlowPairGapPenSpin' in self.frame.paramBoxes: cline.pwgapopen = int(self.frame.paramBoxes['SlowPairGapPenSpin'].GetValue()) if 'SlowPairGapExtPenSpin' in self.frame.paramBoxes: cline.pwgapext = int(self.frame.paramBoxes['SlowPairGapExtPenSpin'].GetValue()) else: if '1ProfileCheck' in self.frame.paramBoxes: if not self.frame.paramBoxes['1ProfileCheck'].GetValue(): if 'SlowPairGapPenSpin' in self.frame.paramBoxes: cline.gapopen = int(self.frame.paramBoxes['SlowPairGapPenSpin'].GetValue()) if 'SlowPairGapExtPenSpin' in self.frame.paramBoxes: cline.gapext = int(self.frame.paramBoxes['SlowPairGapExtPenSpin'].GetValue()) if self.frame.options: cline.output = str(self.boxList[1].GetValue()) cline.outorder = str(self.boxList[3].GetValue()) if '1PairCheck' in self.frame.paramBoxes: if self.frame.paramBoxes['1PairCheck'].GetValue(): if '1PairwFastCheck' in self.frame.paramBoxes: if self.frame.paramBoxes['1PairwFastCheck'].GetValue(): cline.score = str(self.boxList[5].GetValue()) elif self.frame.abet=="AA": cline.pwmatrix = str(self.boxList[5].GetValue()) else: cline.pwdnamatrix = str(self.boxList[5].GetValue()) else: if '1ProfileCheck' in self.frame.paramBoxes: if not self.frame.paramBoxes['1ProfileCheck'].GetValue(): if self.frame.abet=="AA": cline.matrix = str(self.boxList[5].GetValue()) else: cline.dnamatrix = str(self.boxList[5].GetValue()) cline.nopgap = str(self.boxList[7].GetValue()) cline.nohgap = str(self.boxList[9].GetValue()) cline.maxdiv = int(self.boxList[11].GetValue()) cline.transweight = int(self.boxList[13].GetValue()) cline.iteration = str(self.boxList[17].GetValue()) cline.numiter = int(self.boxList[15].GetValue()) return cline