tcga数据下载_使用R下载TCGA数据
生活随笔
收集整理的這篇文章主要介紹了
tcga数据下载_使用R下载TCGA数据
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
除了之前提到的,使用GDC 官方提供的gdc-client.exe對TCGA數據進行下載外(TCGA數據分析(1)),還可以使用R包對TCGA數據進行下載,這個神奇的R包叫做TCGAbiolinks。
注: 它下載數據成功率非常低,官方API中也未推薦,所以這也是我沒用它的原因,但是做出的分析結果相當豐富
01 TCGAbiolinks 安裝與加載
運行如下命令即可
if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager")BiocManager::install("TCGAbiolinks")library(TCGAbiolinks)02?TCGA數據下載
以下載TCGA-GBM數據為例,完全不需要gdc-client.exe的命令行操作,數據下載如下
proj?"TCGA-GBM"query project = proj,data.category = "Transcriptome Profiling", data.type = "Gene Expression Quantification", workflow.type = "HTSeq - Counts")GDCdownload(query)data在這一步,你極有可能會出現以下幾種情況:
2.1 網絡鏈接超時
--------------------------------------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 下載成功
也有可能很幸運,出現了這種,這個時候就說明數據開始下載了。
--------------------------------------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 數據下載結果
下載數據的速度還可以,一共有174套數據,會下載到當前工作目錄下的,這個文件夾。
TCGA-GBM\harmonized\Transcriptome_Profiling\Gene_Expression_Quantification如果你出現2.1,2.2 的情況怎么辦呢?采用之前gdc-client.exe進行下載嘍。為什么會出現2.1,2.2 的錯誤,一方面是自己本身網絡的問題,可能需要設置代理才可以訪問并下載數據,另一方面可能是數據庫不穩定。關于2.2 網上給出了這個解決方案
devtools::install_github("BioinformaticsFMRP/TCGAbiolinks")注:我試了,依然不行🙇
TCGAbiolinks看起來真的很香!有機會還會繼續嘗試。
總結
以上是生活随笔為你收集整理的tcga数据下载_使用R下载TCGA数据的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 行车助理(江西省) 下载
- 下一篇: 鸿蒙系统息屏显示动画,魅族Flyme 9