This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to retrieve an individual read with fastq-dump

After performing a blastn search against an SRA accession, I want to retrieve several dozen matching reads using SRA Toolkit. As a test, I tried this command to get one of the matching reads:

fastq-dump  --split-spot  SRR10201511.86616936.2

The expected result was a fastq file like this:

@SRR10201511.86616936.1 86616936 length=151 ATAATAAGAAAGCTGTAATGAAAATAGCCCAAACGAATAAAGGCTGTCTCTTATACACATCTAAAATATTTTTTATTAACTTAAATTAAAAAGCGAATAAAATTAAGAAAGCAATCATTAAACAGAATAAAGCAATAGATTCAGTTAAAGC
+SRR10201511.86616936.1 86616936 length=151 
AAFFFJJJJJJJJFJJFJJJFJJJJJJJJJJFJJJJFFJJJJJJFJJJJJJJJJJJJJJJJFJJJFJJJFJAJJJJFJFJJJJJJFAJAJJJF7AAJJFJJJJJJJJJJJFJFJJJJJJJJJJJ<FJ7JFFFJFJFJJJJF-<77AFFJAA 
@SRR10201511.86616936.2 86616936 length=151 
ACATAATATGTTATTACAATCTGCAAAATTTATTGGTGCTGGATTAGCTACTATTGGATTAGCAGGTGCTGGTATCGGTATCGGTTCAGTATTTAGTTCATTAGTTTTAGGTATTTCTAGAAACCTTTCTTTACAACAAGATNNNNNNNNN
+SRR10201511.86616936.2 86616936 length=151 
AAFFFJFF7AJJJJFJJJJJFJJJJJJFJJFJFJJFJFFJJAJJJJJJFFJJFJJJFJJJJ7JFJJF<AJJAJFJJFJJJJ<JJFFFJJJJJJJJFFAJJJJJ<J-7JJJJF-<FFJJJFJAAF<-AFJFJJJJF<FF-7<F#########

But instead I retrieved thousands of reads in a ~3 GB file. The first read looks like this:

@SRR10201511.86616936.2.1 1 length=151
NTTCAGCCTTGCGACCATACTCCTGTCTCTTATACACATCTAGATGTGTATAAGAGACAAGTACTAATACAGCAAAAAGACTTGTGCGATTTTTCAAGCGCAGCAACAACCACTGGCAAAGACCCCAACAGGAAGAAAGACTATAAGATCG
+SRR10201511.86616936.2.1 1 length=151
#AAFFFJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJFFJFJJJJJJJJJFJJJJJJJJJJ<JJJJJJJJJJJJJJJJJFF<AFAFFJJAAA---FAJJFJFF<FJFFF7--F---7FA<7F--))7A)--7AA<AFA-7----7A-<-<-
@SRR10201511.86616936.2.1 1 length=151
NAAAGTCTTTCTTCCTGTTAGAGTCTTTGCCAGTGGTTGTTGCTGCGCTTGAAAAATCGCACAAGTCTTTTTGCTGTATTAGTACTTGTCTCTTATACACATCTAGATGTGTATAAGAGACAGGAGAATGGTCGCAAGGCTGNNNNNNNNN
+SRR10201511.86616936.2.1 1 length=151
#AAFFJJJJJJJJ<FFJ-FJJJJ<<FJJJJFJJJJJ7FJJJJJ-FJJJ7AFJJJJJJJJJJJJJJFJFFJ-A<J7A<AFJJJJJJJFJ7FAF<FJA7FJAJ--A7<--7-7-<7FAAAFJJJF7JJ-7-7--<<-7FJ77--#########

Why am I not retrieving the desired, single read with fastq-dump?

sra fastq-dump rna-seq

1 answer

See this answer: A: Downloading individual reads from SRA

Thanks! I should have said in my initial post that I had already seen the "Downloading individual reads from SRA" post and given it a try without success. Surprisingly, when I use the example command in that post (modified here to include the missing parameter for the --fasta option), no file is returned:

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

At that point, I tried alternatives without success, but your reply did prompt me to give this approach another try with my accession and spot id. Indeed, I was able to retrieve the expected result (as shown in my original post) using this command:

fastq-dump -N 86616936 -X 86616936 --split-spot --readids  --stdout  SRR10201511

Log in to answer this question.