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 and check if a $HOME/bin exists, if not, create it'''
 
   bsub -Is bash
 
   bsub -Is bash
 +
  if [ ! -d $HOME/bin ]; then mkdir -v $HOME/bin; fi
  
 
* '''Step 1: Download the CLI tools'''
 
* '''Step 1: Download the CLI tools'''

Revision as of 20:36, 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 and check if a $HOME/bin exists, if not, create it
 bsub -Is bash
 if [ ! -d $HOME/bin ]; then mkdir -v $HOME/bin; fi
  • 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=v34512jpA
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

Note: Use the "ID" from the output above in the URL below

$ bs cp -v https://basespace.illumina.com/RUN/62036975 ./RunData/FAB-DVT-PCRF-NANO-Pilot1 
Please go to this address to authenticate:
    https://basespace.illumina.com/oauth/device?code=Av34512jpA
	0%	0/0 bytes	0 bits/s
	0%	0/0 bytes	0 bits/s
RunData/FAB-DVT-PCRF-NANO-Pilot1/Data/Intensities/BaseCalls/L008/C1.1/s_8_1228.bcl.gz
RunData/FAB-DVT-PCRF-NANO-Pilot1/Data/Intensities/BaseCalls/L008/C1.1/s_8_2113.bcl.gz
RunData/FAB-DVT-PCRF-NANO-Pilot1/Data/Intensities/BaseCalls/L008/C1.1/s_8_2108.bcl.gz
RunData/FAB-DVT-PCRF-NANO-Pilot1/Data/Intensities/BaseCalls/L008/C1.1/s_8_2101.bcl.gz
RunData/FAB-DVT-PCRF-NANO-Pilot1/Data/Intensities/BaseCalls/L008/C1.1/s_8_1226.bcl.gz
RunData/FAB-DVT-PCRF-NANO-Pilot1/Data/Intensities/BaseCalls/L008/C1.1/s_8_2105.bcl.gz
RunData/FAB-DVT-PCRF-NANO-Pilot1/Data/Intensities/BaseCalls/L008/C1.1/s_8_2114.bcl.gz
RunData/FAB-DVT-PCRF-NANO-Pilot1/Data/Intensities/BaseCalls/L008/C1.1/s_8_2104.bcl.gz
RunData/FAB-DVT-PCRF-NANO-Pilot1/Data/Intensities/BaseCalls/L008/C1.1/s_8_2107.bcl.gz
RunData/FAB-DVT-PCRF-NANO-Pilot1/Data/Intensities/BaseCalls/L008/C1.1/s_8_1227.bcl.gz
RunData/FAB-DVT-PCRF-NANO-Pilot1/Data/Intensities/BaseCalls/L008/C1.1/s_8_1223.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/FAB-DVT-PCRF-NANO-Pilot1" did not exist prior to initiating the "bs cp" operation. A different location can be used if desired.


Other Pages