estimate是根据rnaseq表达计算肿瘤纯度和免疫得分的一个生信软件,为了从rnaseq数据中更好的理解分析TME(tumor micro-environment)。文章在2013年发表于nature community上:
Inferring tumour purity and stromal and immune cell admixture from expression data - PMC (nih.gov)
下面主要介绍用R包计算estimate score和结果分析:
首先需要在Rstudio下载安装包:
library(utils) rforge <- "http://r-forge.r-project.org" install.packages("estimate", repos=rforge, dependencies=TRUE
library(estimate)
in.file <- 'TCGA_LIHC_htseq_counts_gene.txt' #输入文件
outfile2E <- 'ESTIMATE_input.gct' #生成ESTIMATE 的输入文件
filterCommonGenes(input.f= in.file, output.f= outfile2E, id="GeneSymbol")
estimateScore("ESTIMATE_input.gct", "ESTIMATE_score.gct")
plotPurity(scores="ESTIMATE_score.gct", samples="TCGA.LN.A810.01A")
ESTIMATE_score <- read.table("ESTIMATE_score.gct", skip = 2,#前两行跳过
header = TRUE,row.names = 1)
ESTIMATE_score <- ESTIMATE_score[,2:ncol(ESTIMATE_score)]
ESTIMATE_score <-t(ESTIMATE_score)
write.table(ESTIMATE_score,file = "ESTIMATE_score_lihc1.txt",quote = F,sep = "\t")
plotPurity(scores="ESTIMATE_score.gct", samples="TCGA.DD.A4NG.01A", platform="illumina")
得到文件如下:
分别是你的rna表达的sample,计算得到的肿瘤微环境基质得分,免疫得分,estimate得分和肿瘤纯度得分, 最后两列是对应的,estimate score越大,purity越小。
最后附上基质细胞的详解:参考来源