日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

tcga数据下载_R语言简单学(TCGA数据下载)

發布時間:2024/3/24 编程问答 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 tcga数据下载_R语言简单学(TCGA数据下载) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

提起R語言,貌似很艱難

圖文一結合,傻瓜都能填

一、打開R程序

> chooseCRANmirror()

> BiocManager::install("TCGAbiolinks")

更新

> library(TCGAbiolinks)

library(dplyr)

library(DT)

library(SummarizedExperiment)

以宮頸癌CESC為舉例:不同的癌癥類型只需要替換名稱

downlod clinical step:

> cancer_type="TCGA-CESC"

> clinical

> View(clinical)

> save(clinical,file="CESC_clinical.Rdata")

> write.csv(clinical, file="TCGAbiolinks-CESC-clinical.csv")

download RNA-seq step:

> TCGAbiolinks:::getProjectSummary("TCGA-CESC")

> query

? ? ? ? ? ? ? ? ?legacy = FALSE,?

? ? ? ? ? ? ? ? ?experimental.strategy = "RNA-Seq",?

? ? ? ? ? ? ? ? ?data.category = "Transcriptome Profiling",?

? ? ? ? ? ? ? ? ?data.type = "Gene Expression Quantification",?

? ? ? ? ? ? ? ? ?workflow.type = "HTSeq - Counts")

> GDCdownload(query, method = "api", files.per.chunk = 100)

> expdat

> count_matrix=assay(expdat)

> View(count_matrix)

> write.csv(count_matrix,file = "TCGAbiolinks_CESC_counts.csv")

download RNA-seq FPKM step:

> Expr_df

? ? ? ? ? ? ? ? ? ? ?data.category = "Transcriptome Profiling",

? ? ? ? ? ? ? ? ? ? ?data.type = "Gene Expression Quantification",

? ? ? ? ? ? ? ? ? ? ?workflow.type = "HTSeq - FPKM")

> GDCdownload(Expr_df, method = "api", files.per.chunk = 100)

> expdat_2

> Expr_matrix=assay(expdat_2)

> View(Expr_matrix)

> write.csv(Expr_matrix,file = "TCGAbiolinks_CESC_FPKM.csv")

#下載miRNA數據

? query

? ? ? ? ? ? ? ? ? ? data.category = "Transcriptome Profiling",?

? ? ? ? ? ? ? ? ? ? data.type = "miRNA Expression Quantification",?

? ? ? ? ? ? ? ? ? ? workflow.type = "BCGSC miRNA Profiling")

? GDCdownload(query, method = "api", files.per.chunk = 100)

? expdat

? count_matrix=assay(expdat)

? write.csv(count_matrix,file = paste(cancer_type,"miRNA.csv",sep = "-"))

query.mirna

? ? ? ? ? ? ? ? ? ? ? ? experimental.strategy = "miRNA-Seq",

? ? ? ? ? ? ? ? ? ? ? ? data.category = "Transcriptome Profiling",?

? ? ? ? ? ? ? ? ? ? ? ? data.type = "miRNA Expression Quantification")

GDCdownload(query.mirna)

mirna

? ? ? ? ? ? ? ? ? ? ?save = TRUE,?

? ? ? ? ? ? ? ? ? ? ?save.filename = "mirna.rda")

test

write.csv(mirna,"D:\\R語言工作數據\\TCGA\\mirna.csv")

#下載Copy Number Variation數據

? query

? ? ? ? ? ? ? ? ? ? data.category = "Copy Number Variation",?

? ? ? ? ? ? ? ? ? ? data.type = "Copy Number Segment")

? GDCdownload(query, method = "api", files.per.chunk = 50)

? expdat

? count_matrix=assay(expdat)

? write.csv(count_matrix,file = paste(cancer_type,"Copy-Number-Variation.csv",sep = "-"))

#下載甲基化數據

? query.met

? ? ? ? ? ? ? ? ? ? ? ? legacy = TRUE,

? ? ? ? ? ? ? ? ? ? ? ? data.category = "DNA methylation")

? GDCdownload(query.met, method = "api", files.per.chunk = 300)

? expdat

? count_matrix=assay(expdat)

? write.csv(count_matrix,file = paste(cancer_type,"methylation.csv",sep = "-"))

您若喜歡,別忘記點贊、轉發哦!

長按下方二維碼可關注!

總結

以上是生活随笔為你收集整理的tcga数据下载_R语言简单学(TCGA数据下载)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。