Is there a way to download all runs for SRA id like this https://www.ncbi.nlm.nih.gov/sra/?term=SRX724870 ? I manually searching the SRA on NCBI site and using fastq-dump for each one the runs. For example, I am running following three as fastq-dump -I --split-files SRX724870 gives errors.
I have a list of SRA ids for which I am manually searching and running fastq-dump. It would be great of I can download all runs just using SRA id (e.g. SRX724870).
2021-06-10T05:07:51 fastq-dump.2.9.1 err: item not found while constructing within virtual database module - the path 'SRR1602552 SRR1602553 SRR1602554' cannot be opened as database or table
if ! type "efetch" > /dev/null; then
print "Please install E-utilitie."
fi
GSM=$1
! type "foo" > /dev/null 2>&1;
echo $GSM retrieves from NCBI GEO.....
all_data=`esearch -db sra -query $GSM |efetch -format docsum |xtract -pattern DocumentSummary -element Run@acc`
for SRR in ${all_data}
do
echo "processing" $SRR
fastq-dump -A $SRR
done
I am afraid that I may not be doing things correctly. I just copied the script into script1.sh and run sh script1.sh and it gives the following error
script1.sh: line 1: type: efetch: not found
script1.sh: line 2: print: command not found
retrieves from NCBI GEO.....
script1.sh: line 7: esearch: command not found
script1.sh: line 7: efetch: command not found
script1.sh: line 7: xtract: command not found
Just enter the query at sra-explorer : find SRA and FastQ download URLs in a couple of clicks and get download links for fastq files right away.