NCBI-Hackathons / EDirectCookbook

MIT License
159 stars 53 forks source link

Get filesizes for a list of SRA files #18

Open tobsecret opened 7 years ago

tobsecret commented 7 years ago

I have a pretty long list of SRA entries that I want to download but before I download everything I would like to know how big I can expect each of the files to be and how big all files will be in sum. My list contains IDs that start with ERR or PRJNA if that is important.

DCGenomics commented 7 years ago

Heres a start (for number of total bases)

esearch -db sra -query SRR5125024 | efetch -format docsum | xtract -pattern DocumentSummary -ACC @total_bases -block DocumentSummary -element "&ACC"

DCGenomics commented 7 years ago

for IDs that start with PRJNA, use the logic from the previous post on BioProject --> SRA

tobsecret commented 7 years ago

Thanks Ben!

linsalrob commented 7 years ago

I added a pull request for a solution to this using epost and esummary.