我的蛇形文件是这样的
rule do00_download_step01_download_:
input:
output:
"data/00_download/scores.pqt"
run:
from lib.do00_download import do00_download_step01_download_
do00_download_step01_download_()
rule do00_download_step02_get_the_mean_:
input:
"data/00_download/scores.pqt"
output:
"data/00_download/cleaned.pqt"
run:
from lib.do00_download import do00_download_step02_get_the_mean_
do00_download_step02_get_the_mean_()
rule do01_corr_step01_correlate:
input:
"data/00_download/cleaned.pqt"
output:
"data/01_corr/corr.pqt"
run:
from lib.do01_corr import do01_corr_step01_correlate
do01_corr_step01_correlate()
rule do95_plot_step01_correlations:
input:
"data/01_corr/corr.pqt"
output:
"plot/heatmap.png"
run:
from lib.do95_plot import do95_plot_step01_correlations
do95_plot_step01_correlations()
rule do95_plot_step02_plot_dist:
input:
"data/00_download/cleaned.pqt"
output:
"plot/dist.png"
run:
from lib.do95_plot import do95_plot_step02_plot_dist
do95_plot_step02_plot_dist()
rule do99_figures_step01_make_figure:
input:
"plot/dist.png"
"plot/heatmap.png"
output:
"figs/fig01.svg"
run:
from lib.do99_figures import do99_figures_step01_make_figure
do99_figures_step01_make_figure()
rule all:
input:
"figs/fig01.svg"
我以顺序的方式安排了规则,希望这将确保所有步骤都将按顺序运行。但是,当我运行snakemake
时,它只运行第一条规则,然后退出。
我已经单独检查了所有的步骤(我导入的函数),如果它们工作良好,输入和输出文件的路径。一切看起来都很好。所以我猜问题是我如何格式化蛇文件。我是snakemake
的新手(初级)。因此,如果有人指出我应该如何解决这个问题,那将是非常有帮助的。
这是预期的行为。以下是文档中的相关部分:
此外,如果在命令行中没有给出目标,Snakemake将定义Snakefile的第一条规则作为目标。因此,最好的做法是在工作流的顶部设置一个规则
all
,该规则将所有通常需要的目标文件作为输入文件。假设第一条规则的输出是目标。
如果你把rule all:
移到snake文件的顶部,它应该像预期的那样工作。