Downloading multiple studies SRA data through while loop
0
0
Entering edit mode
3.1 years ago
jobrien20 • 0

Hi, I'm trying to download multiple studies through esearch by providing a .txt file with the SRP names in, but for some reason the loop terminates after the first study. I was wondering if anyone knows how I can resolve this?

while read study

do
        esearch -db sra -query ${study} | efetch --format runinfo | cut -d ',' -f 1 | grep SRR |
        xargs fastq-dump  --skip-technical \
        --readids --read-filter pass --dumpbase \
        --split-3 --outdir Output_folder/${study} --gzip
        echo "${study} fastq files generated"


done < project_datas.txt
e-utilities • 523 views
ADD COMMENT
0
Entering edit mode

Did you verify that esearch is bringing back valid results for all queries? For many accessions you may want to prefetch the data and then do dump.

ADD REPLY

Login before adding your answer.

Traffic: 2643 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6