snakemake-wrappers
snakemake-wrappers copied to clipboard
Add cosmic database download wrapper
This PR adds a wrapper for downloading files from COSMIC. It expects the following parameters to be set:
-
build
(at the moment either "GRCh37" or "GRCh38") -
dataset
(at the moment either "cosmic" or "cell_lines") -
version
(at the moment "v83" to "v92" or "latest") -
file
(which in the example Snakefile is derived from the output via the{db}
wildcard)
Since new builds, datasets, versions and files may be added in the future, this wrapper will query the endpoints in order to check if the requested combination is actually available (at the time this wrapper is executed).
Since COSMIC needs authentication, email and password have to be given in the env vars COSMIC_EMAIL
and COSMIC_PW
.
The tests fail because no credentials (i.e. environment variables COSMIC_EMAIL
and COSMIC_PW
) are defined. Since we probably don't want a dummy account stored in this repo's github secrets, it's best to use either a little flask app which serves as ta mock restful api for the requests in this wrapper, or use a more general approach such as https://github.com/stoplightio/prism and have that be available for any wrapper.
I have to admit I don't fully understand the solutions you propose, but is that something that would make sense to have in snakemake-wrapper-utils?
Yes, I guess that'd be a good place to put it.