.. _`bio/meryl/stats`: MERYL STATS =========== .. image:: https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/meryl/stats?label=version%20update%20pull%20requests :target: https://github.com/snakemake/snakemake-wrappers/pulls?q=is%3Apr+is%3Aopen+label%3Abio/meryl/stats A genomic k-mer counter (and sequence utility) with nice features. **URL**: https://github.com/marbl/meryl Example ------- This wrapper can be used in the following way: .. code-block:: python rule meryl_stats: input: "{genome}", output: "{genome}.stats", log: "logs/meryl_stats/{genome}.log", params: command="statistics", wrapper: "v3.0.4/bio/meryl/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 `command` param allows to specify which stats to print: `statistics` (display total, unique, distinct kmers) [default], `histogram` (display kmer frequency), or `print` (display kmers). Software dependencies --------------------- * ``meryl=2013`` Input/Output ------------ **Input:** * meryl database(s) **Output:** * meryl stats (either the kmers, statistics, or histogram) Authors ------- * Filipe G. Vieira Code ---- .. code-block:: python __author__ = "Filipe G. Vieira" __copyright__ = "Copyright 2022, Filipe G. Vieira" __license__ = "MIT" from snakemake.shell import shell log = snakemake.log_fmt_shell(stdout=False, stderr=True) command = snakemake.params.get("command", "statistics") assert command in [ "statistics", "histogram", "print", ], "invalid command specified." shell("meryl {command} {snakemake.input} > {snakemake.output} {log}") .. |nl| raw:: html