DIAMOND MAKEDB

https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/diamond/makedb?label=version%20update%20pull%20requests

DIAMOND is a sequence aligner for protein and translated DNA searches, designed for high performance analysis of big sequence data.

URL: https://github.com/bbuchfink/diamond/wiki

Example

This wrapper can be used in the following way:

rule diamond_makedb:
    input:
        fname = "{reference}.fasta",
    output:
        fname = "{reference}.dmnd"
    log:
        "logs/diamond_makedb/{reference}.log"
    params:
        extra=""
    threads: 8
    wrapper:
        "v3.10.2-32-gf4e5b66/bio/diamond/makedb"

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.

Software dependencies

  • diamond=2.1.9

Input/Output

Input:

  • fname: Path to reference genome sequence (Fasta formatted)

Output:

  • fname: Path to diamon database

Params

  • extra: Optional parameters, besides –threads, –in, and –db.

Authors

  • Kim Philipp Jablonski

Code

__author__ = "Kim Philipp Jablonski"
__copyright__ = "Copyright 2020, Kim Philipp Jablonski"
__email__ = "kim.philipp.jablonski@gmail.com"
__license__ = "MIT"


from snakemake.shell import shell


extra = snakemake.params.get("extra", "")
log = snakemake.log_fmt_shell(stdout=False, stderr=True)


shell(
    "diamond makedb"
    " --threads {snakemake.threads}"
    " --in {snakemake.input.fname}"
    " --db {snakemake.output.fname}"
    " {extra}"
    " {log}"
)