Downloading multiple studies SRA data through while loop
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
• 809 views
•
link
0 answers
No answers yet.
Log in to answer this question.
Did you verify that
esearchis bringing back valid results for all queries? For many accessions you may want toprefetchthe data and then do dump.