本文整理汇总了Python中Bio.Align.Applications.PrankCommandline.kappa方法的典型用法代码示例。如果您正苦于以下问题:Python PrankCommandline.kappa方法的具体用法?Python PrankCommandline.kappa怎么用?Python PrankCommandline.kappa使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bio.Align.Applications.PrankCommandline
的用法示例。
在下文中一共展示了PrankCommandline.kappa方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_Prank_complex_command_line
# 需要导入模块: from Bio.Align.Applications import PrankCommandline [as 别名]
# 或者: from Bio.Align.Applications.PrankCommandline import kappa [as 别名]
def test_Prank_complex_command_line(self):
"""Round-trip with complex command line."""
cmdline = PrankCommandline(prank_exe)
cmdline.set_parameter("d", self.infile1)
cmdline.set_parameter("-noxml", True)
cmdline.set_parameter("notree", True)
cmdline.set_parameter("-gaprate", 0.321)
cmdline.set_parameter("gapext", 0.6)
cmdline.set_parameter("-dots", 1) # i.e. True
# Try using a property:
cmdline.kappa = 3
cmdline.skipins = True
cmdline.set_parameter("-once", True)
cmdline.realbranches = True
self.assertEqual(
str(cmdline),
prank_exe
+ " -d=Fasta/fa01 -noxml"
+ " -notree -dots -gaprate=0.321 -gapext=0.6 -kappa=3"
+ " -once -skipins -realbranches",
)
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)
self.assert_("Total time" in child.stdout.read())
self.assertEqual(child.stderr.read(), "")
del child
示例2: test_Prank_complex_command_line
# 需要导入模块: from Bio.Align.Applications import PrankCommandline [as 别名]
# 或者: from Bio.Align.Applications.PrankCommandline import kappa [as 别名]
def test_Prank_complex_command_line(self):
"""Round-trip with complex command line."""
cmdline = PrankCommandline(prank_exe)
cmdline.set_parameter("d", self.infile1)
cmdline.set_parameter("-gaprate", 0.321)
cmdline.set_parameter("gapext", 0.6)
cmdline.set_parameter("-dots", 1) # i.e. True
# Try using a property:
cmdline.kappa = 3
cmdline.skipins = True
cmdline.set_parameter("-once", True)
cmdline.realbranches = True
self.assertEqual(str(cmdline), _escape_filename(prank_exe) +
" -d=Fasta/fa01" +
" -dots -gaprate=0.321 -gapext=0.6 -kappa=3" +
" -once -skipins -realbranches")
self.assertEqual(str(eval(repr(cmdline))), str(cmdline))
stdout, stderr = cmdline()
self.assertTrue("Total time" in stdout, stdout)
示例3: test_Prank_complex_command_line
# 需要导入模块: from Bio.Align.Applications import PrankCommandline [as 别名]
# 或者: from Bio.Align.Applications.PrankCommandline import kappa [as 别名]
def test_Prank_complex_command_line(self):
"""Round-trip with complex command line."""
cmdline = PrankCommandline(prank_exe)
cmdline.set_parameter("d", self.infile1)
cmdline.set_parameter("-noxml", True)
cmdline.set_parameter("notree", True)
cmdline.set_parameter("-gaprate", 0.321)
cmdline.set_parameter("gapext", 0.6)
cmdline.set_parameter("-dots", 1) #i.e. True
#Try using a property:
cmdline.kappa = 3
cmdline.skipins = True
cmdline.set_parameter("-once", True)
cmdline.realbranches = True
self.assertEqual(str(cmdline), prank_exe + " -d=Fasta/fa01 -noxml" + \
" -notree -dots -gaprate=0.321 -gapext=0.6 -kappa=3" + \
" -once -skipins -realbranches")
self.assertEqual(str(eval(repr(cmdline))), str(cmdline))
result, stdout, stderr = Application.generic_run(cmdline)
self.assertEqual(result.return_code, 0)
self.assert_("Total time" in stdout.read())
self.assertEqual(stderr.read(), "")
self.assertEqual(str(result._cl), str(cmdline))