Proposal
Currently, we use an outdated python script to download data from BaseSpace: https://github.com/bailey-lab/MIPTools/blob/70c9c26cd86af33f5eb75bdd0c4c43edfedc26d4/bin/BaseSpaceRunDownloader_v2.py. BaseSpace has released tools to work with data on the CLI. To prevent code breakage down the line, we propose using BaseSpace's tools.
Working With BaseSpace CLI
Below, I discuss some of my thoughts in reading through the BaseSpace documentation.
Installation
Installation is straightforward, however, we may consider changing the installation location. We may also need to change file permissions using chmod.
# Install
wget "https://launch.basespace.illumina.com/CLI/latest/amd64-linux/bs" -O $HOME/bin/bs
# Change file permission
chmod u+x $HOME/bin/bs
Authentication
Interactively, the user can run the authentication command and then go the URL provided to sign in.
bs auth
#> Please go to this URL to authenticate: https://basespace.illumina.com/oauth/device?code=6Cesj
The resulting config file will be stored in $HOME/.basespace.
However, there are a couple of additional factors to consider. We need to think about the best way to automate this process. A couple of notes to consider:
- We are able to specify the API server. It may be useful to let the user customize this depending on where they are located (e.g., US vs UK).
- The user can store config info in a file and then load it:
bs load config. This may make it easier to inject credentials.
Downloading data
Downloading data is simple, but there are many options. What is the best strategy to implement for our purposes?
# Single run
bs download run -i <RunID> -o <output>
# Multiple runs in a project
bs download project -i <ProjectID> -o <output>
# Subset of a project
bs download project -i <ProjectID> -o <output> --extension=fastq.gz
Implementation
We can install the CLI tool into our container. We will need to modify the download app to call either a series of commands or a script rather than the python script. We can provide several options with default values:
| Flag |
Function |
| -s, --api-server |
the API server |
| -i, -run-id |
run ID |
| -o, --out-dir |
output dir |
Proposal
Currently, we use an outdated python script to download data from BaseSpace: https://github.com/bailey-lab/MIPTools/blob/70c9c26cd86af33f5eb75bdd0c4c43edfedc26d4/bin/BaseSpaceRunDownloader_v2.py. BaseSpace has released tools to work with data on the CLI. To prevent code breakage down the line, we propose using BaseSpace's tools.
Working With BaseSpace CLI
Below, I discuss some of my thoughts in reading through the BaseSpace documentation.
Installation
Installation is straightforward, however, we may consider changing the installation location. We may also need to change file permissions using
chmod.Authentication
Interactively, the user can run the authentication command and then go the URL provided to sign in.
bs auth #> Please go to this URL to authenticate: https://basespace.illumina.com/oauth/device?code=6CesjThe resulting config file will be stored in
$HOME/.basespace.However, there are a couple of additional factors to consider. We need to think about the best way to automate this process. A couple of notes to consider:
bs load config. This may make it easier to inject credentials.Downloading data
Downloading data is simple, but there are many options. What is the best strategy to implement for our purposes?
Implementation
We can install the CLI tool into our container. We will need to modify the download app to call either a series of commands or a script rather than the python script. We can provide several options with default values: