SRA Toolkit 安装和使用

作者: JeremyL | 来源:发表于2019-04-30 00:35 被阅读3次
SRA Toolkit

sratoolkit 是NCBI提供的用于处理来自SRA 数据库测序数据的一个工具包。

#1. sratoolkit 配置

#1.1 sratoolkit 下载

首先,下载最新发布的sratoolkit(基于自己的系统选择版本):

$ wget https://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/2.9.6/sratoolkit.2.9.6-ubuntu64.tar.gz
$ tar zxvf sratoolkit.2.9.6-ubuntu64.tar.gz
$ cd sratoolkit.2.9.6-ubuntu64

#加入环境路径
$ echo 'export export PATH=$PATH:YOUR_PATH/sratoolkit.2.9.6-ubuntu64/bin' >> ~/.bash_profile
$ source ~/.bash_profile

#1.2 检查sratoolkit 的配置

$ prefetch -V

prefetch : 2.9.6

#2 sratoolkit 使用

#2.1 prefetch 下载SRA数据

使用命令行下载SRA、dbGaP和ADSP数据

  • SRP193866数据为例
$ prefetch SRR8956151
2019-04-29T09:11:25 prefetch.2.9.6: 1) Downloading 'SRR8956151'...
2019-04-29T09:11:25 prefetch.2.9.6:  Downloading via https...
2019-04-29T09:13:19 prefetch.2.9.6:  https download succeed
2019-04-29T09:13:19 prefetch.2.9.6: 1) 'SRR8956151' was downloaded successfully
2019-04-29T09:13:19 prefetch.2.9.6: 'SRR8956151' has 0 unresolved dependencies

  • 下载完成之后,SRR8956151.sra 保存在目录:/ncbi/public/sra
$ sudo updatedb 
$ locate SRR8956151.sra
~/ncbi/public/sra/SRR8956151.sra

#2.2 prefetch 批量下载数据

  • SRA Run Selector 搜索SRP193866信息, 点击Accession List获取Run Accessions: SRR_Acc_List.txt
SRA Run Selector
  • SRR_Acc_List.txt
SRR8956146
SRR8956147
SRR8956148
SRR8956149
SRR8956150
SRR8956151
prefetch --option-file SRR_Acc_List.txt
  • prefetch -h查看帮助发现:
    如果安装了asperaprefetch默认调用aspera(Aspera 的核心是 fasp传输专利技术):
-t|--transport <value>           Transport: one of: fasp; http; both. (fasp 
                                   only; http only; first try fasp (ascp), use 
                                   http if cannot download using fasp). 
                                   Default: both 

#2.3 IBM Aspera 高速数据传输功能

  • 以最快的速度发送和共享大型文件和数据集。

  • 快速传输、分发和同步大型文件和数据集。

  • 全面自动统筹、监控和控制数据传输和工作流程。

  • 通过互联网近乎零延迟地交付任何规模的数据,以及几乎无限比特率的视频。

#2.4 Aspera 安装

$ wget https://download.asperasoft.com/download/sw/connect/3.9.1/ibm-aspera-connect-3.9.1.171801-linux-g2.12-64.tar.gz
$ tar zxvf ibm-aspera-connect-3.9.1.171801-linux-g2.12-64.tar.gz
$ bash ibm-aspera-connect-3.9.1.171801-linux-g2.12-64.sh

Installing IBM Aspera Connect
Install complete.
#加入环境路径
$ echo 'export PATH=$PATH:~/.aspera/connect/bin' >> ~/.bash_profile
$ source ~/.bash_profile

#2.5 prefetch 调用Aspera

  • 数据下载速度真的快
$ prefetch SRR8956151

2019-04-29T16:20:27 prefetch.2.9.6: 1) Downloading 'SRR8956151'...
2019-04-29T16:20:27 prefetch.2.9.6:  Downloading via fasp...

#3 参考

NCBI SRA Toolkit

相关文章

网友评论

    本文标题:SRA Toolkit 安装和使用

    本文链接:https://www.haomeiwen.com/subject/rvvpnqtx.html