SNPEFF DOWNLOAD
Download snpeff DB for a given species.
Example
This wrapper can be used in the following way:
rule snpeff_download:
output:
# wildcard {reference} may be anything listed in `snpeff databases`
directory("resources/snpeff/{reference}")
log:
"logs/snpeff/download/{reference}.log"
params:
reference="{reference}"
# optional specification of memory usage of the JVM that snakemake will respect with global
# resource restrictions (https://snakemake.readthedocs.io/en/latest/snakefiles/rules.html#resources)
# and which can be used to request RAM during cluster job submission as `{resources.mem_mb}`:
# https://snakemake.readthedocs.io/en/latest/executing/cluster.html#job-properties
resources:
mem_mb=1024
wrapper:
"v5.8.0/bio/snpeff/download"
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
snpeff=5.2
bcftools=1.21
snakemake-wrapper-utils=0.6.2
Code
__author__ = "Johannes Köster"
__copyright__ = "Copyright 2020, Johannes Köster"
__email__ = "johannes.koester@uni-due.de"
__license__ = "MIT"
from snakemake.shell import shell
from pathlib import Path
from snakemake_wrapper_utils.java import get_java_opts
java_opts = get_java_opts(snakemake)
reference = snakemake.params.reference
outdir = Path(snakemake.output[0]).parent.resolve()
log = snakemake.log_fmt_shell(stdout=False, stderr=True)
shell("snpEff download {java_opts} -dataDir {outdir} {reference} {log}")