本文整理汇总了Python中PhyloBuddy.command_line_ui方法的典型用法代码示例。如果您正苦于以下问题:Python PhyloBuddy.command_line_ui方法的具体用法?Python PhyloBuddy.command_line_ui怎么用?Python PhyloBuddy.command_line_ui使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhyloBuddy
的用法示例。
在下文中一共展示了PhyloBuddy.command_line_ui方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_num_tips_ui
# 需要导入模块: import PhyloBuddy [as 别名]
# 或者: from PhyloBuddy import command_line_ui [as 别名]
def test_num_tips_ui(capsys):
test_in_args = deepcopy(in_args)
test_in_args.num_tips = True
Pb.command_line_ui(test_in_args, pb_resources.get_one("m k"), skip_exit=True)
out, err = capsys.readouterr()
assert string2hash(out) == "f43920f4df66e76fbacae4af178eeebb"
示例2: test_unroot_ui
# 需要导入模块: import PhyloBuddy [as 别名]
# 或者: from PhyloBuddy import command_line_ui [as 别名]
def test_unroot_ui(capsys):
test_in_args = deepcopy(in_args)
test_in_args.unroot = True
Pb.command_line_ui(test_in_args, Pb.PhyloBuddy(resource("figtree.nexus")), skip_exit=True)
out, err = capsys.readouterr()
assert string2hash(out) == "10e9024301b3178cdaed0b57ba33f615"
示例3: test_print_trees_ui
# 需要导入模块: import PhyloBuddy [as 别名]
# 或者: from PhyloBuddy import command_line_ui [as 别名]
def test_print_trees_ui(capsys):
test_in_args = deepcopy(in_args)
test_in_args.print_trees = True
Pb.command_line_ui(test_in_args, Pb.make_copy(pb_objects[0]), skip_exit=True)
out, err = capsys.readouterr()
assert string2hash(out) == "fe340117cb8f573100c00fc897e6c8ce"
示例4: test_screw_formats_ui
# 需要导入模块: import PhyloBuddy [as 别名]
# 或者: from PhyloBuddy import command_line_ui [as 别名]
def test_screw_formats_ui(capsys):
test_in_args = deepcopy(in_args)
test_in_args.screw_formats = "nexus"
Pb.command_line_ui(test_in_args, Pb.make_copy(pb_objects[0]), skip_exit=True)
out, err = capsys.readouterr()
assert string2hash(out) == "543d2fc90ca1f391312d6b8fe896c59c"
示例5: test_rename_ids_ui
# 需要导入模块: import PhyloBuddy [as 别名]
# 或者: from PhyloBuddy import command_line_ui [as 别名]
def test_rename_ids_ui(capsys):
test_in_args = deepcopy(in_args)
test_in_args.rename_ids = ['Mle', 'Phylo']
Pb.command_line_ui(test_in_args, Pb.make_copy(pb_objects[0]), skip_exit=True)
out, err = capsys.readouterr()
assert string2hash(out) == "6843a620b725a3a0e0940d4352f2036f"
示例6: test_screw_formats_ui
# 需要导入模块: import PhyloBuddy [as 别名]
# 或者: from PhyloBuddy import command_line_ui [as 别名]
def test_screw_formats_ui(capsys):
test_in_args = deepcopy(in_args)
test_in_args.screw_formats = "nexus"
Pb.command_line_ui(test_in_args, pb_resources.get_one("m k"), skip_exit=True)
out, err = capsys.readouterr()
assert string2hash(out) == "543d2fc90ca1f391312d6b8fe896c59c"
示例7: test_root_ui_leaf
# 需要导入模块: import PhyloBuddy [as 别名]
# 或者: from PhyloBuddy import command_line_ui [as 别名]
def test_root_ui_leaf(capsys):
test_in_args = deepcopy(in_args)
test_in_args.root = [["firSA25a"]]
Pb.command_line_ui(test_in_args, Pb.make_copy(pb_objects[0]), skip_exit=True)
out, err = capsys.readouterr()
assert string2hash(out) == "f32bdc34bfe127bb0453a80cf7b01302"
示例8: test_root_ui_mrca
# 需要导入模块: import PhyloBuddy [as 别名]
# 或者: from PhyloBuddy import command_line_ui [as 别名]
def test_root_ui_mrca(capsys):
test_in_args = deepcopy(in_args)
test_in_args.root = [["firSA25a", "penSH31b"]]
Pb.command_line_ui(test_in_args, Pb.make_copy(pb_objects[0]), skip_exit=True)
out, err = capsys.readouterr()
assert string2hash(out) == "757489907bd5c82882d084ffcb22cfba"
示例9: test_root_ui_midpoint
# 需要导入模块: import PhyloBuddy [as 别名]
# 或者: from PhyloBuddy import command_line_ui [as 别名]
def test_root_ui_midpoint(capsys):
test_in_args = deepcopy(in_args)
test_in_args.root = [[]]
Pb.command_line_ui(test_in_args, Pb.make_copy(pb_objects[0]), skip_exit=True)
out, err = capsys.readouterr()
assert string2hash(out) == "25ea14c2e89530a0fb48163c0ef2a102"
示例10: test_screw_formats_inplace_ui
# 需要导入模块: import PhyloBuddy [as 别名]
# 或者: from PhyloBuddy import command_line_ui [as 别名]
def test_screw_formats_inplace_ui(capsys):
temp_file = MyFuncs.TempFile()
with open(resource("compare_trees.newick"), "r") as ifile:
temp_file.write(ifile.read())
test_in_args = deepcopy(in_args)
test_in_args.screw_formats = "nexus"
test_in_args.in_place = True
test_in_args.trees[0] = temp_file.path
tester = Pb.PhyloBuddy(temp_file.path)
Pb.command_line_ui(test_in_args, tester, skip_exit=True)
out, err = capsys.readouterr()
assert "File over-written at:" in err
check_file = os.path.isfile("%s.nex" % temp_file.path)
assert check_file
test_in_args.trees[0] = "%s.nex" % temp_file.path
test_in_args.screw_formats = "newick"
tester = Pb.PhyloBuddy("%s.nex" % temp_file.path)
Pb.command_line_ui(test_in_args, tester, skip_exit=True)
out, err = capsys.readouterr()
assert "File over-written at:" in err
check_file = os.path.isfile("%s.nwk" % temp_file.path)
assert check_file
示例11: test_generate_tree_ui3
# 需要导入模块: import PhyloBuddy [as 别名]
# 或者: from PhyloBuddy import command_line_ui [as 别名]
def test_generate_tree_ui3():
test_in_args = deepcopy(in_args)
test_in_args.in_format, test_in_args.out_format = "nexus", "newick"
test_in_args.trees = [resource("Mnemiopsis_cds.nex")]
test_in_args.generate_tree = [["foo"]]
with pytest.raises(SystemExit):
Pb.command_line_ui(test_in_args, [])
示例12: test_generate_tree_ui2
# 需要导入模块: import PhyloBuddy [as 别名]
# 或者: from PhyloBuddy import command_line_ui [as 别名]
def test_generate_tree_ui2():
test_in_args = deepcopy(in_args)
test_in_args.in_format, test_in_args.out_format = "nexus", "newick"
test_in_args.trees = [resource("Mnemiopsis_cds.nex")]
test_in_args.generate_tree = [["fasttree", "-s 12345"]] # Command doesn't exist in fasttree
with pytest.raises(SystemExit):
Pb.command_line_ui(test_in_args, [])
示例13: test_print_trees_internal_ui
# 需要导入模块: import PhyloBuddy [as 别名]
# 或者: from PhyloBuddy import command_line_ui [as 别名]
def test_print_trees_internal_ui(capsys):
# Most of this function is covered repeatedly below, so just test the -t flag
test_in_args = deepcopy(in_args)
test_in_args.test = True
test_in_args.unroot = True
Pb.command_line_ui(test_in_args, Pb.make_copy(pb_objects[0]), skip_exit=True)
out, err = capsys.readouterr()
assert err == "*** Test passed ***\n"
示例14: test_in_place_ui
# 需要导入模块: import PhyloBuddy [as 别名]
# 或者: from PhyloBuddy import command_line_ui [as 别名]
def test_in_place_ui(capsys):
# Some of this function is covered below, so just test an edge
test_in_args = deepcopy(in_args)
test_in_args.in_place = True
test_in_args.trees = [Pb.make_copy(pb_objects[0])]
test_in_args.screw_formats = "nexus"
Pb.command_line_ui(test_in_args, Pb.make_copy(pb_objects[0]), skip_exit=True)
out, err = capsys.readouterr()
assert "Warning: The -i flag was passed in, but the positional" in err
示例15: test_generate_tree_ui1
# 需要导入模块: import PhyloBuddy [as 别名]
# 或者: from PhyloBuddy import command_line_ui [as 别名]
def test_generate_tree_ui1(capsys):
test_in_args = deepcopy(in_args)
test_in_args.in_format, test_in_args.out_format = "nexus", "newick"
test_in_args.trees = [resource("Mnemiopsis_cds.nex")]
test_in_args.generate_tree = [["fasttree", "-seed 12345"]]
Pb.command_line_ui(test_in_args, [], skip_exit=True)
out, err = capsys.readouterr()
assert string2hash(out) == "d7f505182dd1a1744b45cc326096f70c"