.. _`bio/genomescope`: GENOMESCOPE =========== .. image:: https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/genomescope?label=version%20update%20pull%20requests :target: https://github.com/snakemake/snakemake-wrappers/pulls?q=is%3Apr+is%3Aopen+label%3Abio/genomescope Reference-free profiling of polyploid genomes **URL**: https://github.com/tbenavi1/genomescope2.0 Example ------- This wrapper can be used in the following way: .. code-block:: python rule genomescope: input: hist="{sample}.hist", output: multiext( "{sample}/", "linear_plot.png", "log_plot.png", "model.txt", "progress.txt", "SIMULATED_testing.tsv", "summary.txt", "transformed_linear_plot.png", "transformed_log_plot.png", ), log: "logs/genomescope/{sample}.log", params: extra="--kmer_length 32 --testing", wrapper: "v3.0.1/bio/genomescope" 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 (kmer length `-k`/`--kmer_length` is mandatory). Software dependencies --------------------- * ``genomescope2=2.0`` Input/Output ------------ **Input:** * kmer histogram **Output:** * inferred genome characteristics and plots Authors ------- * Filipe G. Vieira Code ---- .. code-block:: python __author__ = "Filipe G. Vieira" __copyright__ = "Copyright 2022, Filipe G. Vieira" __license__ = "MIT" import os from snakemake.shell import shell extra = snakemake.params.get("extra", "") log = snakemake.log_fmt_shell(stdout=True, stderr=True) out_basename = os.path.commonpath(snakemake.output) shell("genomescope2 --input {snakemake.input} {extra} --output {out_basename} {log}") .. |nl| raw:: html