美文网首页试读基因组学
ESTIMATE肿瘤纯度预测

ESTIMATE肿瘤纯度预测

作者: 谢京合_数据分析人 | 来源:发表于2021-05-28 10:40 被阅读0次

肿瘤纯度:是指肿瘤组织中肿瘤细胞所占的比例。
肿瘤组织中除了肿瘤细胞之外还有免疫细胞、基质细胞、间质细胞等非肿瘤细胞,共同影响肿瘤发生发展。
研究显示肿瘤纯度与肿瘤患者的临床特征、基因组表达和生物学特性均显著相关,忽视肿瘤纯度的影响可导致肿瘤基因分型、复发风险及疗效预测等过程产生系统性偏倚。

计算肿瘤纯度用estmate包。
以下是具体教程。

##estimate估计肿瘤的TNM分期,也就是肿瘤的纯度。
##安装estimate包
library(utils)
rforge <- "http://r-forge.r-project.org"
install.packages("estimate", repos=rforge, dependencies=TRUE)

library(estimate)
setwd("E:/8资料/2.干细胞/5.TNM分期")
#dat <- read.table("RNAmatrix_symble.txt", header=TRUE, row.names = 1)
#Error in read.table("RNAmatrix_symble.txt", header = TRUE, row.names = 1) : 
#  'row.names'里不能有重复的名字

dat <- read.table("RNAmatrix_symble.txt", header=TRUE)
rows <- rownames(unique(dat['GeneSymbol']))
dat <- dat[rows,]
rownames(dat) <- dat[,1]
dat <- dat[,-1]
dat[1:4,1:4]
write.table(dat, file="RNAmatrix_symble_noDuplicate.txt", quote=FALSE, sep = "\t")
##打开RNAmatrix_symble_noDuplicate.txt后,将第一列的名字改成GeneSymbol。

filterCommonGenes(input.f= "RNAmatrix_symble_noDuplicate.txt" , output.f="LH_genes.gct",
                  id="GeneSymbol")

estimateScore(input.ds ="LH_genes.gct",output.ds="LH_estimate_score.gct",
              platform="affymetrix")#platform默认是affymetrix。     


#默认就是对所有样本绘制图形
#图形将保存至estimated_purity_plots目录下。
plotPurity(scores="LH_estimate_score.gct",samples="TCGA.A2L6", platform="affymetrix")##只对其中一个样品绘图。
plotPurity(scores="LH_estimate_score.gct", platform="affymetrix")##对所有样品绘图。

#当然我们可以直接对我们最后的结果进行读出并提取我们想要的数据:
scores <- read.table("LH_estimate_score.gct",skip= 2,header = T)
head(scores)              

相关文章

网友评论

    本文标题:ESTIMATE肿瘤纯度预测

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