BUSTOOLS TEXT

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

convert bus to tsv files

URL: https://github.com/BUStools/bustools#text

Example

This wrapper can be used in the following way:

rule test_bustools_text:
    input:
        "file.bus",
    output:
        "file.tsv",
    threads: 1
    params:
        extra="",
    log:
        "logs/bustools.log",
    wrapper:
        "v3.6.0-3-gc8272d7/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.6.0-3-gc8272d7/bio/bustools/text"

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.

Notes

When multiple bus files are provided, only one TSV file is produced.

Software dependencies

  • bustools=0.43.2

Input/Output

Input:

  • list of bus files

Output:

  • Path to TSV output

Params

  • extra: Optional parameters, besides –o/-output

Authors

Code

#!/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}")