File: wrapper.py

package info (click to toggle)
snakemake 7.32.4-8.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 25,836 kB
  • sloc: python: 32,846; javascript: 1,287; makefile: 247; sh: 163; ansic: 57; lisp: 9
file content (14 lines) | stat: -rw-r--r-- 506 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from snakemake.shell import shell
shell.executable("bash")
initial_log = snakemake.log_fmt_shell()
stdout_log = snakemake.log_fmt_shell(stderr=False, append=True)
stderr_log = snakemake.log_fmt_shell(stdout=False, append=True)
shell(
    """
      cat {snakemake.input} > {snakemake.output}
      echo "should not appear since next line truncates" {initial_log}
      echo "first line" {initial_log}
      (>&2 echo "a stderr message") {stderr_log}
      (echo "a stdout message") {stdout_log}
      """
)