Skip to content

Commit

Permalink
Fix issue snakemake#366
Browse files Browse the repository at this point in the history
  • Loading branch information
fgvieira committed May 7, 2024
1 parent ebef6f8 commit 01b7849
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 7 additions & 0 deletions bio/vep/cache/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,10 @@ description: Download VEP cache for given species, build and release.
url: http://www.ensembl.org/info/docs/tools/vep/index.html
authors:
- Johannes Köster
output:
- directory to store the VEP cache
params:
- url: URL from where to download cache data (optional; by default: `ftp://ftp.ensembl.org/pub`)
- species: species to download cache data
- build: build to download cache data
- release: release to download cache data
5 changes: 2 additions & 3 deletions bio/vep/cache/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@
f"{snakemake.params.species}_vep_{release}_{snakemake.params.build}.tar.gz"
)
log = snakemake.log_fmt_shell(stdout=True, stderr=True)
url = snakemake.params.get("url", "ftp://ftp.ensembl.org/pub")
shell(
"curl -L ftp://ftp.ensembl.org/pub/release-{snakemake.params.release}/"
"variation/{vep_dir}/{cache_tarball} "
"-o {tmpdir}/{cache_tarball} {log}"
"curl -L {url}/release-{snakemake.params.release}/variation/{vep_dir}/{cache_tarball} -o {tmpdir}/{cache_tarball} {log}"
)

log = snakemake.log_fmt_shell(stdout=True, stderr=True, append=True)
Expand Down

0 comments on commit 01b7849

Please sign in to comment.