.. _`bio/dragmap/build`: DRAGMAP ======= .. image:: https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/dragmap/build?label=version%20update%20pull%20requests :target: https://github.com/snakemake/snakemake-wrappers/pulls?q=is%3Apr+is%3Aopen+label%3Abio/dragmap/build Build hash table for Dragmap read mapper. **URL**: https://github.com/Illumina/DRAGMAP Example ------- This wrapper can be used in the following way: .. code-block:: python rule dragmap_build: input: ref="{genome}.fasta", output: idx=multiext( "{genome}/", "hash_table.cfg", "hash_table.cfg.bin", "hash_table.cmp", "hash_table_stats.txt", "reference.bin", "ref_index.bin", "repeat_mask.bin", "str_table.bin", ), log: "logs/dragmap/{genome}.build.log", params: extra="", threads: 2 wrapper: "v3.0.4/bio/dragmap/build" 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. Software dependencies --------------------- * ``dragmap=1.3.0`` Input/Output ------------ **Input:** * ``ref``: Path to reference genome sequence (Fasta formatted) **Output:** * ``idx``: Path to reference hash table Params ------ * ``extra``: Optional parameters, besides `--ht-num-threads`, `--build-hash-table`, `--ht-reference`, and `--output-directory` Authors ------- * Filipe G. Vieira Code ---- .. code-block:: python __author__ = "Filipe G. Vieira" __copyright__ = "Copyright 2022, Filipe G. Vieira" __license__ = "MIT" from pathlib import Path from snakemake.shell import shell extra = snakemake.params.get("extra", "") log = snakemake.log_fmt_shell(stdout=True, stderr=True) # Prefix that should be used for the database prefix = Path(snakemake.output[0]).parent shell( "dragen-os" " --ht-num-threads {snakemake.threads}" " --build-hash-table true" " --ht-reference {snakemake.input[0]}" " --output-directory {prefix}" " {extra}" " {log}" ) .. |nl| raw:: html