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


Python CommandNode._run方法代码示例

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


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

示例1: _run

# 需要导入模块: from pypeline.node import CommandNode [as 别名]
# 或者: from pypeline.node.CommandNode import _run [as 别名]
 def _run(self, config, temp):
     try:
         CommandNode._run(self, config, temp)
     except NodeError, error:
         if self._command.join() == [1, None]:
             with open(fileutils.reroot_path(temp, "template.stdout")) as handle:
                 lines = handle.readlines()
             if lines and ("Giving up." in lines[-1]):
                 error = NodeError("%s\n\n%s" % (error, lines[-1]))
         raise error
开发者ID:CarlesV,项目名称:paleomix,代码行数:12,代码来源:paml.py

示例2: _run

# 需要导入模块: from pypeline.node import CommandNode [as 别名]
# 或者: from pypeline.node.CommandNode import _run [as 别名]
    def _run(self, config, temp):
        with gzip.open(self._in_vcf) as handle:
            with open(os.path.join(temp, "heterozygous_snps.bed"), "w") as bed:
                for line in handle:
                    if line.startswith("#"):
                        continue

                    fields = line.split("\t", 5)
                    if "," in fields[4]:
                        pos = int(fields[1])
                        bed.write("%s\t%i\t%i\n" % (fields[0], pos - 1, pos))

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

示例3: _run

# 需要导入模块: from pypeline.node import CommandNode [as 别名]
# 或者: from pypeline.node.CommandNode import _run [as 别名]
 def _run(self, config, temp):
     try:
         CommandNode._run(self, config, temp)
     except NodeError, error:
         err_message = "DNA damage levels are too low"
         if self._command.join() == [1]:
             fpath = os.path.join(temp, "pipe_mapDamage.stdout")
             with open(fpath) as handle:
                 for line in handle:
                     if err_message in line:
                         line = line.strip().replace("Warning:", "ERROR:")
                         error = NodeError("%s\n\n%s" % (error, line))
                         break
         raise error
开发者ID:CarlesV,项目名称:paleomix,代码行数:16,代码来源:mapdamage.py

示例4: _run

# 需要导入模块: from pypeline.node import CommandNode [as 别名]
# 或者: from pypeline.node.CommandNode import _run [as 别名]
    def _run(self, config, temp):
        try:
            CommandNode._run(self, config, temp)
        except NodeError, error:
            # Allow failures due to low coverage
            with open(fileutils.reroot_path(temp, "template.stdout")) as handle:
                codeml = handle.read()
                if "sequences do not have any resolved nucleotides. Giving up." not in codeml:
                    raise error

            with open(fileutils.reroot_path(temp, self._output_prefix + ".codeml"), "a") as handle:
                handle.write("\nWARNING: No resolved nucleotides found, could not process gene.\n")

            import sys
            sys.stderr.write("WARNING: No resolved nucleotides in " + self._output_prefix + "\n")
开发者ID:schae234,项目名称:pypeline,代码行数:17,代码来源:paml.py

示例5: test_commandnode_run__call_order

# 需要导入模块: from pypeline.node import CommandNode [as 别名]
# 或者: from pypeline.node.CommandNode import _run [as 别名]
def test_commandnode_run__call_order():
    cmd_mock = _build_cmd_mock()
    cmd_mock.should_receive("run").with_args("xTMPx").ordered.once
    cmd_mock.should_receive("join").with_args().and_return((0,)).ordered.once
    node = CommandNode(cmd_mock)
    node._run(None, "xTMPx")
开发者ID:CarlesV,项目名称:paleomix,代码行数:8,代码来源:node_test.py


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