我需要使用多个配置文件运行 Bppancestor,我尝试了不同的方法,但都没有奏效。我有大约 150 个文件,所以一个一个地做并不是一个有效的解决方案。
运行 bppancestor 的语法如下:
bppancestor params=config_file
我试着做:
bppancestor params=directory_of_config_files/*
并使用 Snakefile 尝试自动化工作流程:
ARCHIVE_FILE = 'bpp_output.tar.gz'
# a single config file
CONFIG_FILE = 'config_files/{sims}.conf'
# Build the list of input files.
CONF = glob_wildcards(CONFIG_FILE).sims
# pseudo-rule that tries to build everything.
# Just add all the final outputs that you want built.
rule all:
input: ARCHIVE_FILE
# run bppancestor
rule bpp:
input:
CONF,
shell:
'bppancestor params={input}'
# create an archive with all results
rule create_archive:
input: CONF,
output: ARCHIVE_FILE
shell: 'tar -czvf {output} {input}'
有人可以给我建议吗?