.. _`bio/bcftools/merge`: BCFTOOLS MERGE ============== .. image:: https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/bcftools/merge?label=version%20update%20pull%20requests :target: https://github.com/snakemake/snakemake-wrappers/pulls?q=is%3Apr+is%3Aopen+label%3Abio/bcftools/merge Merge vcf/bcf files with bcftools. **URL**: http://www.htslib.org/doc/bcftools.html#merge Example ------- This wrapper can be used in the following way: .. code-block:: python rule bcftools_merge: input: calls=["a.bcf", "b.bcf"], idx=["a.bcf.csi", "b.bcf.csi"], output: "all.bcf", log: "all.log", params: uncompressed_bcf=False, extra="", # optional parameters for bcftools concat (except -o) wrapper: "v4.6.0-24-g250dd3e/bio/bcftools/merge" 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 ----- * The `uncompressed_bcf` param allows to specify that a BCF output should be uncompressed (ignored otherwise). * The `extra` param allows for additional program arguments (not `--threads`, `-o/--output`, or `-O/--output-type`). Software dependencies --------------------- * ``bcftools=1.21`` * ``snakemake-wrapper-utils=0.6.2`` Authors ------- * Patrik Smeds * Filipe G. Vieira Code ---- .. code-block:: python __author__ = "Patrik Smeds" __copyright__ = "Copyright 2018, Patrik Smeds" __email__ = "patrik.smeds@gmail.com" __license__ = "MIT" from snakemake.shell import shell from snakemake_wrapper_utils.bcftools import get_bcftools_opts bcftools_opts = get_bcftools_opts(snakemake, parse_ref=False, parse_memory=False) extra = snakemake.params.get("extra", "") log = snakemake.log_fmt_shell(stdout=True, stderr=True) shell("bcftools merge {bcftools_opts} {extra} {snakemake.input.calls} {log}") .. |nl| raw:: html