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


Python PhyloBuddy.command_line_ui方法代码示例

本文整理汇总了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"
开发者ID:JamesL13,项目名称:BuddySuite,代码行数:9,代码来源:phylobuddy_test.py

示例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"
开发者ID:JamesL13,项目名称:BuddySuite,代码行数:9,代码来源:phylobuddy_test.py

示例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"
开发者ID:JamesL13,项目名称:BuddySuite,代码行数:9,代码来源:phylobuddy_test.py

示例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"
开发者ID:xtmgah,项目名称:BuddySuite,代码行数:9,代码来源:phylobuddy_test.py

示例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"
开发者ID:JamesL13,项目名称:BuddySuite,代码行数:9,代码来源:phylobuddy_test.py

示例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"
开发者ID:JamesL13,项目名称:BuddySuite,代码行数:9,代码来源:phylobuddy_test.py

示例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"
开发者ID:JamesL13,项目名称:BuddySuite,代码行数:9,代码来源:phylobuddy_test.py

示例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"
开发者ID:JamesL13,项目名称:BuddySuite,代码行数:9,代码来源:phylobuddy_test.py

示例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"
开发者ID:JamesL13,项目名称:BuddySuite,代码行数:9,代码来源:phylobuddy_test.py

示例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
开发者ID:JamesL13,项目名称:BuddySuite,代码行数:28,代码来源:phylobuddy_test.py

示例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, [])
开发者ID:JamesL13,项目名称:BuddySuite,代码行数:10,代码来源:phylobuddy_test.py

示例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, [])
开发者ID:JamesL13,项目名称:BuddySuite,代码行数:10,代码来源:phylobuddy_test.py

示例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"
开发者ID:JamesL13,项目名称:BuddySuite,代码行数:10,代码来源:phylobuddy_test.py

示例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
开发者ID:JamesL13,项目名称:BuddySuite,代码行数:11,代码来源:phylobuddy_test.py

示例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"
开发者ID:JamesL13,项目名称:BuddySuite,代码行数:11,代码来源:phylobuddy_test.py


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