Tools‎ > ‎Sequence data‎ > ‎NCBI SRA file format‎ > ‎

prefetch

Download SRA sequence read sample files from NCBI

prefetch Sequence-run-ID

downloads and stores .sra files in
$HOME/ncbi/public/sra/
 

Example

prefetch SRR649944  

ls ~/ncbi/public/sra/
SRR649944.sra

The locally stored .sra file can be accessed by fastq-dump for further processing

fastq-dump --split-3 SRR649944
SRR649944_1.fastq
SRR649944_2.fastq

If the .sra file is not located in $HOME/ncbi/public/sra/  fastq-dump will download again.

Options


# set maximum file size download limit to 100G (default: 20G)
prefetch --max-size 100G SRR649944



read more
https://github.com/ncbi/sra-tools/wiki/Download-On-Demand
http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=toolkit_doc&f=prefetch
http://www.ncbi.nlm.nih.gov/books/NBK158899/#SRA_download.downloading_sra_data_using

prefetch --help
Usage:
  prefetch [options] <SRA accession | kart file> [...]
  Download SRA or dbGaP files and their dependencies

  prefetch [options] <SRA file> [...]
  Check SRA file for missed dependencies and download them

  prefetch --list <kart file> [...]
  List the content of a kart file

Options:
  -f|--force <value>               force object download one of: no, yes,
                                   all. no [default]: skip download if the
                                   object if found and complete; yes: download
                                   it even if it is found and is complete; all:
                                   ignore lock files (stale locks or it is
                                   beeing downloaded by another process: use
                                   at your own risk!)

  -t|--transport <value>           transport: one of: ascp; http; both. (ascp
                                   only; http only; first try ascp, use http
                                   if cannot download by ascp). Default: both
  -l|--list                        list the content of kart file
  -n|--numbered-list               list the content of kart file with kart
                                   row numbers
  -s|--list-sizes                  list the content of kart file with target
                                   file sizes
  -R|--rows <rows>                 kart rows (default all). row list should be
                                   ordered
  -N|--min-size <size>             minimum file size to download in KB
                                   (inclusive).
  -X|--max-size <size>             maximum file size to download in KB
                                   (exclusive). Default: 20G
  -o|--order <value>               kart prefetch order: one of: kart, size. (in
                                   kart order, by file size: smallest first),
                                   default: size
  -a|--ascp-path <ascp-binary|private-key-file>  path to ascp program and
                                   private key file (asperaweb_id_dsa.putty)
  -p|--progress <value>            time period in minutes to display download
                                   progress (0: no progress), default: 1

  -c|--check-all                   double-check all refseqs

  -h|--help                        Output brief explanation for the program.
  -V|--version                     Display the version of the program then
                                   quit.
  -L|--log-level <level>           Logging level as number or enum string. One
                                   of (fatal|sys|int|err|warn|info) or (0-5)
                                   Current/default is warn
  -v|--verbose                     Increase the verbosity of the program
                                   status messages. Use multiple times for more
                                   verbosity. Negates quiet.
  -q|--quiet                       Turn off all status messages for the
                                   program. Negated by verbose.
  --option-file <file>             Read more options and parameters from the
                                   file.

prefetch : 2.3.4