如何避免在输入或中间输出文件更新后运行 Snakemake 规则 [英] How to avoid running Snakemake rule after input or intermediary output file was updated

查看:47
本文介绍了如何避免在输入或中间输出文件更新后运行 Snakemake 规则的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

即使 Snakemake 构建的输出文件已经存在,Snakemake 也希望重新运行我的整个管道,因为我修改了第一个输入或中间输出文件.

Even if the output files of a Snakemake build already exist, Snakemake wants to rerun my entire pipeline only because I have modified one of the first input or intermediary output files.

我通过使用 -n 进行 Snakemake 空运行来解决这个问题,它为更新的输入文件提供了以下报告:

I figured this out by doing a Snakemake dry run with -n which gave the following report for updated input file:

Reason: Updated input files: input-data.csv

以及此消息用于更新中间文件

and this message for update intermediary files

reason: Input files updated by another job: intermediary-output.csv

如何强制 Snakemake 忽略文件更新?

How can I force Snakemake to ignore the file update?

推荐答案

您可以使用选项 --touch 将它们标记为最新:

You can use the option --touch to mark them up to date:

--触摸,-t
触摸输出文件(将它们标记为最新,无需真正改变它们)而不是运行它们命令.这是用来假装规则是执行,以欺骗未来的调用蛇形.如果文件不存在则失败.

--touch, -t
Touch output files (mark them up to date without really changing them) instead of running their commands. This is used to pretend that the rules were executed, in order to fool future invocations of snakemake. Fails if a file does not yet exist.

请注意,这会影响您的所有文件,从而修改时间戳以将它们放回原处.

Beware that this will touch all your files and thus modify the timestamps to put them back in order.

这篇关于如何避免在输入或中间输出文件更新后运行 Snakemake 规则的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