.. _`bio/bcftools/stats`: BCFTOOLS STATS ============== .. image:: https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/bcftools/stats?label=version%20update%20pull%20requests :target: https://github.com/snakemake/snakemake-wrappers/pulls?q=is%3Apr+is%3Aopen+label%3Abio/bcftools/stats Generate VCF stats using bcftools stats. **URL**: http://www.htslib.org/doc/bcftools.html#stats Example ------- This wrapper can be used in the following way: .. code-block:: python rule bcf_stats: input: "{prefix}", output: "{prefix}.stats.txt", log: "{prefix}.bcftools.stats.log", params: "", wrapper: "v3.0.1/bio/bcftools/stats" 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 `extra` param allows for additional program arguments (not `--threads`, `-f/--fasta-ref`, or `-o/--output`). * For more information see, http://www.htslib.org/doc/bcftools.html#stats Software dependencies --------------------- * ``bcftools=1.18`` * ``snakemake-wrapper-utils=0.6.2`` Input/Output ------------ **Input:** * BCF, VCF, or VCF.gz input **Output:** * stats text file Authors ------- * William Rowell * Filipe G. Vieira Code ---- .. code-block:: python __author__ = "William Rowell" __copyright__ = "Copyright 2020, William Rowell" __email__ = "wrowell@pacb.com" __license__ = "MIT" from snakemake.shell import shell from snakemake_wrapper_utils.bcftools import get_bcftools_opts bcftools_opts = get_bcftools_opts( snakemake, parse_output=False, parse_output_format=False, parse_memory=False ) extra = snakemake.params.get("extra", "") log = snakemake.log_fmt_shell(stdout=True, stderr=True) shell( "bcftools stats" " {bcftools_opts}" " {extra}" " {snakemake.input[0]}" " > {snakemake.output[0]}" " {log}" ) .. |nl| raw:: html