.. _`bio/meryl/sets`: MERYL SETS ========== .. image:: https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/meryl/sets?label=version%20update%20pull%20requests :target: https://github.com/snakemake/snakemake-wrappers/pulls?q=is%3Apr+is%3Aopen+label%3Abio/meryl/sets 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_union: input: "{genome}", "{genome}", output: directory("{genome}_union/"), log: "logs/{genome}.union.log", params: command="union-sum", wrapper: "v3.0.4/bio/meryl/sets" rule meryl_intersect: input: "{genome}", "{genome}", output: directory("{genome}_intersect/"), log: "logs/{genome}.intersect.log", params: command="intersect-max", wrapper: "v3.0.4/bio/meryl/sets" rule meryl_subtract: input: "{genome}", "{genome}", output: directory("{genome}_subtract/"), log: "logs/{genome}.subtract.log", params: command="subtract", wrapper: "v3.0.4/bio/meryl/sets" rule meryl_difference: input: "{genome}", "{genome}", output: directory("{genome}_difference/"), log: "logs/{genome}.difference.log", params: command="difference", wrapper: "v3.0.4/bio/meryl/sets" 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 how to handle the kmer sets: `union` (number of inputs) [default], `union-min` (union with minimum count), `union-max` (union with maximum count), `union-sum` (union with sum of the counts), `intersect` (intersect with counts in the first input), `intersect-min` (intersect with minimum count), `intersect-max` (intersect with maximum count), `intersect-sum` (intersect with sum of counts), `subtract` (counts from first input, subtracting counts from the other inputs), `difference` (counts from first input, but none of the other inputs), or `symmetric-difference` (exactly one input). Software dependencies --------------------- * ``meryl=2013`` Input/Output ------------ **Input:** * meryl database(s) **Output:** * meryl database 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=True, stderr=True) command = snakemake.params.get("command", "union") assert command in [ "union", "union-min", "union-max", "union-sum", "intersect", "intersect-min", "intersect-max", "intersect-sum", "subtract", "difference", "symmetric-difference", ], "invalid command specified." shell("meryl {command} {snakemake.input} output {snakemake.output} {log}") .. |nl| raw:: html