让我们有一个简单的蛇文件,如
rule targets:
input:
"plots/dataset1.pdf",
"plots/dataset2.pdf"
rule plot:
input:
"raw/{dataset}.csv"
output:
"plots/{dataset}.pdf"
shell:
"somecommand {input} {output}"
我想概括绘图规则,以便它可以在 docker 容器中运行,类似于
rule targets:
input:
"plots/dataset1.pdf",
"plots/dataset2.pdf"
rule plot:
input:
"raw/{dataset}.csv"
output:
"plots/{dataset}.pdf"
singularity:
"docker://joseespinosa/docker-r-ggplot2"
shell:
"somecommand {input} {output}"
如果我理解得很好,当我运行时,我会在 docker 容器中snakemake --use-singularity
获得该somecommand
运行,如果没有容器的一些卷配置,就无法找到输入的 csv 文件。
您能否提供一个小的工作示例来描述如何在 Snakefile 或其他 Snakemake 文件中配置卷?