簡體   English   中英

如何忽略 Snakemake 中更改的代碼

[英]How can I ignore changed code in Snakemake

我正在使用 Snakemake 7.3.8。

我有消息說明:

Blockquote 用於生成一個或多個輸出文件的代碼已更改:要檢查哪些輸出文件已更改,請運行“snakemake --list-code-changes”。 要觸發重新運行,請使用“snakemake -R $(snakemake --list-code-changes)”。

我認為這是因為控制文件(snakefile)已被修改,並且與代碼的緩存副本不同(我將它放在 .snakemake/metadata 中)。

讓我們假設我確信代碼中的更改無關緊要並且我可以繼續。 有沒有辦法告訴 Snakemake 在不重新運行的情況下忽略代碼中的這些特定更改?

你可以運行:

snakemake -R $(snakemake --list-code-changes) --touch

觸摸選項:

--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. Note that this will only touch
files that would otherwise be recreated by Snakemake (e.g. because their
input files are newer). For enforcing a touch, combine this with --force,
--forceall, or --forcerun. Note however that you loose the provenance
information when the files have been created in realitiy. Hence, this should
be used only as a last resort. (default: False)

這對我有用:

snakemake -j 1 --list-code-changes | xargs -i -P 20 snakemake {} --cm

盡管它具有潛在的危險,因為它會刪除文件上的元數據。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM