How to Setup SRA Toolkit
Before we download any files from NCIB, there are a couple of preliminary setups one should install. Most of these files are going to be downloaded into your ssh server so make sure you have a designated server account to operate on.
If you have Windows PC trying to get on ssh server you will need PUTTY setup before proceeding.
1. Open your terminal and make a new directory using the command below:mkdir sra_data
(makes new directory/ folder)cd sra_data
(goes to the directory/folder )
2. To install the SRA Toolkit go to this link, https://github.com/ncbi/sra-tools/wiki/02.-Installing-SRA-Toolkit, and install the appropriate binaries for your OS. I use Ubuntu on Mac OS so will be using that as an example (command below):wget — output-document sratoolkit.tar.gz https://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/current/sratoolkit.current-ubuntu64.tar.gz
3. Extract the file in the directorytar -vxzf sratoolkit.tar.gz
4. Once the file extraction is complete, to properly execute the toolkit, create a PATH environment in the terminal using the following command:cd
(goes back home)vi .profile
(opens the editor)
Press I
key and then hit Enter.
The terminal screen will change into — Insert —
mode.
5. Paste or input your path. For me it will look like this:export PATH=/home/compbio/sra_data/sratoolkit.3.0.1-ubuntu64/bin:$PATH
Note: Make sure you are correctly entering the pathway where your toolkit is installed. Notice the end of the directory for the toolkit is bin where the software tools e.g. fastq-dump are located.
6. Press esc key to exit the insert mode.
Enter :wq
to save your newly created PATH and to exit the editor.
7. Once you are done saving the PATH and have exited the editor, enter source .profile
in the terminal.
Yay! You are all set and ready to go. In the next write-up, I will show you how to download the FASTA/FASTQ files.
Some resources regarding Linux commands and others:
https://linuxize.com/post/how-to-remove-files-and-directories-using-linux-command-line/ (for Linux or Ubuntu command)
https://www.computerhope.com/unix/uvi.htm (for VI file manipulation commands)