Rohit Farmer
Rohit Farmer

Reputation: 329

Snakemake: Building DAG of jobs... Nothing to be done

Upon snakemake
I am getting

Building DAG of jobs...
Nothing to be done.

and if I try

snakemake -n dag

I get

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

I am not able to figure out what the problem is.

My main snake file:

configfile: "config_rules/config.yaml"

include : "config_rules/wholeblood.smk"

wholeblood.smk file:

# GLOBAL
g_blood = "whole"

rule all:
    input:
        expand("results/ttest_{suffix}_whole.fthr", suffix = config['suffix'])

rule wb_statstests:
    input:
        eset = "data/PAXgene/samples.all_genes.iqr/{}".format(config['whole'][0]),
        pattern_files = expand("data/GE_pattern_genes/{p_file}", p_file = config["pattern_files"])
    output:
        "results/ttest_{suffix}_whole.fthr"
    script:
        "scripts/stat_tests.R"

Upvotes: 1

Views: 4685

Answers (1)

bli
bli

Reputation: 8194

"Nothing to be done." indicates that all the files needed by the all rule already exist. Maybe config["suffix"] is empty?

snakemake -n dag tries to calculate the graph of the rules that should be executed in order to satisfy a rule named "dag" or produce a file with that name.

If what you want is a graphical representation of the rules to be executed you need the --dag option, and you need to pass its output to the dot command in order to produce a picture:

snakemake --dag | dot -Tpdf > dag.pdf

(-n is not needed when creating the graphical representation)

Upvotes: 2

Related Questions