This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Get SRA file read number easily

Hi,

I have a question that might sounds weird but I don't have "easy" way to achieve it. I have conducted SRA download to get a list of SRR, which I then converted into fastq1 et fastq2 (fow and rev). However, I haven't thought about writing the process output in a file, thus I just lost reads information. I can retrieve reads number on the project BUT I have to manually click on each SRR file and then on "reads" information. Since I have 354 SRR files, this manipulation isn't worth. I want to compute all the reads number to compare with my fastq1 and fastq2 reads number to assess I haven't lost some during the process.

I have thought about making a Perl script to load each page-related SRR information but can't achieve it in this way, OR print all SRR content and | grep "@" | wc -l for each of them, BUT it's totally time-consuming.

Would you have a simple way to do so?

Thank you in advance!

sratoolkit sra

1 answer

You can use EntrezDirect to get the number of reads in a particular accession:

$ esearch -db sra -query SRR5134861 | efetch -format runinfo | cut -d "," -f4
spots
50658231

Thank you for your response! I had read that spots number and reads number aren't substiantially the same thing. However, comparing now, it seems to be the same. I'll execute your command, thanks!

Log in to answer this question.