Follow me on GitHub

使用Aspera (ascp 命令)从NCBI高速下载数据

1. 简介

生物信息研究人员往往需要从NCBI/sra 或者EBI/ENA下载高通量的测序数据。而通过NCBI申请获得的数据往往需要通过Aspeara进行下载。

2. Aspeara 安装

$ wget http://d3gcli72yxqn2z.cloudfront.net/connect/bin/aspera-connect-3.5.1.92523-linux-64.tar.gz
$ tar zxf aspera-connect-3.5.1.92523-linux-64.tar.gz
$ sh aspera-connect-3.5.1.92523-linux-64.sh
$ echo 'PATH=$PATH:~/.aspera/connect/bin/' >> ~/.bashrc
$ source ~/.bashrc
$ ascp --help

 

注意,此时软件安装在 ~/.aspera/connect/ 目录下。

 

3. Aspeara 主要参数

Aspera的用法:
$ ascp [参数] 目标文件 目的地址

Aspera的常用参数:
-T
    不进行加密。若不添加此参数,可能会下载不了。
-i string
    输入私钥,安装 aspera 后有在目录 ~/.aspera/connect/etc/ 下有几个私钥,使用 linux 服务器的时候一般使用 ~/.aspera/connect/etc/ asperaweb_id_dsa.openssh 文件作为私钥。
--host=string
    ftp的host名,NCBI的为ftp-private.ncbi.nlm.nih.gov;EBI的为fasp.sra.ebi.ac.uk。
--user=string
    用户名,NCBI的为anonftp,EBI的为era-fasp。
--mode=string
    选择模式,上传为 send,下载为 recv。
-l string
    设置最大传输速度,比如设置为 200M 则表示最大传输速度为 200m/s。若不设置该参数,则一般可达到10m/s的速度,而设置了,传输速度可以更高。

4. Aspeara 下载参考命令

ascp -QTr -l 300M -k 1 -i ~/.aspera/connect/etc/asperaweb_id_dsa.openssh  anonftp@ftp-private.ncbi.nlm.nih.gov:/sra/sra-instant/reads/ByRun/sra/ERR/ERR105/ERR105009/ERR105009.sra ./
 

 

5. 参考博客

http://blog.sciencenet.cn/home.php?mod=space&uid=689440&do=blog&quickforward=1&id=1023672

http://www.chenlianfu.com/?p=2319

http://boyun.sh.cn/bio/?p=1933

https://www.plob.org/article/3013.html

https://www.biostars.org/p/93482/  

 

posted @ 2020-07-23 17:40  SiyuanChen  阅读(8716)  评论(0编辑  收藏  举报