.. _`bio/rebaler`: REBALER ======= .. image:: https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/rebaler?label=version%20update%20pull%20requests :target: https://github.com/snakemake/snakemake-wrappers/pulls?q=is%3Apr+is%3Aopen+label%3Abio/rebaler Reference-based long read assemblies of bacterial genomes Example ------- This wrapper can be used in the following way: .. code-block:: python rule rebaler: input: reference="ref.fa", reads="{sample}.fq", output: assembly="{sample}.asm.fa", log: "logs/rebaler/{sample}.log", params: extra="", wrapper: "v3.0.1/bio/rebaler" Note that input, output and log file paths can be chosen freely. When running with .. code-block:: bash snakemake --use-conda the software dependencies will be automatically deployed into an isolated environment before execution. Software dependencies --------------------- * ``rebaler=0.2.0`` Authors ------- * Michael Hall Code ---- .. code-block:: python """Snakemake wrapper for Rebaler - https://github.com/rrwick/Rebaler""" __author__ = "Michael Hall" __copyright__ = "Copyright 2020, Michael Hall" __email__ = "michael@mbh.sh" __license__ = "MIT" from snakemake.shell import shell def get_named_input(name): value = snakemake.input.get(name) if value is None: raise NameError("Missing input named '{}'".format(name)) return value def get_named_output(name): return snakemake.output.get(name, snakemake.output[0]) log = snakemake.log_fmt_shell(stdout=False, stderr=True) extra = snakemake.params.get("extra", "") reference = get_named_input("reference") reads = get_named_input("reads") output = get_named_output("assembly") shell("rebaler {extra} -t {snakemake.threads} {reference} {reads} > {output} {log}") .. |nl| raw:: html