TCGAbiolinks 下载临床数据

自己安装这个R包TCGAbiolinks点进去安装,下面直接代码

library(TCGAbiolinks)
library(dplyr)
library(DT)
library(SummarizedExperiment)
library("clusterProfiler")
getGDCprojects()$project_id  #获取TCGA中最新的不同癌种的项目号
TCGAbiolinks:::getProjectSummary("TCGA-BRCA")  
query <- GDCquery(project = 'TCGA-BRCA',data.category = 'Clinical',file.type = 'xml')
GDCdownload(query)
clinical <- GDCprepare_clinic(query,clinical.info = 'patient')
write.table(clinical,file="1.txt",sep="\t",quote=F,row.names = T)   

你可能感兴趣的:(TCGA)