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


Python CommandNode._setup方法代码示例

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


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

示例1: _setup

# 需要导入模块: from pypeline.node import CommandNode [as 别名]
# 或者: from pypeline.node.CommandNode import _setup [as 别名]
    def _setup(self, config, temp):
        """See CommandNode._setup."""
        infile = os.path.abspath(self._infile)
        outfile = reroot_path(temp, self._infile)
        os.symlink(infile, outfile)

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

示例2: _setup

# 需要导入模块: from pypeline.node import CommandNode [as 别名]
# 或者: from pypeline.node.CommandNode import _setup [as 别名]
 def _setup(self, config, temp):
     CommandNode._setup(self, config, temp)
     for fname in ("3pGtoA_freq.txt", "5pCtoT_freq.txt", "dnacomp.txt",
                   "misincorporation.txt"):
         relpath = os.path.join(self._directory, fname)
         abspath = os.path.abspath(relpath)
         os.symlink(abspath, os.path.join(temp, fname))
开发者ID:CarlesV,项目名称:paleomix,代码行数:9,代码来源:mapdamage.py

示例3: _setup

# 需要导入模块: from pypeline.node import CommandNode [as 别名]
# 或者: from pypeline.node.CommandNode import _setup [as 别名]
    def _setup(self, config, temp):
        CommandNode._setup(self, config, temp)

        # The temp folder may contain old files:
        # Remove old pipes to prevent failure at _teardown
        for pipe_fname in glob.glob(os.path.join(temp, "pipe*")):
            fileutils.try_remove(pipe_fname)
        # ExaML refuses to overwrite old info files
        fileutils.try_remove(os.path.join(temp, "ExaML_info.Pypeline"))

        # Resume from last checkpoint, if one such was generated
        checkpoints = glob.glob(os.path.join(temp,
                                "ExaML_binaryCheckpoint.Pypeline_*"))
        if not checkpoints:
            return

        cache = FileStatusCache()
        if cache.files_up_to_date(checkpoints, self.input_files):
            checkpoints.sort(key=lambda fname: int(fname.rsplit("_", 1)[-1]))

            # FIXME: Less hacky solution to modifying AtomicCmds needed
            self._command._command.append("-R")
            self._command._command.append(checkpoints[-1])
        else:
            for fpath in checkpoints:
                fileutils.try_remove(fpath)
开发者ID:CarlesV,项目名称:paleomix,代码行数:28,代码来源:examl.py

示例4: _setup

# 需要导入模块: from pypeline.node import CommandNode [as 别名]
# 或者: from pypeline.node.CommandNode import _setup [as 别名]
    def _setup(self, config, temp):
        for key in ("IN_ALIGNMENT", "IN_PARTITION"):
            source      = os.path.abspath(self._kwargs[key])
            destination = os.path.join(temp, self._kwargs["TEMP_" + key])

            os.symlink(source, destination)

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

示例5: _setup

# 需要导入模块: from pypeline.node import CommandNode [as 别名]
# 或者: from pypeline.node.CommandNode import _setup [as 别名]
    def _setup(self, config, temp):
        for key in ("IN_ALIGNMENT", "IN_PARTITION"):
            source      = self._kwargs[key]
            destination = os.path.join(temp, self._kwargs["TEMP_" + key])

            fileutils.copy_file(source, destination)

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

示例6: _setup

# 需要导入模块: from pypeline.node import CommandNode [as 别名]
# 或者: from pypeline.node.CommandNode import _setup [as 别名]
    def _setup(self, config, temp):
        check_fastq_files(self.input_files, self._quality_offset)

        os.mkfifo(os.path.join(temp, self._basename + ".truncated"))
        os.mkfifo(os.path.join(temp, self._basename + ".discarded"))
        os.mkfifo(os.path.join(temp, "uncompressed_input"))

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

示例7: _setup

# 需要导入模块: from pypeline.node import CommandNode [as 别名]
# 或者: from pypeline.node.CommandNode import _setup [as 别名]
    def _setup(self, config, temp):
        CommandNode._setup(self, config, temp)

        # Required to avoid the creation of files outside the temp folder
        for filename in self._symlinks:
            source      = os.path.abspath(filename)
            destination = os.path.join(temp, os.path.basename(filename))

            os.symlink(source, destination)
开发者ID:health1987,项目名称:paleomix,代码行数:11,代码来源:examl.py

示例8: _setup

# 需要导入模块: from pypeline.node import CommandNode [as 别名]
# 或者: from pypeline.node.CommandNode import _setup [as 别名]
    def _setup(self, config, temp_root):
        CommandNode._setup(self, config, temp_root)
        dst_fname = os.path.join(temp_root, self._bam_input.pipe)
        if len(self._bam_input.files) > 1:
            os.mkfifo(dst_fname)
        else:
            src_fname, = self._bam_input.files
            os.symlink(os.path.join(os.getcwd(), src_fname), dst_fname)

            src_fname = os.path.join(os.getcwd(), swap_ext(src_fname, ".bai"))
            os.symlink(src_fname, dst_fname + ".bai")
开发者ID:UMNPonyClub,项目名称:paleomix,代码行数:13,代码来源:picard.py

示例9: _setup

# 需要导入模块: from pypeline.node import CommandNode [as 别名]
# 或者: from pypeline.node.CommandNode import _setup [as 别名]
    def _setup(self, config, temp):
        os.mkfifo(os.path.join(temp, self._basename + ".discarded"))
        os.mkfifo(os.path.join(temp, self._basename + ".pair1.truncated"))
        os.mkfifo(os.path.join(temp, self._basename + ".pair2.truncated"))
        os.mkfifo(os.path.join(temp, "uncompressed_input_1"))
        os.mkfifo(os.path.join(temp, "uncompressed_input_2"))

        if self._version == VERSION_15:
            os.mkfifo(os.path.join(temp, self._basename + ".collapsed"))
            os.mkfifo(os.path.join(temp, self._basename + ".collapsed.truncated"))
            os.mkfifo(os.path.join(temp, self._basename + ".singleton.truncated"))
        else:
            os.mkfifo(os.path.join(temp, self._basename + ".singleton.aln.truncated"))
            os.mkfifo(os.path.join(temp, self._basename + ".singleton.unaln.truncated"))

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

示例10: _do_test_commandnode_setup

# 需要导入模块: from pypeline.node import CommandNode [as 别名]
# 或者: from pypeline.node.CommandNode import _setup [as 别名]
 def _do_test_commandnode_setup(kwargs):
     cmd_mock = _build_cmd_mock(**kwargs)
     node = CommandNode(cmd_mock)
     node._setup(None, None)
开发者ID:CarlesV,项目名称:paleomix,代码行数:6,代码来源:node_test.py

示例11: _setup

# 需要导入模块: from pypeline.node import CommandNode [as 别名]
# 或者: from pypeline.node.CommandNode import _setup [as 别名]
 def _setup(self, config, temp):
     CommandNode._setup(self, config, temp)
     os.mkfifo(os.path.join(temp, self._basename))
开发者ID:schae234,项目名称:pypeline,代码行数:5,代码来源:gatk.py


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