工具下载网址:
我下载的是linux 3.0.10版,目前最新版如下:https://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/3.1.1/sratoolkit.3.1.1-centos_linux64.tar.gz
prefetch使用
1.prefetch下载单个数据
prefetch SRR547531
2.prefetch批量下载数据
prefetch --option-file list.txt --output-directory /your/download/path
list.txt内容如下:
ERR274310
SRR547531
SRR548277
SRR847503
SRR847504
运行结果如下:

fastq-dump使用
1.fastq-dump转换sra为fastq格式
fastq-dump SRR547531 --gzip --split-3
--split-3 :不知道sra是单端还是双端,默认使用
我发现下载的时候是一个文件夹,文件夹里有一个sra数据,转换的时候,直接输入SRR547531即可完成转换,而不用输入SRR547531/SRR547531.sra
结果如下:
2.fastq-dump批量转换
for id in `cat list.txt`
do
fastq-dump /your/download/path/${id} --gzip --split-3 -O /your/path
done;
附加信息-完整参数
1.prefetch -h
Usage:
prefetch [options] <SRA accession> [...]
Download SRA files and their dependencies
prefetch [options] --cart <kart file>
Download cart file
prefetch [options] <URL> --output-file <FILE>
Download URL to FILE
prefetch [options] <URL> [...] --output-directory <DIRECTORY>
Download URL or URL-s to DIRECTORY
prefetch [options] <SRA file> [...]
Check SRA file for missed dependencies and download them
Options:
-T|--type <value> Specify file type to download. Default: sra
-t|--transport <http|fasp|both> Transport: one of: fasp; http; both
[default]. (fasp only; http only; first try
fasp (ascp), use http if cannot download
using fasp).
--location <value>