代码更改后Snakemake中的MissingRuleException

时间:2018-02-22 16:26:07

标签: snakemake

我有这两条规则:

all_participants = ['01','03','04','05','06','07','08']
rule all:
    input: expand("data/interim/tables/screen/p{participant_id}.csv",participant_id=all_participants)

rule extract_screen_table:
    output: "data/interim/tables/screen/p{participant_id}.csv"
    shell: "python src/data/sql_table_to_csv.py --table screen"

如果我执行snakemake一切正常,但如果我更改代码并执行:snakemake -n -R 'snakemake --list-code-changes'我收到此错误:

Building DAG of jobs...
MissingRuleException:
No rule to produce snakemake --list-code-changes (if you use input functions make sure that they don't raise unexpected exceptions).

snakemake --list-code-change的输出是:

Building DAG of jobs...
data/interim/tables/screen/p03.csv

我认为它不应该,而且我应该得到python脚本。

1 个答案:

答案 0 :(得分:1)

您必须使用反引号进行列表代码更改:`snakemake --list-code-changes`。这是用于执行包含命令的bash语法,并将STDOUT作为字符串返回。