DIAMOND BLASTP

https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/diamond/blastp?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_blastp:
    input:
        fname_fasta="{sample}.fasta",  # Query fasta file
        fname_db="db.dmnd",  # Diamond db
    output:
        fname="{sample}.tsv.gz",  # Output file
    log:
        "logs/diamond_blastp/{sample}.log",
    params:
        extra="--header --compress 1",  # Additional arguments
    threads: 8
    wrapper:
        "v3.10.2-32-gf4e5b66/bio/diamond/blastp"

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_fasta: Path to query file (Fasta formatted)

  • fname_db: Path to diamon database

Output:

  • fname: Path to query results

Params

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

Authors

  • Nikos Tsardakas Renhuldt

  • Kim Philipp Jablonski

Code

__author__ = "Kim Philipp Jablonski, Nikos Tsardakas Renhuldt"
__copyright__ = "Copyright 2020, Kim Philipp Jablonski, Nikos Tsardakas Renhuldt"
__email__ = "kim.philipp.jablonski@gmail.com, nikos.tsardakas_renhuldt@tbiokem.lth.se"
__license__ = "MIT"


from snakemake.shell import shell


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


shell(
    "diamond blastp"
    " --threads {snakemake.threads}"
    " --db {snakemake.input.fname_db}"
    " --query {snakemake.input.fname_fasta}"
    " --out {snakemake.output.fname}"
    " {extra}"
    " {log}"
)