代码之家  ›  专栏  ›  技术社区  ›  Julio

代码更改后Snakemake中的MissingRuleException

  •  1
  • Julio  · 技术社区  · 7 年前

    我有两条规则:

    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 回复  |  直到 7 年前
        1
  •  2
  •   Johannes Köster    7 年前

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