.. _`bio/bustools/text`: BUSTOOLS TEXT ============= .. image:: https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/bustools/text?label=version%20update%20pull%20requests :target: https://github.com/snakemake/snakemake-wrappers/pulls?q=is%3Apr+is%3Aopen+label%3Abio/bustools/text convert bus to tsv files **URL**: https://github.com/BUStools/bustools#text Example ------- This wrapper can be used in the following way: .. code-block:: python rule test_bustools_text: input: "file.bus", output: "file.tsv", threads: 1 params: extra="", log: "logs/bustools.log", wrapper: "v3.0.1/bio/bustools/text" rule test_bustools_text_list: input: ["file.bus", "file2.bus"], output: "file2.tsv", threads: 1 params: extra="--flags --pad", log: "logs/bustools.log", wrapper: "v3.0.1/bio/bustools/text" 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. Notes ----- When multiple bus files are provided, only one TSV file is produced. Software dependencies --------------------- * ``bustools=0.43.1`` Input/Output ------------ **Input:** * list of bus files **Output:** * Path to TSV output Params ------ * ``extra``: Optional parameters, besides `--o/-output` Authors ------- Code ---- .. code-block:: python #!/usr/bin/env python3 # conding: utf-8 """snakemake wrapper for bustool text""" __author__ = "Thibault Dayris" __copyright__ = "Copyright 2022, Thibault Dayris" __email__ = "thibault.dayris@gustaveroussy.fr" __license__ = "MIT" from snakemake.shell import shell log = snakemake.log_fmt_shell(stdout=True, stderr=True) extra = snakemake.params.get("extra", "") bus_files = snakemake.input[0] if isinstance(bus_files, list): bus_files = " ".join(bus_files) shell("bustools text --output {snakemake.output[0]} {extra} {bus_files} {log}") .. |nl| raw:: html