Is it possible to print commands instead of rules in snakemake dry run?

Viewed 3042

Dry runs are a super important functionality of workflow languages. What I am looking at is mostly what would be executed if I run the command and this is exactly what one see when running make -n.

However analogical functionality snakemake -n prints something like

Building DAG of jobs...

rule produce_output:
    output: my_output
    jobid: 0
    wildcards: var=something

Job counts:
    count   jobs
    1   produce_output
    1

The log contains kind of everything else than commands that get executed. Is there a way how to get command from snakemake?

2 Answers
snakemake -p --quiet -n

-p for print shell commands
-n for dry run
--quiet for removing the rest

EDIT 2019-Jan

This solution seems broken for lasts versions of snakemake

snakemake -p -n

Avoid the --quiet reported in the @eric-c answer, at least in some situations the combination on -p -n -q does not print the command executed without -n.

Related