To separate download (prefetch) and conversion tasks (fasterq-dump).


1) prefetch: download only raw SRA files

Example: download NCBI-SRA sequence data file SRR649944 into SRA_download/ directory

( Older prefetch versions stored SRA files in $HOME/ncbi/public/sra/ )

prefetch SRR649944 -O SRA_download/

ls SRA_download/*/*


2) fasterq-dump: convert SRA to FASTQ

The locally stored SRA files can be converted by fasterq-dump into .fastq files, saved in directory FASTQ_files/

Additionally using gzip to compress .fastq files

fasterq-dump --split-3 SRA_download/SRR649944 -O FASTQ_files/

gzip FASTQ_files/*.fastq

ls FASTQ_files/



# Note, addressing the SRA identifier without exact path may cause re-download

fasterq-dump --split-3 SRR649944

If the SRA file is not located in the current working directory, fasterq-dump will download the file again using the default temporary directory $TMPDIR if no other download location is pre-defined as CACHE in → SRA-toolkit configuration.

ls $TMPDIR/.nfs*



# set maximum file size download limit to 100G (default: 20G)

prefetch --max-size 100G SRR649944

Read more

prefetch --help