.. _`bio/bgzip`: BGZIP ===== .. image:: https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/bgzip?label=version%20update%20pull%20requests :target: https://github.com/snakemake/snakemake-wrappers/pulls?q=is%3Apr+is%3Aopen+label%3Abio/bgzip Block compression/decompression utility **URL**: https://github.com/samtools/htslib Example ------- This wrapper can be used in the following way: .. code-block:: python rule bgzip: input: "{prefix}.vcf", output: "{prefix}.vcf.gz", params: extra="", # optional threads: 1 log: "logs/bgzip/{prefix}.log", wrapper: "v3.0.1/bio/bgzip" 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 --------------------- * ``htslib=1.18`` Input/Output ------------ **Input:** * file to be compressed or decompressed **Output:** * compressed or decompressed output Authors ------- * William Rowell Code ---- .. code-block:: python __author__ = "William Rowell" __copyright__ = "Copyright 2020, William Rowell" __email__ = "wrowell@pacb.com" __license__ = "MIT" from snakemake.shell import shell extra = snakemake.params.get("extra", "") log = snakemake.log_fmt_shell(stdout=True, stderr=True) shell( """ (bgzip -c {extra} --threads {snakemake.threads} \ {snakemake.input} > {snakemake.output}) {log} """ ) .. |nl| raw:: html