Easiest Way to Download All Sra Samples or Multi Experiment file from NCBI SRA database

European Nucleotide Archive is good place to start to download the raw fastq files. But it is not easy to download multiple run files from NCBI SRA database. I recently learn to download in relatively easy way. I want to download these four run together from NCBI SRA database : SRR122247,SRR122248,SRR122249, SRR122250. Format of basic url is like that
ftp://ftp-trace.ncbi.nih.gov/sra/sra-instant/reads/ByRun/sra/{SRR|ERR|DRR}/<first 6 characters of accession>/<accession>/<accession>.sra
Where {SRR|ERR|DRR} should be either ‘SRR’, ‘ERR’, or ‘DRR’ and should match the prefix of the target .sra file Described in details HERE. So my final urls will look like this

ftp://ftp-trace.ncbi.nih.gov/sra/sra-instant/reads/ByRun/sra/SRR/SRR122/SRR122247/SRR122247.sra
ftp://ftp-trace.ncbi.nih.gov/sra/sra-instant/reads/ByRun/sra/SRR/SRR122/SRR122248/SRR122248.sra
ftp://ftp-trace.ncbi.nih.gov/sra/sra-instant/reads/ByRun/sra/SRR/SRR122/SRR122249/SRR122249.sra
ftp://ftp-trace.ncbi.nih.gov/sra/sra-instant/reads/ByRun/sra/SRR/SRR122/SRR122250/SRR122250.sra
Now save this urls in a text file (url_list.txt, for example). Run the wget like this
wget -i url_list.txt
run sudo apt-get install wget from terminal if you don't have wget

No comments:

Post a Comment

Have Problem ?? Drop a comments here!