参考
BGI-online网站
使用BGI Online CLI下载华大基因释放的数据
目前BGI数据主要提供三种下载方式
提供网页下载
(单或多个文件)、客户端下载
(Windows),以及CLI批量下载
(Linux)等多种方式。
1.网页版下载
step1: 登录BGI-online网站
step2:选择项目当个文件进行下载:
tips: 当选中文件夹,不提供下载功能
2.客户端下载
推荐使用Windows64位系统下载数据
Step1、下载GUI软件压缩包并解压,链接:https://pan.genomics.cn/ucdisk/s/AZjime
备注:Windows32位系统:参考上述链接下的帮助文档
OS X和Linux系统:将当前路径移到解压文件夹,在命令行执行“sh bgionline.sh”登录界面
Step2:解压后双击GUI-win\GUI-win-3.0目录下Windows批处理文件bgionline_gui.bat,也就是如下红框内的软件
Step3:在如下登录页面,先点击红框内的设置符号
Step4:在访问节点选择框中删除后面的:1001,删除:1001后点击确认
Step5:在登录页面输入用户名、密码,登录后即可下载所有数据,请务必在14天内下载所有数据
Step6:下载全部数据
3.CLI命令行批量下载
- 系统要求
Linux, OS X, Unix, or Windows
Python 2.7
pip
Step1:创建python2.7 conda 环境,安装bgionline
# 基于 python2.7 创建一个名为test_py2 的环境
conda create --name BGI_Download python=2.7
conda activate BGI_Download
安装软件
$ pip install bgionline
更新软件
$ pip install --upgrade bgionline
Step2: 查看工具帮助文件
$ bo -h
usage: bo [-h] [--version] command ...
BGI Online Command line client, version 2.2.6
optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
--config CONFIG Configuration Files folder
available commands:
{login,logout,new,select,pwd,whoami,sh,tree,ls,cd,mkdir,rm,mv,upload,download,find,transfer}
login Log in (interactively or with an existing API token)
logout Log out and remove credentials
new Create a new user/project/analysis from scratch
select List and select a project to switch to
pwd Print current working directory
sh bo shell interpreter
tree List folders and objects in a tree
ls List folders and/or objects in a folder
cd Change the current working directory
mkdir Create a new folder
rm Remove data objects and folders
mv Move or rename objects and/or folders inside a project
upload Upload file(s) or directory
download Download file(s) or directory
find Find data/job/app/project
transfer transfer project to user
Step3: 登录账号
(BGI_Download) [13:27:27] kcao@h1-lgl:~$ bo login
Logging into https://app.bgionline.cn:1001
Username: 20190227F18FTSCCWLI4389
Password: WHFUNrdmE_20190227
输入邮件中的用户名和密码,即可生成相应的配置文件夹~/.bgionline/。
ou are now logged in. Your configurations are stored in /share/disk02_8T/home/chenlianfu/.bgionline/setting.
Use bo select to choose your working project...
Available projects:
+-------+--------------------------------------+-------------------------+
| index | project id | project name |
+-------+--------------------------------------+-------------------------+
| 0 | 3d7d64df-b0a6-439a-a443-fb73058f9925 | 20190227F18FTSCCWLJ4389 |
+-------+--------------------------------------+-------------------------+
Pick a numbered choice :0
选择一个目标项目。
Setting current project to: 20190227F18FTSCCWLJ4389
(BGI_Download) [13:27:27] kcao@h1-lgl:~$ bo ls
F18FTSCCWLJ4389_FUNrdmD/
可以列出选定项目中的文件信息
(BGI_Download) [13:27:27] kcao@h1-lgl:~$ bo tree
/
└──F18FTSCCWLJ4389_FUNrdmD
└──Upload_Delivery_F18FTSCCWLJ4389_FUNrdmD_PureSequence
├──BGI_result
│ └──Separate
4 directories
以树形式列出选定项目中所有的文件夹层次信息
(BGI_Download) [13:27:27] kcao@h1-lgl:~$ bo dowload / ./
将项目中的所有文件夹下载到当前工作目录下。