HELLO_WORLD

https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/hello_world?label=version%20update%20pull%20requests

a test wrapper. just print hello world or name.

URL: https://github.com/conanyangqun/snakemake-wrappers-yq

Example

This wrapper can be used in the following way:

# test hello_world wrappers

rule all:
    input:
        ["a.txt", "b.txt"]

rule hello_yangq:
    output:
        "a.txt"
    params:
        name = "yangqun"
    wrapper:
        "No_Tags/bio/hello_world"

rule hello:
    output:
        "b.txt"
    wrapper:
        "No_Tags/bio/hello_world"

Note that input, output and log file paths can be chosen freely.

When running with

snakemake --use-conda

the software dependencies will be automatically deployed into an isolated environment before execution.

Params

  • name: give some name.

Authors

  • yangqun

Code

__author__ = "yangqun"

import sys
from snakemake.shell import shell

name = snakemake.params.get('name', '')
name = name if name else "world"

shell(
    "echo \"Hello {name}\" >{snakemake.output}"
)