当前位置: 首页>>代码示例>>Python>>正文


Python MuscleCommandline.objscore方法代码示例

本文整理汇总了Python中Bio.Align.Applications.MuscleCommandline.objscore方法的典型用法代码示例。如果您正苦于以下问题:Python MuscleCommandline.objscore方法的具体用法?Python MuscleCommandline.objscore怎么用?Python MuscleCommandline.objscore使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Bio.Align.Applications.MuscleCommandline的用法示例。


在下文中一共展示了MuscleCommandline.objscore方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: GetExec

# 需要导入模块: from Bio.Align.Applications import MuscleCommandline [as 别名]
# 或者: from Bio.Align.Applications.MuscleCommandline import objscore [as 别名]
 def GetExec(self, optList, frame):
     # Respond to the "muscle" command.
     self.frame = frame
     plugin_exe = r"C:/Program Files (x86)/py27/Lib/site-packages/Muscle.exe"
     self.outfile=r".\plugins\muscle.txt"
     self.outtype="fasta"
     cline = MuscleCommandline(plugin_exe,out=self.outfile)
     if '1ProfileCheck' in self.frame.paramBoxes:
         if self.frame.paramBoxes['1ProfileCheck'].GetValue():
             cline.profile = True
             cline.in1 = r"C:\Users\francis\Documents\Monguis\BioGui\plugins\my_seq.fasta"
             cline.in2 = r"C:\Users\francis\Documents\Monguis\BioGui\plugins\my_seq.fasta"
         else:
             cline.input = r"C:\Users\francis\Documents\Monguis\BioGui\plugins\my_seq.fasta"
     if '1DiagCheck' in self.frame.paramBoxes:
         if self.frame.paramBoxes['1DiagCheck'].GetValue():
             cline.diags=True
             if "DiagLenSpin" in self.frame.paramBoxes:
                 cline.diaglength=int(self.frame.paramBoxes["DiagLenSpin"])
             if "DiagMargSpin" in self.frame.paramBoxes:
                 cline.diaglength=int(self.frame.paramBoxes["DiagMargSpin"])
             if "DiagBreakSpin" in self.frame.paramBoxes:
                 cline.diaglength=int(self.frame.paramBoxes["DiagBreakSpin"])
         elif "GapPenSpin" in self.frame.paramBoxes:
             cline.gapopen=float(self.frame.paramBoxes["GapPenSpin"].GetValue())
         else:
             cline.input=r"C:\Users\francis\Documents\Monguis\BioGui\plugins\my_seq.fasta"
     if self.frame.abet=="AA":
         cline.seqtype="protein"
     elif self.frame.abet=="DNA" or self.frame.abet=="RNA":
         cline.seqtype="nucleo"
     else:
         cline.seqtype="auto"
     
     
     if self.frame.options:
         cline.objscore=str(self.boxList[9].GetValue())
         cline.weight1=str(self.boxList[13].GetValue())
         cline.weight2=str(self.boxList[15].GetValue())
         cline.anchorspacing=int(self.boxList[17].GetValue())
         cline.center=float(self.boxList[19].GetValue())
         cline.hydro=int(self.boxList[21].GetValue())
         cline.hydrofactor=float(self.boxList[23].GetValue())
         cline.maxhours=float(self.boxList[25].GetValue())
         cline.maxiters=int(self.boxList[27].GetValue())
         cline.maxtrees=int(self.boxList[29].GetValue())
         cline.minbestcolscore=float(self.boxList[31].GetValue())
         cline.minsmoothscore=float(self.boxList[33].GetValue())
         cline.smoothscoreceil=float(self.boxList[35].GetValue())
         cline.smoothwindow=int(self.boxList[37].GetValue())
         cline.sueff=float(self.boxList[39].GetValue())
     
     return str(cline)
开发者ID:fxb22,项目名称:BioGUI,代码行数:55,代码来源:MUSCLE23.py

