R语言计算tmb值

作者: 柳叶刀与小鼠标 | 来源:发表于2020-12-13 00:04 被阅读0次

tmb值与免疫检查点抑制剂疗效相关,而TCGA数据库中的tmb值可以通过TCGAmutations包来计算


# =================================================================
#   
#   
# 
#   
#   
# =================================================================



rm(list=ls())

setwd("D:\\SCIwork\\F25\\results\\tmb")
# BiocManager::install("PoisonAlien/TCGAmutations")
# TCGAmutations包整合了TCGA中全部样本的maf文件
# devtools::install_github(repo = "PoisonAlien/TCGAmutations")
library(TCGAmutations)

tmp=as.data.frame(tcga_available())

dt <- TCGAmutations::tcga_load(study = "KIRC")

dt <- dt@data

dt1 <- as.data.frame( table(dt$Tumor_Sample_Barcode))

names(dt1) <- c('Barcode', 'Freq')

dt1$tmb <- dt1$Freq/38

names(dt1)
 
 write.csv(dt1, file = 'KIRC_TMB.csv')



相关文章

网友评论

    本文标题:R语言计算tmb值

    本文链接:https://www.haomeiwen.com/subject/nbhugktx.html