Difference between revisions of "HPC:BaseSpaceCLI"

From HPC wiki
Line 7: Line 7:
 
'''Setting up and downloading sequencing data using the CLI tool is done by following 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
 
   bsub -Is bash
 
   bsub -Is bash
  
==== 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
Line 18: Line 18:
 
</pre>
 
</pre>
  
==== Step 2: Set execute permissions on the downloaded files ====
+
* Step 2: Set execute permissions on the downloaded files
 +
 
 
<pre>
 
<pre>
 
$ chmod u+x $HOME/bin/bs
 
$ chmod u+x $HOME/bin/bs
Line 26: Line 27:
 
</pre>
 
</pre>
  
==== Step 3: Verify execute bit set correctly ====
+
* Step 3: Verify execute bit set correctly
 +
 
 
<pre>
 
<pre>
 
$ $HOME/bin/bs --version
 
$ $HOME/bin/bs --version
Line 36: Line 38:
 
</pre>
 
</pre>
  
==== Step 4: Connect to BaseSpace account using OAuth tokens ====
+
* Step 4: Connect to BaseSpace account using OAuth tokens  
 +
 
 
<pre>
 
<pre>
 
$ $HOME/bin/bs auth
 
$ $HOME/bin/bs auth
Line 45: Line 48:
 
'''Note:''' Click on the link that is presented when running "bs auth" then login using BaseSpace credentials and accept the OAuth token
 
'''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 ====
+
* Step 5: Verify sequencing data stored in BaseSpace is available for download  
  
 
<pre>
 
<pre>
Line 56: Line 59:
 
</pre>
 
</pre>
  
==== Step 6: Download specific RUN data stored in BaseSpace ====
+
* Step 6: Download specific RUN data stored in BaseSpace  
  
 
<pre>
 
<pre>

Revision as of 18:09, 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 1: Click on the link that is presented when running "bs cp" is first run, login using BaseSpace credentials and accept the OAuth token

Note 2: The "RunData/62036975" did not exist prior to initiating the "bs cp" operation. A different location can be used if desired.


Other Pages