how to unpack sra file?
1
0
Entering edit mode
15 months ago

Hello,

I have downloaded a file from the SRA repository. Can I extract the fastq files from it? and how?

SRA file use unpack • 487 views
1
Entering edit mode
3
Entering edit mode
15 months ago
benformatics ★ 2.2k

Use fastq-dump

-

fastq-dump -X 5 -Z SRR390728


Prints the first five spots (-X 5) to standard out (-Z). This is a useful starting point for verifying other formatting options before dumping a whole file.

fastq-dump -I --split-files SRR390728


Produces two fastq files(--split-files) containing ".1" and ".2" read suffices (-I) for paired-end data.

1
Entering edit mode

Also if you want to download the fastqs directly - next time try the following: Fast download of FASTQ files from the European Nucleotide Archive (ENA)

1
Entering edit mode

You might want to check fasterq-dump, which is advertised as "a faster fastq-dump".

Personally, I don't think the disk space you save by using the SRA instead of FASTQ is worth the trouble of going through the painful prefetch, fastq-dump, I always check ENA first for the fastq files.

0
Entering edit mode

I personally use Aspera to pull the fastqs off the ENA - it's way faster than my answer above but I'm not sure the speed difference vs. fasterq-dump

0
Entering edit mode

fasterq-dump is based on my limited testing slower than parallel-fastq-dump given the same number of threads but an improvement towards fastq-dump. It does not offer gzip-compression, so it is nonsense for large datasets such as WGS imho. I would always start from sra though since all *_dump tools are too unstable to directly load fastq from NCBI. Still, pulling from ENA via Aspera is the fastest. One should be aware of the alternatives though since ENA will never mirrow restricted data such as dbGaP datasets.