示例2: test_Muscle_with_options

# 需要导入模块: from Bio.Align.Applications import MuscleCommandline [as 别名]
# 或者: from Bio.Align.Applications.MuscleCommandline import objscore [as 别名]
 def test_Muscle_with_options(self):
     """Round-trip through app with a switch and valued option"""
     cmdline = MuscleCommandline(muscle_exe)
     cmdline.set_parameter("input", self.infile1)  # "input" is alias for "in"
     cmdline.set_parameter("out", self.outfile2)
     #Use property:
     cmdline.objscore = "sp"
     cmdline.noanchors = True
     self.assertEqual(str(cmdline), _escape_filename(muscle_exe) +
                      " -in Fasta/f002" +
                      " -out Fasta/temp_align_out2.fa" +
                      " -objscore sp -noanchors")
     self.assertEqual(str(eval(repr(cmdline))), str(cmdline))
     output, error = cmdline()
     self.assertEqual(output, "")
     self.assertTrue("ERROR" not in error)
     self.assertTrue(error.strip().startswith("MUSCLE"), output)
开发者ID:Dologan,项目名称:biopython,代码行数:19,代码来源:test_Muscle_tool.py

示例3: test_Muscle_with_options

# 需要导入模块: from Bio.Align.Applications import MuscleCommandline [as 别名]
# 或者: from Bio.Align.Applications.MuscleCommandline import objscore [as 别名]
 def test_Muscle_with_options(self):
     """Round-trip through app with a switch and valued option."""
     cmdline = MuscleCommandline(muscle_exe)
     cmdline.set_parameter("input", self.infile1) #"input" is alias for "in"
     cmdline.set_parameter("out", self.outfile2)
     #Use property:
     cmdline.objscore = "sp"
     cmdline.noanchors = True
     self.assertEqual(str(cmdline), muscle_exe +\
                      " -in Fasta/f002" + \
                      " -out Fasta/temp_align_out2.fa" + \
                      " -objscore sp -noanchors")
     self.assertEqual(str(eval(repr(cmdline))), str(cmdline))
     stdin, stdout, stderr = generic_run(cmdline)
     self.assertEqual(stdin.return_code, 0)
     self.assertEqual(stdout.read(), "")
     self.assert_("ERROR" not in stderr.read())
     self.assertEqual(str(stdin._cl), str(cmdline))
开发者ID:spling,项目名称:biopython,代码行数:20,代码来源:test_Muscle_tool.py

示例4: test_Muscle_with_options

# 需要导入模块: from Bio.Align.Applications import MuscleCommandline [as 别名]
# 或者: from Bio.Align.Applications.MuscleCommandline import objscore [as 别名]
 def test_Muscle_with_options(self):
     """Round-trip through app with a switch and valued option"""
     cmdline = MuscleCommandline(muscle_exe)
     cmdline.set_parameter("input", self.infile1) #"input" is alias for "in"
     cmdline.set_parameter("out", self.outfile2)
     #Use property:
     cmdline.objscore = "sp"
     cmdline.noanchors = True
     self.assertEqual(str(cmdline), muscle_exe +\
                      " -in Fasta/f002" + \
                      " -out Fasta/temp_align_out2.fa" + \
                      " -objscore sp -noanchors")
     self.assertEqual(str(eval(repr(cmdline))), str(cmdline))
     child = subprocess.Popen(str(cmdline),
                              stdout=subprocess.PIPE,
                              stderr=subprocess.PIPE,
                              shell=(sys.platform!="win32"))
     output, error = child.communicate()
     self.assertEqual(child.returncode, 0)
     self.assertEqual(output, "")
     self.assert_("ERROR" not in error)
     del child
开发者ID:Mat-D,项目名称:biopython,代码行数:24,代码来源:test_Muscle_tool.py


注:本文中的Bio.Align.Applications.MuscleCommandline.objscore方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。