Julio
Julio

Reputation: 318

MissingRuleException in Snakemake after code changes

I have these two rules:

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"

If I execute snakemake everything works, but if I change the code and execute: snakemake -n -R 'snakemake --list-code-changes' I get this error:

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).

The output of snakemake --list-code-change is:

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

which I reckon it shouldn't be, and I should get the python script instead.

Upvotes: 1

Views: 1891

Answers (1)

Johannes Köster
Johannes Köster

Reputation: 1947

You have to use backticks for the list-code-changes: `snakemake --list-code-changes`. This is bash syntax for execute the contained command and return STDOUT as a string.

Upvotes: 2

Related Questions