介绍
SRA Toolkit是下载NCBI SRA数据库文件的下载和转换为fastq的工具
SRA Toolkit安装
首先进入官网下载对应版本的SRA Toolkit:Download : Software : Sequence Read Archive : NCBI/NLM/NIH
安装过程非常简单:
cd /local/txm/software
wget https://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/2.11.0/sratoolkit.2.11.0-centos_linux64.tar.gz
tar -zvxf sratoolkit.2.11.0-centos_linux64.tar.gz
vi ~/.bashrc
export PATH=$PATH:/local/txm/software/sratoolkit.2.11.0-centos_linux64/bin
添加环境变量之后,输入命令prefetch,提示:
This sra toolkit installation has not been configured.
Before continuing, please run: vdb-config --interactive
For more information, see https://www.ncbi.nlm.nih.gov/sra/docs/sra-cloud/
查看官方指南https://github.com/ncbi/sra-tools/wiki/02.-Installing-SRA-Toolkit,发现还要进行Configuration,终端继续输入:
vdb-config -i
出现如下界面,需要设置一个空目录作为文件下载位置
SRA Toolkit使用
下载sra文件
首先进入GEO数据库某个GSE的主界面,如果有原始数据提供,会在最下方有SRA Run Selector按钮,点击进入后,即可看到相关的SRR文件。
下载单个SRR文件:
prefetch SRR********
下载多个SRR文件需要先下载Accession List,然后:
prefetch --option-file SRR_Acc_List.txt
如果提示:
'SRRXXXX' (316GB) is larger than maximum allowed: skipped
添加--max-size参数即可
prefetch --max-size 999999999999 SRR6367155
sra转化成fastq格式
单端测序(SINGLE)数据:
fastq-dump SRR2061752.sra
双端测序(PAIRED)数据:
fasterq-dump --split-files SRR2061752.sra
参考:
https://www.jianshu.com/p/26f6083f0e7f
https://www.jianshu.com/p/88b2852d4573
https://www.biostars.org/p/334930/
https://zhuanlan.zhihu.com/p/577913028
https://blog.csdn.net/weixin_43745169/article/details/93311701