@genomax, thank you! I tried the ftp link from sra-explorer into linux array to download a batch of files but gave an error that No such file exists.
Hello, I want to download sequence files from NCBI FTP SRA. I am not sure how to find a ftp hyperlink for the file location from NCBI.
2 answers
Use sra-explorer tool from Phil Ewels: sra-explorer : find SRA and FastQ download URLs in a couple of clicks
Take a look at example screenshots I have posted in that thread.
Please show relevant code.
Hello, I want to download many files using array from ftp. But I checked the ftp link for an individual file manually and it seems the directory is empty. Is there any other way to access the ftp files?
Details please!!! Which ftp site, which samples??
For a list of files I am using this array on linux:
lines=$(wc -l input.txt|cut -f 1 -d ' ')
for i in $(eval echo {1..$lines}); do
name=$(head -n $i input.txt|tail -n 1 |cut -f 1)
var1=$(head -n $i input.txt|tail -n 1 |cut -f 2)
var2=$(head -n $i input.txt|tail -n 1 |cut -f 3)
input=$(echo ftp://ftp.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX239/$var1/$var2/$var2.sra)
wget -I $input -O $name
done
Thank you for your help!
This is overly complicated. Why not just getting the download links provided by sra-explorer?
May be this help: Download SRA file
Log in to answer this question.