5

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?

Kamil S Jaron
  • 494
  • 10
  • 23

2 Answers2

3
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

Eric C.
  • 3,310
  • 2
  • 22
  • 29
3
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.

Kamil S Jaron
  • 494
  • 10
  • 23
mox
  • 447
  • 6
  • 15
  • 1
    In my snakemake 5.2.2, this also prints rules, input, output etc... which, from what I understood of the question, was not what was asked. I cannot find a way to print only the shell commands ! – Eric C. Feb 06 '19 at 10:39