【发布时间】:2020-06-10 15:09:16
【问题描述】:
我是 Snakemake 的新手,使用的是 snakemake-minimal 5.4.5。我有一个看起来像这样的规则:
rule make_grm:
input:
inc_snps: "path/snps_for_test_chr{chromosome}.txt",
inc_samples: "path/samples_for_test_chr{chromosome}.txt"
params:
plink_root="path/data_chr{chromosome}",
output_root="path/snpgrm_chr{chromosome}"
output:
expand("path/snpgrm_chr{chromosome}.grm.{ext}", ext=["gz", "id"])
conda:
"path/environment.yaml"
shell:
"gcta64 --bfile {params.plink_root} --make-grm-gz --keep {input.inc_samples} --extract {input.inc_snps} --out {params.output_root}"
本质上,它需要一些输入并通过 GCTA 运行它们,生成两个输出文件:一个 .id 文件和一个 .gz 文件。
如果我明确说明了这条规则中的所有文件名(即我使用染色体编号代替 {chromosome} 通配符),它就可以完美运行。现在我正在尝试这样做,以便我可以从命令行指定要查看的染色体,但 snakemake 抱怨我使用通配符:
Wildcard error in line 40 of Snakefile
Wildcards in input files cannot be determined from output files: chromosome
任何想法为什么如果我在我的 shell 中运行这样的东西:
snakemake --use-conda path/snpgrm_chr18.grm.gz
Snakemake 不能像我的其他规则那样推断出 {chromosome}=18?
(我也在 SGE 集群上运行此程序,但我忽略了这些细节,因为我认为它们与此行为无关并增加了很多混乱)
【问题讨论】:
标签: snakemake