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


Python MafftCommandline.clustalout方法代码示例

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


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

示例1: test_Mafft_with_Clustalw_output

# 需要导入模块: from Bio.Align.Applications import MafftCommandline [as 别名]
# 或者: from Bio.Align.Applications.MafftCommandline import clustalout [as 别名]
 def test_Mafft_with_Clustalw_output(self):
     """Simple round-trip through app with clustal output"""
     cmdline = MafftCommandline(mafft_exe)
     #Use some properties:
     cmdline.input = self.infile1
     cmdline.clustalout = True
     self.assertEqual(str(eval(repr(cmdline))), str(cmdline))
     stdoutdata, stderrdata = cmdline()
     #e.g. "CLUSTAL format alignment by MAFFT ..."
     #or "CLUSTAL (-like) formatted alignment by MAFFT FFT-NS-2 (v6.240)"
     self.assertTrue(stdoutdata.startswith("CLUSTAL"), stdoutdata)
     self.assertTrue("$#=0" not in stderrdata)
开发者ID:DunbrackLab,项目名称:biopython,代码行数:14,代码来源:test_Mafft_tool.py

示例2: test_Mafft_with_Clustalw_output

# 需要导入模块: from Bio.Align.Applications import MafftCommandline [as 别名]
# 或者: from Bio.Align.Applications.MafftCommandline import clustalout [as 别名]
 def test_Mafft_with_Clustalw_output(self):
     """Simple round-trip through app with clustal output"""
     cmdline = MafftCommandline(mafft_exe)
     #Use some properties:
     cmdline.input = self.infile1
     cmdline.clustalout = True
     self.assertEqual(str(eval(repr(cmdline))), str(cmdline))
     stdin, stdout, stderr = Application.generic_run(cmdline)
     self.assertEqual(stdin.return_code, 0)
     self.assert_(stdout.read().startswith("CLUSTAL format alignment by MAFFT"))
     self.assert_("$#=0" not in stderr.read())
     self.assertEqual(str(stdin._cl), mafft_exe \
                      + " --clustalout Fasta/f002")
开发者ID:spling,项目名称:biopython,代码行数:15,代码来源:test_Mafft_tool.py

示例3: test_Mafft_with_Clustalw_output

# 需要导入模块: from Bio.Align.Applications import MafftCommandline [as 别名]
# 或者: from Bio.Align.Applications.MafftCommandline import clustalout [as 别名]
 def test_Mafft_with_Clustalw_output(self):
     """Simple round-trip through app with clustal output"""
     cmdline = MafftCommandline(mafft_exe)
     #Use some properties:
     cmdline.input = self.infile1
     cmdline.clustalout = True
     self.assertEqual(str(eval(repr(cmdline))), str(cmdline))
     result, stdout, stderr = Application.generic_run(cmdline)
     self.assertEqual(result.return_code, 0)
     output = stdout.read()
     #e.g. "CLUSTAL format alignment by MAFFT ..."
     #or "CLUSTAL (-like) formatted alignment by MAFFT FFT-NS-2 (v6.240)"
     self.assert_(output.startswith("CLUSTAL"), output)
     self.assert_("$#=0" not in stderr.read())
     self.assertEqual(str(result._cl), mafft_exe \
                      + " --clustalout Fasta/f002")
开发者ID:andyoberlin,项目名称:biopython,代码行数:18,代码来源:test_Mafft_tool.py

示例4: test_Mafft_with_Clustalw_output

# 需要导入模块: from Bio.Align.Applications import MafftCommandline [as 别名]
# 或者: from Bio.Align.Applications.MafftCommandline import clustalout [as 别名]
 def test_Mafft_with_Clustalw_output(self):
     """Simple round-trip through app with clustal output"""
     cmdline = MafftCommandline(mafft_exe)
     #Use some properties:
     cmdline.input = self.infile1
     cmdline.clustalout = True
     self.assertEqual(str(eval(repr(cmdline))), str(cmdline))
     child = subprocess.Popen(str(cmdline),
                              stdout=subprocess.PIPE,
                              stderr=subprocess.PIPE,
                              shell=(sys.platform!="win32"))
     return_code = child.wait()
     self.assertEqual(return_code, 0)
     output = child.stdout.read()
     #e.g. "CLUSTAL format alignment by MAFFT ..."
     #or "CLUSTAL (-like) formatted alignment by MAFFT FFT-NS-2 (v6.240)"
     self.assert_(output.startswith("CLUSTAL"), output)
     self.assert_("$#=0" not in child.stderr.read())
     del child
开发者ID:Mat-D,项目名称:biopython,代码行数:21,代码来源:test_Mafft_tool.py


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