counsyl / stor

A cross-compatible CLI and Python API for accessing block and object storage
https://counsyl.github.io/stor/
Other
35 stars 12 forks source link

Add support for DNAnexus file proxy/http serving #127

Closed jtratner closed 4 years ago

jtratner commented 4 years ago

Added DX_FILE_PROXY_URL and [dx] -> file_proxy_url setting to allow for constructing DNAnexus paths with a custom gateway. You might want this to be able to construct valid bam paths for samtools or IGV!

Really intersted in your own file proxy gateway? Email support@dnanexus.com to request it! ;) Also, you're encouraged to hit up the Bioinformatics Software Engineering team at Myriad to ask about the potential to share gateway code.

Generally, usage will look like::

$ stor url dx://proj:/folder/mypath.csv
https://dl.dnanex.us/F/D/awe1323/mypath.csv
$ export DX_FILE_PROXY_URL=https://my-dnax-proxy.example.com/gateway
$ stor url dx://proj:/folder/mypath.csv
https://my-dnax-proxy.example.com/gateway/proj/folder/mypath.csv

TODOs:

jtratner commented 4 years ago

@pkaleta - added test case and did some refactoring I think good for another pass now

jtratner commented 4 years ago

if you want me to change that filename='' behavior I'm down to change in a future PR - wasn't clear from your response