gdc-client

引言

之前一直用别的方法下载数据,这次使用了gdc-client命令行去下载GDC上TCGA driver gene mutation的一批数据。

步骤

1. 找到自己需要的数据

这是我本次要下载的数据

点击数据下载地址发现出现如下界面,其中id就是使用gdc-client下载的文件对应的id

对于Open access data,使用这两种方法下载

下载了MAC的Client版本

2. 安装

解压下载的文件,如果双击会发现出现erro:

且常规的对~/.bash_profile文件添加环境变量也不可以,正确做法是:

./gdc-client #(to verify that program works)
cp -pi ./gdc-client /usr/local/bin #(if this does not work)
sudo cp -pi ./gdc-client /usr/local/bin 

在任何路径都可以打开。

3. 使用

  • 下载单个文件
gdc-client download id
  • 下载多个文件

将含有多个文件的id和名字等信息的页面存储为txt,download加上-m,进行批量下载。

gdc-client download -m ./PanCan-Driver_Open_GDC-Manifest.txt

token

对于需要使用token的数据,使用如下代码:

gdc-client download -m gdc_manifest_e24fac38d3b19f67facb74d3efa746e08b0c82c2.txt -t gdc-user-token.2015-06-17T09-10-02-04-00.txt

保护token:

chmod 600 gdc-user-token.2015-06-17T09-10-02-04-00.txt

下载最新的数据,加上--latest

gdc-client download 426de656-7e34-4a49-b87e-6e2563fa3cdd --latest -t gdc-user-token.2018.txt

linux下载GDC-client

wget https://gdc.cancer.gov/files/public/file/gdc-client_v1.6.1_Ubuntu_x64.zip
unzip gdc-client_v1.6.1

参考

comments powered by Disqus