can u tell how sra is converted into fastq, I mean the algorithm used in conversion? How does fastq-dump identifies and splits into two fastq files in case of paired-end and single fastq file in case of single-end?
How does SRA file looks and how is it converted into two fastq file in case of paired end?
4 answers
SRA file is binary (not human readable), but looks just like any other file in a listing :-).
Use this guide for SRAtoolkit from NCBI, which is what you would use for converting an sra file to fastq.
You don't need to download sra files, but you can use fastq-dump from the SRAtoolkit (as @genomax2 mentioned already).
If you have the toolkit installed, you just have to name the SRA file which you want to have. It will be downloaded as a fastq file.
e.g., in linux terminal:
~/sratoolkit/bin/fastq-dump SRR2393592
Does SRR2393592_1.fastq represents reads from forward strand and SRR2393592_2.fastq represents reads from reverse strand? If not how are they splited from sra file. for example, If sra file size is 6.9GB, fastq file generated is 50.8GB how is it processing?
Yes they do. SRA files are binary and compressed. Think of this as similar to using tar or gzip to compress files.
If you are interested in software, the source code for SRA software/utilities is available on this page.
For a sra file of size 2.2GB, the fastq file generated using fastq dump was 10.8GB but fastq file of the same sample in EBI was only 2.7GB in size. why is it so?
What was the exact command used? Which SRA# are you looking at?
The command used to convert sra to fastq is fastq-dump --split-3 ERR738423.sra The above sra is single-end data. SRA file size is 2.2GB; using fastq-dump command fastq file obtained is 10.2GB; in ENA fastq file is 7GB. Why there is a huge difference in size?
use fastq-dump --split-3 command from sra-toolkit
brew or apt-get or yum will install an old version of sra toolkit, suggest to download the source and compile it.
Log in to answer this question.
ProTip: You can avoid using sratoolkit altogether. Search EBI-ENA with the SRA accession number to download fastq files directly (disclaimer: may not work for new SRA submissions, from within last day or two, but will eventually catch up).