還在羨慕海峽那邊的朋友下載SRA 快到飛起装黑?還在難過用wget 下載數(shù)據(jù)經(jīng)常下載不完整?用了官方的下載工具還是慢的不行亚侠?這里有一個(gè)SRA 下載自救嘗試指南供你參考曹体。
需要用到兩個(gè)工具
- SRA Toolkit
- IBM aspera 高速文件傳輸工具
因?yàn)檫@是一篇極簡(jiǎn)自救指南,所以一切都不解釋硝烂,直接給出鏈接箕别,不明白的自行學(xué)習(xí)(愛學(xué)不學(xué))。
SRA Toolkit 網(wǎng)址:https://trace.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=toolkit_doc
aspera 網(wǎng)址:https://support.asperasoft.com/hc/en-us
aspera 官方對(duì)于下載NCBI數(shù)據(jù)的說明
SRA Toolkit 官方對(duì)于使用aspera的說明:
https://www.ncbi.nlm.nih.gov/books/NBK242625/
https://trace.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=toolkit_doc&f=prefetch
快速自救前奏
- 下載 aspera (選擇linux版本)
https://downloads.asperasoft.com/en/downloads/8?list
- 安裝 aspera
wget https://download.asperasoft.com/download/sw/connect/3.8.1/ibm-aspera-connect-3.8.1.161274-linux-g2.12-64.tar.gz
# 小心版本號(hào)有變動(dòng),不要直接復(fù)制上面的命令
tar zxvf ibm-aspera-connect-3.8.1.161274-linux-g2.12-64.tar.gz
bash ibm-aspera-connect-3.8.1.161274-linux-g2.12-64.sh
# 默認(rèn)安裝路徑 /home/user/.aspera
- 安裝 sra toolkit 具體命令省略串稀,注意一定要安裝最新版本:)
正式開始自救
目前中文關(guān)于使用 aspera 下載 sra 數(shù)據(jù)的幾篇教程都寫的婆婆媽媽亂七八糟除抛,千萬(wàn)不要再看了!
記住母截,正式的自救只需要兩步到忽,其它寫一大串的文章都是“耍流氓”。
把要下載的數(shù)據(jù)SRR號(hào)寫入一個(gè)文件srr.txt清寇,每行是一個(gè)SRR id
利用SRA toolkit 的
prefetch
下載喘漏,并指定下載方式為ascp
,命令如下华烟,各種參數(shù)的含義自行查看文檔(愛看不看)
prefetch -t ascp -a "/home/user/.aspera/connect/bin/ascp|/home/user/.aspera/connect/etc/asperaweb_id_dsa.openssh" --option-file srr.txt -O /opt/user/ncbi
其中-a 參數(shù)中必須要用絕對(duì)路徑寫上ascp所在的位置和previte KEY 的位置翩迈,如果是正常安裝只需要把user替換為自己的用戶名。
自救效果測(cè)試
下載了八個(gè)SRR文件盔夜,平均一個(gè)大小5G左右负饲,使用時(shí)間如下:
2018-09-05T14:14:33 prefetch.2.9.2: 1) Downloading 'SRR******'...
2018-09-05T14:14:33 prefetch.2.9.2: Downloading via fasp...
SRR******
2018-09-05T14:16:58 prefetch.2.9.2: fasp download succeed
2018-09-05T14:16:58 prefetch.2.9.2: 1) 'SRR******' was downloaded successfully
2018-09-05T14:17:01 prefetch.2.9.2: 2) Downloading 'SRR******'...
2018-09-05T14:17:01 prefetch.2.9.2: Downloading via fasp...
SRR******
2018-09-05T14:19:25 prefetch.2.9.2: fasp download succeed
2018-09-05T14:19:25 prefetch.2.9.2: 2) 'SRR******' was downloaded successfully
2018-09-05T14:19:28 prefetch.2.9.2: 3) Downloading 'SRR******'...
2018-09-05T14:19:28 prefetch.2.9.2: Downloading via fasp...
SRR******
2018-09-05T14:22:31 prefetch.2.9.2: fasp download succeed
2018-09-05T14:22:31 prefetch.2.9.2: 3) 'SRR******' was downloaded successfully
2018-09-05T14:22:35 prefetch.2.9.2: 4) Downloading 'SRR******'...
2018-09-05T14:22:35 prefetch.2.9.2: Downloading via fasp...
SRR******
2018-09-05T14:25:14 prefetch.2.9.2: fasp download succeed
2018-09-05T14:25:14 prefetch.2.9.2: 4) 'SRR******' was downloaded successfully
2018-09-05T14:25:17 prefetch.2.9.2: 5) Downloading 'SRR******'...
2018-09-05T14:25:17 prefetch.2.9.2: Downloading via fasp...
SRR******
2018-09-05T14:26:46 prefetch.2.9.2: fasp download succeed
2018-09-05T14:26:46 prefetch.2.9.2: 5) 'SRR******' was downloaded successfully
2018-09-05T14:26:49 prefetch.2.9.2: 6) Downloading 'SRR******'...
2018-09-05T14:26:49 prefetch.2.9.2: Downloading via fasp...
SRR******
2018-09-05T14:28:13 prefetch.2.9.2: fasp download succeed
2018-09-05T14:28:13 prefetch.2.9.2: 6) 'SRR******' was downloaded successfully
2018-09-05T14:28:16 prefetch.2.9.2: 7) Downloading 'SRR******'...
2018-09-05T14:28:16 prefetch.2.9.2: Downloading via fasp...
SRR******
2018-09-05T14:29:56 prefetch.2.9.2: fasp download succeed
2018-09-05T14:29:56 prefetch.2.9.2: 7) 'SRR******' was downloaded successfully
2018-09-05T14:30:00 prefetch.2.9.2: 8) Downloading 'SRR******'...
2018-09-05T14:30:00 prefetch.2.9.2: Downloading via fasp...
SRR******
2018-09-05T14:31:58 prefetch.2.9.2: fasp download succeed
2018-09-05T14:31:58 prefetch.2.9.2: 8) 'SRR******' was downloaded successfully
喏,5G的文件喂链,即便是在(你懂的)這種網(wǎng)絡(luò)狀況下返十,一個(gè)也只需要不到2分鐘。
自救成功椭微,祝好洞坑!