本文整理汇总了Python中pypeline.node.CommandNode类的典型用法代码示例。如果您正苦于以下问题:Python CommandNode类的具体用法?Python CommandNode怎么用?Python CommandNode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CommandNode类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, config, reference, input_files, output_file, dependencies):
cat_cmds, cat_obj = concatenate_input_bams(config, input_files)
cmd_map = AtomicCmd(["mapDamage",
"-n", _MAPDAMAGE_MAX_READS,
"-i", "-",
"-d", "%(TEMP_DIR)s",
"-r", reference],
IN_STDIN = cat_obj,
CHECK_VERSION = MAPDAMAGE_VERSION)
train_cmds = ParallelCmds(cat_cmds + [cmd_map])
cat_cmds, cat_obj = concatenate_input_bams(config, input_files)
cmd_scale = AtomicCmd(["mapDamage", "--rescale-only",
"-n", _MAPDAMAGE_MAX_READS,
"-i", "-",
"-d", "%(TEMP_DIR)s",
"-r", reference,
"--rescale-out", "%(OUT_BAM)s"],
IN_STDIN = cat_obj,
OUT_BAM = output_file,
CHECK_VERSION = MAPDAMAGE_VERSION)
rescale_cmds = ParallelCmds(cat_cmds + [cmd_scale])
description = "<mapDamageRescale: %i file(s) -> '%s'>" % (len(input_files), output_file)
CommandNode.__init__(self,
command = SequentialCmds([train_cmds, rescale_cmds]),
description = description,
dependencies = dependencies)
开发者ID:schae234,项目名称:pypeline,代码行数:28,代码来源:nodes.py
示例2: __init__
def __init__(self, parameters):
commands = [parameters.commands[cmd].finalize() for cmd in ('fastq_dump',)]
description = "<Mapping Pipeline>"
CommandNode.__init__(self,
description = description,
command = ParallelCmds(commands),
dependencies = parameters.dependencies)
开发者ID:schae234,项目名称:SRAManager,代码行数:7,代码来源:analysis.py
示例3: _teardown
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,代码行数:7,代码来源:picard.py
示例4: _setup
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,代码行数:26,代码来源:examl.py
示例5: __init__
def __init__(self, parameters):
self._kwargs = parameters.command.kwargs
CommandNode.__init__(self,
command = parameters.command.finalize(),
description = "<RAxMLReduce: '%s' -> '%s'>" \
% (parameters.input_alignment, parameters.output_alignment),
dependencies = parameters.dependencies)
开发者ID:CarlesV,项目名称:paleomix,代码行数:7,代码来源:raxml.py
示例6: __init__
def __init__(self, parameters):
description = "<Merge BAMs: %i file(s) -> '%s'>" \
% (len(parameters.input_bams), parameters.output_bam)
CommandNode.__init__(self,
command = parameters.command.finalize(),
description = description,
dependencies = parameters.dependencies)
开发者ID:schae234,项目名称:pypeline,代码行数:7,代码来源:picard.py
示例7: _setup
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,代码行数:7,代码来源:mapdamage.py
示例8: _setup
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,代码行数:7,代码来源:samtools.py
示例9: __init__
def __init__(self, parameters):
commands = [parameters.commands[key].finalize() for key in ("cat", "filter", "bgzip")]
description = "<VCFFilter: '%s' -> '%s'>" % (parameters.infile, parameters.outfile)
CommandNode.__init__(
self, description=description, command=ParallelCmds(commands), dependencies=parameters.dependencies
)
开发者ID:UMNPonyClub,项目名称:paleomix,代码行数:7,代码来源:paleomix.py
示例10: __init__
def __init__(self, control_file, sequence_file, trees_file, output_tar, exclude_groups = (), dependencies = ()):
self._exclude_groups = safe_coerce_to_frozenset(exclude_groups)
self._control_file = control_file
self._sequence_file = sequence_file
self._trees_file = trees_file
paml_cmd = AtomicCmd(["codeml", "template.ctl"],
IN_CONTROL_FILE = control_file,
IN_SEQUENCE_FILE = sequence_file,
IN_TREES_FILE = trees_file,
TEMP_OUT_CTL = "template.ctl",
TEMP_OUT_SEQS = "template.seqs",
TEMP_OUT_TREES = "template.trees",
TEMP_OUT_STDOUT = "template.stdout",
TEMP_OUT_STDERR = "template.stderr",
TEMP_OUT_4FOLD = "4fold.nuc",
IN_STDIN = "/dev/null", # Prevent promts from blocking
set_cwd = True,
**CodemlNode._get_codeml_files("TEMP_OUT_CODEML"))
tar_pairs = CodemlNode._get_codeml_files("TEMP_IN_CODEML")
tar_files = ["%%(%s)s" % (key,) for key in tar_pairs]
tar_cmd = AtomicCmd(["tar", "cvzf", "%(OUT_FILE)s"] + tar_files,
OUT_FILE = output_tar,
set_cwd = True,
**tar_pairs)
CommandNode.__init__(self,
description = "<CodemlNode: %r -> %r>" % (sequence_file, output_tar),
command = SequentialCmds([paml_cmd, tar_cmd]),
dependencies = dependencies)
开发者ID:CarlesV,项目名称:paleomix,代码行数:31,代码来源:paml.py
示例11: __init__
def __init__(self, config, reference, intervals, infiles, outfile, dependencies = ()):
self._basename = os.path.basename(outfile)
infiles = safe_coerce_to_tuple(infiles)
jar_file = os.path.join(config.jar_root, "GenomeAnalysisTK.jar")
command = AtomicJavaCmdBuilder(config, jar_file)
command.set_option("-T", "IndelRealigner")
command.set_option("-R", "%(IN_REFERENCE)s")
command.set_option("-targetIntervals", "%(IN_INTERVALS)s")
command.set_option("-o", "%(OUT_BAMFILE)s")
command.set_option("--bam_compression", 0)
command.set_option("--disable_bam_indexing")
_set_input_files(command, infiles)
command.set_kwargs(IN_REFERENCE = reference,
IN_REF_DICT = fileutils.swap_ext(reference, ".dict"),
IN_INTERVALS = intervals,
OUT_BAMFILE = outfile)
calmd = AtomicCmd(["samtools", "calmd", "-b", "%(TEMP_IN_BAM)s", "%(IN_REF)s"],
TEMP_IN_BAM = self._basename,
IN_REF = reference,
TEMP_OUT_STDOUT = self._basename + ".calmd")
description = "<Indel Realign: %i file(s) -> '%s'>" \
% (len(infiles), outfile)
CommandNode.__init__(self,
description = description,
command = ParallelCmds([command.finalize(),
calmd]),
dependencies = dependencies)
开发者ID:schae234,项目名称:pypeline,代码行数:32,代码来源:gatk.py
示例12: __init__
def __init__(self, control_file, sequence_file, trees_file, output_prefix, dependencies = ()):
self._control_file = control_file
self._sequence_file = sequence_file
self._trees_file = trees_file
self._output_prefix = output_prefix
command = AtomicCmd(["codeml", "template.ctl"],
IN_CONTROL_FILE = control_file,
IN_SEQUENCE_FILE = sequence_file,
IN_TREES_FILE = trees_file,
TEMP_OUT_CTL = "template.ctl",
TEMP_OUT_SEQS = "template.seqs",
TEMP_OUT_TREES = "template.trees",
TEMP_OUT_STDOUT = "template.stdout",
TEMP_OUT_STDERR = "template.stderr",
OUT_CODEML = output_prefix + ".codeml",
TEMP_OUT_2NG_DN = "2NG.dN",
TEMP_OUT_2NG_DS = "2NG.dS",
TEMP_OUT_2NG_T = "2NG.t",
TEMP_OUT_4FOLD = "4fold.nuc",
TEMP_OUT_LNF = "lnf",
TEMP_OUT_RST = "rst",
TEMP_OUT_RST1 = "rst1",
TEMP_OUT_RUB = "rub",
IN_STDIN = "/dev/null", # Prevent promts from blocking
set_cwd = True)
CommandNode.__init__(self,
description = "<CodemlNode: '%s' -> '%s.*'>" % (sequence_file, output_prefix),
command = command,
dependencies = dependencies)
开发者ID:schae234,项目名称:pypeline,代码行数:31,代码来源:paml.py
示例13: __init__
def __init__(self, infile, outfile, genome, from_start = 0, from_end = 0, strand_relative = False, dependencies = ()):
if type(from_start) != type(from_end):
raise ValueError("'from_start' and 'from_end' should be of same type!")
call = ["bedtools", "slop",
"-i", "%(IN_FILE)s",
"-g", "%(IN_GENOME)s",
"-l", str(from_start),
"-r", str(from_end)]
if strand_relative:
call.append("-s")
if type(from_start) is float:
call.append("-pct")
command = AtomicCmd(call,
IN_FILE = infile,
IN_GENOME = genome,
OUT_STDOUT = outfile,
CHECK_VERSION = BEDTOOLS_VERSION)
description = "<SlopBed: '%s' -> '%s'>" % (infile, outfile)
CommandNode.__init__(self,
description = description,
command = command,
dependencies = dependencies)
开发者ID:CarlesV,项目名称:paleomix,代码行数:27,代码来源:bedtools.py
示例14: _setup
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,代码行数:8,代码来源:raxml.py
示例15: _setup
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,代码行数:8,代码来源:raxml.py
示例16: _setup
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,代码行数:8,代码来源:adapterremoval.py
示例17: __init__
def __init__(self, parameters):
commands = [parameters.commands[key].finalize() for key in ("unicat", "pileup")]
description = "<VCFPileup: '%s' -> '%s'>" % (parameters.in_bam,
parameters.outfile)
CommandNode.__init__(self,
description = description,
command = ParallelCmds(commands),
dependencies = parameters.dependencies)
开发者ID:schae234,项目名称:pypeline,代码行数:8,代码来源:genotype.py
示例18: _teardown
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,代码行数:8,代码来源:examl.py
示例19: __init__
def __init__(self, parameters):
command = parameters.command.finalize()
description = "<Bowtie2 Index '%s' -> '%s.*'>" % (parameters.input_file,
parameters.prefix)
CommandNode.__init__(self,
command = command,
description = description,
dependencies = parameters.dependencies)
开发者ID:CarlesV,项目名称:paleomix,代码行数:8,代码来源:bowtie2.py
示例20: __init__
def __init__(self, parameters):
self._directory = parameters.directory
description = "<mapDamage (model): %r>" % (parameters.directory,)
CommandNode.__init__(self,
command=parameters.command.finalize(),
description=description,
dependencies=parameters.dependencies)
开发者ID:CarlesV,项目名称:paleomix,代码行数:8,代码来源:mapdamage.py
注:本文中的pypeline.node.CommandNode类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论