Difference between revisions of "HPC:BaseSpaceCLI"

From HPC wiki
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''BaseSpaceCLI'''
+
==== '''BaseSpaceCLI''' ====
  
 
This page has information on how to set up and download sequencing data from Illumina's BaseSpace Sequence Hub.
 
This page has information on how to set up and download sequencing data from Illumina's BaseSpace Sequence Hub.
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, check if a $HOME/bin exists, if not, create it and add $HOME/bin to $PATH'''
 
   bsub -Is bash
 
   bsub -Is bash
  
==== Step 1: Download the CLI tools ====
+
  if [ ! -d $HOME/bin ]; then mkdir -v $HOME/bin; fi
 +
 
 +
  echo "export PATH=\$HOME/bin:\$PATH" >> $HOME/.bash_profile
 +
  source $HOME/.bash_profile
 +
 
 +
* '''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 24:
 
</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 33:
 
</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 44:
 
</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
Please go to this URL to authenticate:  https://basespace.illumina.com/oauth/device?code=
+
Please go to this URL to authenticate:  https://basespace.illumina.com/oauth/device?code=v34512jpA
 
Welcome,  
 
Welcome,  
 
</pre>
 
</pre>
Line 45: Line 54:
 
'''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>
$ bs run list
+
$ $HOME/bin/bs run list
 
+--------------------------------------------------------+----------+--------------------------+----------+
 
+--------------------------------------------------------+----------+--------------------------+----------+
 
|                          Name                          |    Id    |      ExperimentName      |  Status  |
 
|                          Name                          |    Id    |      ExperimentName      |  Status  |
Line 56: Line 65:
 
</pre>
 
</pre>
  
==== Step 6: Download specific RUN data stored in BaseSpace ====
+
* '''Step 6: Download specific RUN data stored in BaseSpace'''
 +
 
 +
'''Note:''' Use the "ID" from the output above in the URL below
  
 
<pre>
 
<pre>
$ bs cp -v https://basespace.illumina.com/RUN/62036975 ./RunData/62036975
+
$ $HOME/bin/bs cp -v https://basespace.illumina.com/RUN/62036975 ./RunData/FAB-DVT-PCRF-NANO-Pilot1
 
Please go to this address to authenticate:
 
Please go to this address to authenticate:
     https://basespace.illumina.com/oauth/device?code=AvjpA
+
     https://basespace.illumina.com/oauth/device?code=Av34512jpA
 
0% 0/0 bytes 0 bits/s
 
0% 0/0 bytes 0 bits/s
 
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/FAB-DVT-PCRF-NANO-Pilot1/Data/Intensities/BaseCalls/L008/C1.1/s_8_1228.bcl.gz
RunData/62036975/Data/Intensities/BaseCalls/L002/C3.1/s_2_1119.bcl.gz
+
RunData/FAB-DVT-PCRF-NANO-Pilot1/Data/Intensities/BaseCalls/L008/C1.1/s_8_2113.bcl.gz
RunData/62036975/Data/Intensities/BaseCalls/L002/C3.1/s_2_1109.bcl.gz
+
RunData/FAB-DVT-PCRF-NANO-Pilot1/Data/Intensities/BaseCalls/L008/C1.1/s_8_2108.bcl.gz
RunData/62036975/Data/Intensities/BaseCalls/L001/C3.1/s_1_2226.bcl.gz
+
RunData/FAB-DVT-PCRF-NANO-Pilot1/Data/Intensities/BaseCalls/L008/C1.1/s_8_2101.bcl.gz
RunData/62036975/Data/Intensities/BaseCalls/L002/C3.1/s_2_1203.bcl.gz
+
RunData/FAB-DVT-PCRF-NANO-Pilot1/Data/Intensities/BaseCalls/L008/C1.1/s_8_1226.bcl.gz
RunData/62036975/Data/Intensities/BaseCalls/L002/C3.1/s_2_1104.bcl.gz
+
RunData/FAB-DVT-PCRF-NANO-Pilot1/Data/Intensities/BaseCalls/L008/C1.1/s_8_2105.bcl.gz
RunData/62036975/Data/Intensities/BaseCalls/L008/C3.1/s_8_1226.bcl.gz
+
RunData/FAB-DVT-PCRF-NANO-Pilot1/Data/Intensities/BaseCalls/L008/C1.1/s_8_2114.bcl.gz
RunData/62036975/Data/Intensities/BaseCalls/L002/C3.1/s_2_1101.bcl.gz
+
RunData/FAB-DVT-PCRF-NANO-Pilot1/Data/Intensities/BaseCalls/L008/C1.1/s_8_2104.bcl.gz
RunData/62036975/Data/Intensities/BaseCalls/L002/C3.1/s_2_1115.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
 +
....
  
 
</pre>
 
</pre>
Line 78: Line 92:
 
'''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 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.
+
'''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.
  
  

Latest revision as of 02:24, 24 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, check if a $HOME/bin exists, if not, create it and add $HOME/bin to $PATH
 bsub -Is bash
 if [ ! -d $HOME/bin ]; then mkdir -v $HOME/bin; fi
 echo "export PATH=\$HOME/bin:\$PATH" >> $HOME/.bash_profile
 source $HOME/.bash_profile
  • 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
$ $HOME/bin/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

$ $HOME/bin/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