Difference between revisions of "HPC:BaseSpaceCLI"

From HPC wiki
Line 5: Line 5:
 
BaseSpace Sequence Hub CLI is available [https://developer.basespace.illumina.com/docs/content/documentation/cli/cli-overview#BaseSpaceSequenceHubCLI here]
 
BaseSpace Sequence Hub CLI is available [https://developer.basespace.illumina.com/docs/content/documentation/cli/cli-overview#BaseSpaceSequenceHubCLI here]
  
'''To setup the the CLI tool follow these steps'''
+
'''Setting up and downloading sequencing data using the CLI tool is done by following these steps'''
  
 
==== Step 0: Launch interactive session ====
 
==== Step 0: Launch interactive session ====
Line 12: Line 12:
 
==== Step 1: Download the CLI tools ====
 
==== Step 1: Download the CLI tools ====
 
<pre>
 
<pre>
  wget "https://api.bintray.com/content/basespace/BaseSpaceCLI-EarlyAccess-BIN/latest/\$latest/amd64-linux/bs?bt_package=latest" -O $HOME/bin/bs
+
$ wget "https://api.bintray.com/content/basespace/BaseSpaceCLI-EarlyAccess-BIN/latest/\$latest/amd64-linux/bs?bt_package=latest" -O $HOME/bin/bs
 
</pre>
 
</pre>
 
<pre>
 
<pre>
  wget https://bintray.com/basespace/BaseSpace-Copy-BIN/download_file?file_path=0.5.4.331%2Flinux%2Fbscp -O $HOME/bin/bs-cp
+
$ wget https://bintray.com/basespace/BaseSpace-Copy-BIN/download_file?file_path=0.5.4.331%2Flinux%2Fbscp -O $HOME/bin/bs-cp
 
</pre>
 
</pre>
 +
 +
==== Step 2: Set execute permissions on the downloaded files ====
 +
<pre>
 +
$ chmod u+x $HOME/bin/bs
 +
</pre>
 +
<pre>
 +
$ chmod u+x $HOME/bin/bs-cp
 +
</pre>
 +
 +
==== Step 3: Verify execute bit set correctly ====
 +
<pre>
 +
$ $HOME/bin/bs --version
 +
BaseSpaceCLI 0.9.9.595 -- built on 2018-03-19 at 11:50, using BaseSpaceGo sdk 0.6.0
 +
</pre>
 +
<pre>
 +
$ $HOME/bin/bs-cp --version
 +
bscp 0.5.4.331 (go1.8.3 on linux/amd64)
 +
</pre>
 +
 +
==== Step 4: Connect to BaseSpace account using OAuth tokens  ====
 +
<pre>
 +
$ $HOME/bin/bs auth
 +
Please go to this URL to authenticate:  https://basespace.illumina.com/oauth/device?code=
 +
Welcome,
 +
</pre>
 +
 +
Note: Click on the link that is presented when running "bs auth" then login using BaseSpace credentials and accept the OAuth token
 +
 +
==== Step 5: Verify sequencing data stored in BaseSpace is available for download ====
 +
 +
<pre>
 +
$ bs run list
 +
+--------------------------------------------------------+----------+--------------------------+----------+
 +
|                          Name                          |    Id    |      ExperimentName      |  Status  |
 +
+--------------------------------------------------------+----------+--------------------------+----------+
 +
| 180126_HSX122_0568_BHLFWLBBXX_FAB-DVT-PCRF-NANO-Pilot1 | 62036975 | FAB-DVT-PCRF-NANO-Pilot1 | Complete |
 +
+--------------------------------------------------------+----------+--------------------------+----------+
 +
</pre>
 +
 +
 +
==== Step 6: Download specific RUN data stored in BaseSpace ====
 +
 +
<pre>
 +
$ bs cp -v https://basespace.illumina.com/RUN/62036975 ./RunData/62036975
 +
Please go to this address to authenticate:
 +
    https://basespace.illumina.com/oauth/device?code=AvjpA
 +
0% 0/0 bytes 0 bits/s
 +
0% 0/0 bytes 0 bits/s
 +
RunData/62036975/Data/Intensities/BaseCalls/L002/C3.1/s_2_1102.bcl.gz
 +
RunData/62036975/Data/Intensities/BaseCalls/L002/C3.1/s_2_1119.bcl.gz
 +
RunData/62036975/Data/Intensities/BaseCalls/L002/C3.1/s_2_1109.bcl.gz
 +
RunData/62036975/Data/Intensities/BaseCalls/L001/C3.1/s_1_2226.bcl.gz
 +
RunData/62036975/Data/Intensities/BaseCalls/L002/C3.1/s_2_1203.bcl.gz
 +
RunData/62036975/Data/Intensities/BaseCalls/L002/C3.1/s_2_1104.bcl.gz
 +
RunData/62036975/Data/Intensities/BaseCalls/L008/C3.1/s_8_1226.bcl.gz
 +
RunData/62036975/Data/Intensities/BaseCalls/L002/C3.1/s_2_1101.bcl.gz
 +
RunData/62036975/Data/Intensities/BaseCalls/L002/C3.1/s_2_1115.bcl.gz
 +
 +
</pre>
 +
 +
Note: Click on the link that is presented when running "bs cp" is first run, login using BaseSpace credentials and accept the OAuth token
 +
  
 
==== Other Pages ====
 
==== Other Pages ====

Revision as of 18:02, 23 April 2018

BaseSpaceCLI

This page has information on how to set up and download sequencing data from Illumina's BaseSpace Sequence Hub.

BaseSpace Sequence Hub CLI is available here

Setting up and downloading sequencing data using the CLI tool is done by following these steps

Step 0: Launch interactive session

 bsub -Is bash

Step 1: Download the CLI tools

$ wget "https://api.bintray.com/content/basespace/BaseSpaceCLI-EarlyAccess-BIN/latest/\$latest/amd64-linux/bs?bt_package=latest" -O $HOME/bin/bs
$ wget https://bintray.com/basespace/BaseSpace-Copy-BIN/download_file?file_path=0.5.4.331%2Flinux%2Fbscp -O $HOME/bin/bs-cp

Step 2: Set execute permissions on the downloaded files

$ chmod u+x $HOME/bin/bs
$ chmod u+x $HOME/bin/bs-cp

Step 3: Verify execute bit set correctly

$ $HOME/bin/bs --version
BaseSpaceCLI 0.9.9.595 -- built on 2018-03-19 at 11:50, using BaseSpaceGo sdk 0.6.0
$ $HOME/bin/bs-cp --version
bscp 0.5.4.331 (go1.8.3 on linux/amd64)

Step 4: Connect to BaseSpace account using OAuth tokens

$ $HOME/bin/bs auth
Please go to this URL to authenticate:  https://basespace.illumina.com/oauth/device?code=
Welcome, 

Note: Click on the link that is presented when running "bs auth" then login using BaseSpace credentials and accept the OAuth token

Step 5: Verify sequencing data stored in BaseSpace is available for download

$ bs run list
+--------------------------------------------------------+----------+--------------------------+----------+
|                          Name                          |    Id    |      ExperimentName      |  Status  |
+--------------------------------------------------------+----------+--------------------------+----------+
| 180126_HSX122_0568_BHLFWLBBXX_FAB-DVT-PCRF-NANO-Pilot1 | 62036975 | FAB-DVT-PCRF-NANO-Pilot1 | Complete |
+--------------------------------------------------------+----------+--------------------------+----------+


Step 6: Download specific RUN data stored in BaseSpace

$ bs cp -v https://basespace.illumina.com/RUN/62036975 ./RunData/62036975
Please go to this address to authenticate:
    https://basespace.illumina.com/oauth/device?code=AvjpA
	0%	0/0 bytes	0 bits/s
	0%	0/0 bytes	0 bits/s
RunData/62036975/Data/Intensities/BaseCalls/L002/C3.1/s_2_1102.bcl.gz
RunData/62036975/Data/Intensities/BaseCalls/L002/C3.1/s_2_1119.bcl.gz
RunData/62036975/Data/Intensities/BaseCalls/L002/C3.1/s_2_1109.bcl.gz
RunData/62036975/Data/Intensities/BaseCalls/L001/C3.1/s_1_2226.bcl.gz
RunData/62036975/Data/Intensities/BaseCalls/L002/C3.1/s_2_1203.bcl.gz
RunData/62036975/Data/Intensities/BaseCalls/L002/C3.1/s_2_1104.bcl.gz
RunData/62036975/Data/Intensities/BaseCalls/L008/C3.1/s_8_1226.bcl.gz
RunData/62036975/Data/Intensities/BaseCalls/L002/C3.1/s_2_1101.bcl.gz
RunData/62036975/Data/Intensities/BaseCalls/L002/C3.1/s_2_1115.bcl.gz

Note: Click on the link that is presented when running "bs cp" is first run, login using BaseSpace credentials and accept the OAuth token


Other Pages