SNPEFF-DATABASE

Download database for snpEff annotation.

Software dependencies

  • snpeff ==4.3.1t

Example

This wrapper can be used in the following way:

rule download_snpeff_database:
    output:
        directory("resources/snpEff/GRCh38.86")
    params:
        build="GRCh38",
        release="86",
        extra=""
    log:
        "logs/snpEff_database.log"
    wrapper:
        "0.51.1/bio/reference/snpEff-database"

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.

Authors

  • Jan Forster

Code

__author__ = "Jan Forster"
__copyright__ = "Copyright 2020, Jan Forster"
__email__ = "jan.forster@uk-essen.de"
__license__ = "MIT"

from snakemake.shell import shell

from pathlib import Path

db_dir = Path(snakemake.output[0]).parent.resolve()
reference = "{}.{}".format(snakemake.params["build"], snakemake.params["release"])

log = snakemake.log_fmt_shell(stdout=False, stderr=True)


shell(" snpEff download" " -dataDir {db_dir}" " {reference}" " {log}")