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


Python CommandNode._teardown方法代码示例

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


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

示例1: _teardown

# 需要导入模块: from paleomix.node import CommandNode [as 别名]
# 或者: from paleomix.node.CommandNode import _teardown [as 别名]
    def _teardown(self, config, temp):
        os.remove(os.path.join(temp, self.PIPE_FILE))
        if self._index_format:
            os.remove(os.path.join(temp, swap_ext(self.PIPE_FILE,
                                                  self._index_format)))

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

示例2: _teardown

# 需要导入模块: from paleomix.node import CommandNode [as 别名]
# 或者: from paleomix.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:MikkelSchubert,项目名称:paleomix,代码行数:10,代码来源:examl.py

示例3: _teardown

# 需要导入模块: from paleomix.node import CommandNode [as 别名]
# 或者: from paleomix.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:MikkelSchubert,项目名称:paleomix,代码行数:11,代码来源:raxml.py

示例4: _teardown

# 需要导入模块: from paleomix.node import CommandNode [as 别名]
# 或者: from paleomix.node.CommandNode import _teardown [as 别名]
    def _teardown(self, config, temp):
        with open(fileutils.reroot_path(temp, self._params_file), "w") as out:
            out.write("k: %i\n" % (self._param_k,))
            out.write("m: %i\n" % (self._param_m,))
            out.write("outgroup: %r\n" % (list(self._param_outgroup),))

        open(fileutils.reroot_path(temp, self._parameters_hash), "w").close()

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

示例5: test_commandnode_teardown__missing_optional_files

# 需要导入模块: from paleomix.node import CommandNode [as 别名]
# 或者: from paleomix.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"),
                    IN_DUMMY=_EMPTY_FILE,
                    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:MikkelSchubert,项目名称:paleomix,代码行数:15,代码来源:node_test.py

示例6: test_commandnode_teardown

# 需要导入模块: from paleomix.node import CommandNode [as 别名]
# 或者: from paleomix.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"),
                    IN_DUMMY=_EMPTY_FILE,
                    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:MikkelSchubert,项目名称:paleomix,代码行数:16,代码来源:node_test.py

示例7: _teardown

# 需要导入模块: from paleomix.node import CommandNode [as 别名]
# 或者: from paleomix.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:muslih14,项目名称:paleomix,代码行数:7,代码来源:samtools.py

示例8: _teardown

# 需要导入模块: from paleomix.node import CommandNode [as 别名]
# 或者: from paleomix.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:MikkelSchubert,项目名称:paleomix,代码行数:7,代码来源:gatk.py

示例9: test_commandnode_teardown__commit

# 需要导入模块: from paleomix.node import CommandNode [as 别名]
# 或者: from paleomix.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:MikkelSchubert,项目名称:paleomix,代码行数:7,代码来源:node_test.py

示例10: _teardown

# 需要导入模块: from paleomix.node import CommandNode [as 别名]
# 或者: from paleomix.node.CommandNode import _teardown [as 别名]
 def _teardown(self, config, temp_root):
     pipe_fname = os.path.join(temp_root, self._bam_input.pipe)
     os.remove(pipe_fname)
     try_remove(pipe_fname + ".bai")
     CommandNode._teardown(self, config, temp_root)
开发者ID:muslih14,项目名称:paleomix,代码行数:7,代码来源:picard.py


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