snakemake-wrappers icon indicating copy to clipboard operation
snakemake-wrappers copied to clipboard

Add cosmic database download wrapper

Open tedil opened this issue 3 years ago • 3 comments

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.

tedil avatar Apr 22 '21 09:04 tedil

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.

tedil avatar Apr 22 '21 12:04 tedil

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?

dlaehnemann avatar May 28 '21 20:05 dlaehnemann

Yes, I guess that'd be a good place to put it.

tedil avatar May 28 '21 20:05 tedil