Download data from NCBI-SRA
-
From apt-get
$ sudo apt update
$ sudo apt-get install sra-toolkit
-
From source (Installation tutorial)
$ wget --output-document sratoolkit.tar.gz https://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/current/sratoolkit.current-ubuntu64.tar.gz
$ tar -vxzf sratoolkit.tar.gz
$ vi ~/.bashrc
export PATH=$PATH:$PWD/sratoolkit.3.0.0-mac64/bin
$ source ~/.bashrc
$ vdb-config -i # -i open the config as interactive mode
- Press "t" to move to the "TOOLS" tab (or press TAB to move one by one and ENTER)
- Set "prefetch downloads to "current directory"
- Press "s" followed by "o" to save; press "x" to exit
- Press "c" to move to "CACHE"
- Press "o" to choose location of user-repository; use up & down arrow and ENTER
- Press TAB to shift to OK tab and press ENTER followed by "y" for yes
- Press "t" to move to "TOOLS" tab
- Shift the asterisk to "user-repository"
- Press "s" followed by "o" to save; press "x" to exit
- Search for the Bioproject accession number (exp. PRJNA323955) in the NCBI database
- Click on the SRA link within the top-right "Related information" panel
- Click on the link "Send results to Run selector"
- Click on the "Accession List" button within the Download column of the Select panel. Named the accession list as "SRR_Acc_List.txt"
$ for i in `cat SRR_Acc_List.txt`; do
fasterq-dump ${i};
done;
$ mkdir sra
$ for i in `cat SRR_Acc_List.txt`; do
prefetch --max-size u ${i};
done;
$ mkdir fastq
$ for j in ./sra/*.sra; do
fasterq-dump --threads 40 --progress --force -O ../fastq ${j};
done;