This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Downloading individual reads from SRA

How can I download selected individual reads from SRA without downloading the whole run file using command line?

sequence sequencing next-gen gene

2 answers

You can probably use fastq-dump to download SRR1803613.479767.1 as follows but I haven't tried paired reads, etc with this.

fastq-dump -A SRR1803613 -N 479767 -X 479767 --fasta

perfect. This is what I want. I will go for this and see what I will get and will try it for paired end reads and tell you. I will work on both.

It worked well with single ends and paired ends. However, in paired ends, it downloads both not either of them alone. '-N' and '-X' options do not accept other than numerals. They do not accept the dot (.1 or .2) do you have a way to download either of them when wanted?

What do you mean by "download selected individual reads"? How do you know which reads you want to download?

fastq-dump allows streaming the output, so you can combine it with head to download the first whatever number of reads you want. However, there is random access to these files, so you can't access "individual" reads, and there is no way of skipping download a certain number of reads - you can combine head and tail, for example, but you still have to download the reads before discarding them.

I mean downloading individual reads I know their IDs just like this for example SRR123456.4564 and don't want to download the whole SRR123456 run file which may be large and will take time. Provided I want a list of reads from many SRA runs.

Just out of curiosity, how / why do you know which reads do you want?

I have already searched the whole sequences for HMMs of interest and those are the positive reads and their IDs are in the report. I want them separately.

Log in to answer this question.