#因為之前的命令調(diào)用GDCquery_Maf 發(fā)現(xiàn)用不了
#故找到了一些其他的方法,并且自己試著將其弄成了一個表達(dá)矩陣。
#代碼如下
#1、下載加載相應(yīng)的包
install.packages("pacman")
library(pacman)
p_load(TCGAbiolinks,DT,tidyverse)
BiocManager::install("TCGAbiolinks")
library(TCGAbiolinks)
library(tidyverse)
BiocManager::install("maftools")
library(maftools)
library(dplyr)
#
TCGAbiolinks:::getProjectSummary("TCGA-STAD")
#建立查詢
raw<-GDCquery(
? project= "TCGA-STAD",
? data.category = "Simple Nucleotide Variation",
? access = ?"open",
? legacy = FALSE,
? data.type= "Masked Somatic Mutation",
? workflow.type = "Aliquot Ensemble Somatic Variant Merging and Masking"
)
#下載數(shù)據(jù)
GDCdownload(raw)
#獲取數(shù)據(jù)
maf<- GDCprepare(raw)
#讀取數(shù)據(jù)
maf<-maf %>% maftools::read.maf()
#表格化數(shù)據(jù),數(shù)據(jù)會以表格形式出現(xiàn)在右下角viewer里
datatable(getSampleSummary(maf),
? ? ? ? ? filter = 'top',
? ? ? ? ? options = list(scrollX = TRUE , keys = TRUE,?
? ? ? ? ? ? ? ? ? ? ? ? ?pageLength = 5),
? ? ? ? ? rownames = FALSE)
#(以上代碼是看b站一個視頻來的,但是我需要這個表格,根據(jù)自己需求繪制相應(yīng)的樣本的TMB瀑布圖,比較兩個組之間的差異情況)
#把突變數(shù)據(jù)提取成為一個表達(dá)矩陣
a<-datatable(getSampleSummary(maf),
? ? ? ? ? ? ?filter = 'top',
? ? ? ? ? ? ?options = list(scrollX = TRUE , keys = TRUE,?
? ? ? ? ? ? ? ? ? ? ? ? ? ? pageLength = 5),
? ? ? ? ? ? ?rownames = FALSE)
#觀察列表a的結(jié)構(gòu),發(fā)現(xiàn)突變數(shù)據(jù)表達(dá)矩陣在a的x中的data中,提取出來。
STADTMB<-a$x$data
View(STADTMB)
?文章來源:http://www.zghlxwxcb.cn/news/detail-664995.html
#這樣就生成了一個和GDCquery_Maf提取出來的合并了的體細(xì)胞突變數(shù)據(jù)了(應(yīng)該是,自己也沒用GDCquery_Maf 提取出來過??傊梢杂脕碜龊罄m(xù)的分析:比如比較TCGA中構(gòu)建出來的風(fēng)險模型,高低風(fēng)險組之間的TMB情況)文章來源地址http://www.zghlxwxcb.cn/news/detail-664995.html
到了這里,關(guān)于提取TCGA 中體細(xì)胞突變數(shù)據(jù)的表達(dá)矩陣的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!