肿瘤突变负荷(TMB)计算
之前看文章很多人用perl语言计算TMB值,用R软件的maftools包也可以计算。
perl计算得到的和R的maftool包计算得到的TMB值之间是否存在不同,解螺旋挑圈联靠比较了两组计算方法的TMB值之间的相关性,可以参考:
library(maftools)
laml <- read.maf(maf = "XXX.mutect.maf.gz")
# laml = read.maf("TCGA.STAD.mutect.somatic.maf",clinicalData = 'clinical2.tsv',isTCGA = T)
## -Reading
## -Validating
## -Silent variants: 24377
## -Summarizing
## --Mutiple centers found
## BI;WUGSC;BI;WUGSC--Possible FLAGS among top ten genes:
## TTN
## MUC16
## FLG
## SYNE1
## HMCN1
## USH2A
## -Processing clinical data
## --Missing clinical data
## -Finished in 6.864s elapsed (22.4s cpu)
x = tmb(maf = laml)
head(x)
## Tumor_Sample_Barcode total total_perMB total_perMB_log
## 1: TCGA-29-2436-01A-01D-1526-09 5 0.10 -1.0000000
## 2: TCGA-10-0937-01A-02W-0420-08 6 0.12 -0.9208188
## 3: TCGA-36-2540-01A-01D-1526-09 6 0.12 -0.9208188
## 4: TCGA-10-0928-01A-02W-0420-08 7 0.14 -0.8538720
## 5: TCGA-57-1586-01A-02W-0633-09 7 0.14 -0.8538720
## 6: TCGA-13-0717-01A-01W-0371-08 8 0.16 -0.7958800
x第三列就是TMB值了,可以用四分位数看看tmb值的分布情况:
quantile(x$total_perMB)
## 0% 25% 50% 75% 100%
## 0.10 1.04 1.58 2.60 22.60
不取TMB log值,则设为F
tmb(maf = laml,logScale = F)
## Tumor_Sample_Barcode total total_perMB total_perMB_log
## 1: TCGA-29-2436-01A-01D-1526-09 5 0.10 -1.0000000
## 2: TCGA-10-0937-01A-02W-0420-08 6 0.12 -0.9208188
## 3: TCGA-36-2540-01A-01D-1526-09 6 0.12 -0.9208188
## 4: TCGA-10-0928-01A-02W-0420-08 7 0.14 -0.8538720
## 5: TCGA-57-1586-01A-02W-0633-09 7 0.14 -0.8538720
## ---
## 432: TCGA-24-1431-01A-01D-0472-01 737 14.74 1.1684975
## 433: TCGA-61-2113-01A-01W-0722-08 751 15.02 1.1766699
## 434: TCGA-59-2349-01A-01W-0799-08 754 15.08 1.1784013
## 435: TCGA-20-0991-01A-03D-0428-01 781 15.62 1.1936810
## 436: TCGA-61-2095-01A-01W-0722-08 1130 22.60 1.3541084
收工。