The --printshellcmds argument not propagate to Snakemake wrappers.

Create issue
Issue #1283 new
Fong Chun Chan created an issue

Description

The --printshellcmds argument not propagate to Snakemake wrappers.

Snakemake version

5.6.0

Minimal example

Consider the following file structure:

├── Snakefile
└── wrappers
    └── dummy_tool
        └── dummy_function
            └── wrapper.py

My wrappers/dummy_tool/dummy_function/wrapper.py has the following contents:

from snakemake.shell import shell

shell(
    """
    touch {snakemake.output}
    """
)

My Snakefile has the following contents:

rule rule_a:
    output:
        "rule_a_output.txt"
    wrapper:
        "file:wrappers/dummy_tool/dummy_function"

rule rule_b:
    output:
        "rule_b_output.txt"
    shell:
        """
        touch {output}
        """

When running snakemake rule_a rule_b -np, I get this output:

Building DAG of jobs...
Job counts:
        count   jobs
        1       rule_a
        1       rule_b
        2

[Fri Sep 13 18:48:50 2019]
rule rule_a:
    output: rule_a_output.txt
    jobid: 0

[Fri Sep 13 18:48:50 2019]
rule rule_b:
    output: rule_b_output.txt
    jobid: 1


        touch rule_b_output.txt

Job counts:
        count   jobs
        1       rule_a
        1       rule_b
        2
This was a dry-run (flag -n). The order of jobs does not reflect the order of execution.

Only the command to be executed for rule_b is printed. The command to be executed for rule_a does not get printed.

Comments (0)

  1. Log in to comment