tcga数据下载_使用R下载TCGA数据
除了之前提到的,使用GDC 官方提供的gdc-client.exe對(duì)TCGA數(shù)據(jù)進(jìn)行下載外(TCGA數(shù)據(jù)分析(1)),還可以使用R包對(duì)TCGA數(shù)據(jù)進(jìn)行下載,這個(gè)神奇的R包叫做TCGAbiolinks。
注: 它下載數(shù)據(jù)成功率非常低,官方API中也未推薦,所以這也是我沒用它的原因,但是做出的分析結(jié)果相當(dāng)豐富
01 TCGAbiolinks 安裝與加載
運(yùn)行如下命令即可
if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager")BiocManager::install("TCGAbiolinks")library(TCGAbiolinks)02?TCGA數(shù)據(jù)下載
以下載TCGA-GBM數(shù)據(jù)為例,完全不需要gdc-client.exe的命令行操作,數(shù)據(jù)下載如下
proj?"TCGA-GBM"query project = proj,data.category = "Transcriptome Profiling", data.type = "Gene Expression Quantification", workflow.type = "HTSeq - Counts")GDCdownload(query)data在這一步,你極有可能會(huì)出現(xiàn)以下幾種情況:
2.1 網(wǎng)絡(luò)鏈接超時(shí)
--------------------------------------o GDCquery: Searching in GDC database--------------------------------------Genome of reference: hg38Error in is.response(x) : Timeout was reached: Operation timed out after 10000 milliseconds with 0 out of 0 bytes received或者這種
2.2?Server down
Error in value[[3L]](cond) : GDC server down, try to use this package later2.3 下載成功
也有可能很幸運(yùn),出現(xiàn)了這種,這個(gè)時(shí)候就說明數(shù)據(jù)開始下載了。
--------------------------------------o GDCquery: Searching in GDC database--------------------------------------Genome of reference: hg38--------------------------------------------oo Accessing GDC. This might take a while...--------------------------------------------ooo Project: TCGA-GBM--------------------oo Filtering results--------------------ooo By data.typeooo By workflow.type----------------oo Checking data----------------ooo Check if there are duplicated casesooo Check if there results for the query-------------------o Preparing output-------------------Downloading data for project TCGA-GBMOf the 174 files for download 2 already exist.We will download only those that are missing ones.GDCdownload will download 172 files. A total of 43.787024 MBDownloading as: Fri_Apr_17_22_27_19_2020.tar.gzDownloading: 44 MB03 數(shù)據(jù)下載結(jié)果
下載數(shù)據(jù)的速度還可以,一共有174套數(shù)據(jù),會(huì)下載到當(dāng)前工作目錄下的,這個(gè)文件夾。
TCGA-GBM\harmonized\Transcriptome_Profiling\Gene_Expression_Quantification如果你出現(xiàn)2.1,2.2 的情況怎么辦呢?采用之前gdc-client.exe進(jìn)行下載嘍。為什么會(huì)出現(xiàn)2.1,2.2 的錯(cuò)誤,一方面是自己本身網(wǎng)絡(luò)的問題,可能需要設(shè)置代理才可以訪問并下載數(shù)據(jù),另一方面可能是數(shù)據(jù)庫(kù)不穩(wěn)定。關(guān)于2.2 網(wǎng)上給出了這個(gè)解決方案
devtools::install_github("BioinformaticsFMRP/TCGAbiolinks")注:我試了,依然不行🙇
TCGAbiolinks看起來(lái)真的很香!有機(jī)會(huì)還會(huì)繼續(xù)嘗試。
總結(jié)
以上是生活随笔為你收集整理的tcga数据下载_使用R下载TCGA数据的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 行车助理(江西省) 下载
- 下一篇: laravel 支付宝流程