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


Python CommandNode._teardown方法代码示例

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


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

示例1: _teardown

# 需要导入模块: from pypeline.node import CommandNode [as 别名]
# 或者: from pypeline.node.CommandNode import _teardown [as 别名]
    def _teardown(self, config, temp):
        # Picard creates a folder named after the user in the temp-root
        try_rmtree(os.path.join(temp, getpass.getuser()))
        # Some JREs may create a folder for temporary performance counters
        try_rmtree(os.path.join(temp, "hsperfdata_" + getpass.getuser()))

        CommandNode._teardown(self, config, temp)
开发者ID:UMNPonyClub,项目名称:paleomix,代码行数:9,代码来源:picard.py

示例2: _teardown

# 需要导入模块: from pypeline.node import CommandNode [as 别名]
# 或者: from pypeline.node.CommandNode import _teardown [as 别名]
    def _teardown(self, config, temp):
        os.remove(os.path.join(temp, "RAxML_info.output"))

        source      = os.path.join(temp, "RAxML_parsimonyTree.output.0")
        destination = fileutils.reroot_path(temp, self._output_tree)
        fileutils.move_file(source, destination)

        CommandNode._teardown(self, config, temp)
开发者ID:health1987,项目名称:paleomix,代码行数:10,代码来源:examl.py

示例3: _teardown

# 需要导入模块: from pypeline.node import CommandNode [as 别名]
# 或者: from pypeline.node.CommandNode import _teardown [as 别名]
 def _teardown(self, config, temp):
     template   = self._output_template
     bootstraps = self._bootstrap_num
     start      = self._bootstrap_start
     for (src_file, dst_file) in self._bootstraps(template, bootstraps, start):
         src_file = os.path.join(temp, src_file)
         dst_file = fileutils.reroot_path(temp, dst_file)
         fileutils.move_file(src_file, dst_file)
     CommandNode._teardown(self, config, temp)
开发者ID:CarlesV,项目名称:paleomix,代码行数:11,代码来源:raxml.py

示例4: _teardown

# 需要导入模块: from pypeline.node import CommandNode [as 别名]
# 或者: from pypeline.node.CommandNode import _teardown [as 别名]
    def _teardown(self, config, temp):
        fileutils.move_file(os.path.join(temp, "RAxML_info.Pypeline"),
                            os.path.join(temp, fileutils.swap_ext(self._output_alignment, ".info")))
        fileutils.move_file(os.path.join(temp, "input.alignment.BS0"),
                            os.path.join(temp, self._output_alignment))

        os.remove(os.path.join(temp, "input.alignment"))
        os.remove(os.path.join(temp, "input.partition"))

        CommandNode._teardown(self, config, temp)
开发者ID:schae234,项目名称:pypeline,代码行数:12,代码来源:raxml.py

示例5: test_commandnode_teardown__missing_optional_files

# 需要导入模块: from pypeline.node import CommandNode [as 别名]
# 或者: from pypeline.node.CommandNode import _teardown [as 别名]
def test_commandnode_teardown__missing_optional_files(temp_folder):
    destination, temp_folder = _setup_temp_folders(temp_folder)

    cmd = AtomicCmd(("echo", "-n", "1 2 3"),
                    TEMP_OUT_BAR = "bar.txt",
                    OUT_STDOUT = os.path.join(destination, "foo.txt"))
    cmd.run(temp_folder)
    assert_equal(cmd.join(), [0])
    node = CommandNode(cmd)
    node._teardown(None, temp_folder)
    assert_equal(os.listdir(temp_folder), [])
    assert_equal(os.listdir(destination), ["foo.txt"])
开发者ID:schae234,项目名称:pypeline,代码行数:14,代码来源:node_test.py

示例6: test_commandnode_teardown

# 需要导入模块: from pypeline.node import CommandNode [as 别名]
# 或者: from pypeline.node.CommandNode import _teardown [as 别名]
def test_commandnode_teardown(temp_folder):
    destination, temp_folder = _setup_temp_folders(temp_folder)

    cmd = AtomicCmd(("echo", "-n", "1 2 3"),
                    OUT_STDOUT = os.path.join(destination, "foo.txt"))
    cmd.run(temp_folder)
    assert_equal(cmd.join(), [0])
    node = CommandNode(cmd)
    assert os.path.exists(os.path.join(temp_folder, "foo.txt"))
    assert not os.path.exists(os.path.join(destination, "foo.txt"))
    node._teardown(None, temp_folder)
    assert not os.path.exists(os.path.join(temp_folder, "foo.txt"))
    assert os.path.exists(os.path.join(destination, "foo.txt"))
开发者ID:schae234,项目名称:pypeline,代码行数:15,代码来源:node_test.py

示例7: test_commandnode_teardown__commit

# 需要导入模块: from pypeline.node import CommandNode [as 别名]
# 或者: from pypeline.node.CommandNode import _teardown [as 别名]
def test_commandnode_teardown__commit(temp_folder):
    cmd_mock = _build_cmd_mock()
    cmd_mock.should_receive("commit").with_args(temp_folder).once
    node = CommandNode(cmd_mock)
    node._teardown(None, temp_folder)
开发者ID:CarlesV,项目名称:paleomix,代码行数:7,代码来源:node_test.py

示例8: _teardown

# 需要导入模块: from pypeline.node import CommandNode [as 别名]
# 或者: from pypeline.node.CommandNode import _teardown [as 别名]
    def _teardown(self, config, temp):
        """See CommandNode._teardown."""
        os.remove(reroot_path(temp, self._infile))

        CommandNode._teardown(self, config, temp)
开发者ID:CarlesV,项目名称:paleomix,代码行数:7,代码来源:samtools.py

示例9: _teardown

# 需要导入模块: from pypeline.node import CommandNode [as 别名]
# 或者: from pypeline.node.CommandNode import _teardown [as 别名]
    def _teardown(self, config, temp):
        os.rename(os.path.join(temp, self._basename) + ".calmd",
                  os.path.join(temp, self._basename))

        CommandNode._teardown(self, config, temp)
开发者ID:schae234,项目名称:pypeline,代码行数:7,代码来源:gatk.py

示例10: _teardown

# 需要导入模块: from pypeline.node import CommandNode [as 别名]
# 或者: from pypeline.node.CommandNode import _teardown [as 别名]
 def _teardown(self, config, temp):
     for filename in os.listdir(temp):
         if filename.endswith(".txt") or filename.endswith(".pdf") or filename.endswith(".csv"):
             if not filename.startswith("pipe_"):
                 os.remove(os.path.join(temp, filename))
     CommandNode._teardown(self, config, temp)
开发者ID:schae234,项目名称:pypeline,代码行数:8,代码来源:nodes.py


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