本文整理汇总了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)
示例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")
示例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")
示例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