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:
rule meryl_stats:
input:
"{genome}",
output:
"{genome}.stats",
log:
"logs/meryl_stats/{genome}.log",
params:
command="statistics",
wrapper:
"v1.12.2/bio/meryl/stats"
Note that input, output and log file paths can be chosen freely.
When running with
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=1.3
Input/Output¶
Input:
- meryl database(s)
Output:
- meryl stats (either the kmers, statistics, or histogram)
Authors¶
- Filipe G. Vieira
Code¶
__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}")