This is a test version of Biostars. For the public version, visit https://www.biostars.org.
get read length from sra

Hi everyone!

I need a method "api" to retrieve reads length from SRA.

Thanks in advance

sra rna-seq

You will only get average length of reads (which may or may not be very useful) using Entrezdirect.

$ esearch -db sra -query "SRR13310323" | efetch -format runinfo | cut -d ',' -f 1,7
Run,avgLength
SRR13310323,109

The suggested methods works. Here is another method using the SRA toolkit

fastq-dump -X 1 -Z SRR5790106 | sed -n '2p' | awk '{ print length }'

Read 1 spots for SRR5790106

Written 1 spots for SRR5790106

100

this assumes that read length is the same for all reads

0 answers

No answers yet.

Log in to answer this question.