library(utils)
library(estimate)
setwd("E:\\Desktop\\immune score")
OvarianCancerExpr <-read.table(file="normalizeExp.txt",header = T)
filterCommonGenes(input.f="normalizeExp.txt", output.f="genes.gct", id="GeneSymbol")
estimateScore("genes.gct", "estimate_score.gct", platform="affymetrix")
scores=read.table("estimate_score.gct",skip = 2,header = T)
write.csv(scores,"scores-glioma.csv")

setwd("E:\\Desktop\\immune score")
options(stringsAsFactors = F)
rm(list = ls())
exp <- read.table("scores-glioma.txt",header = T,sep = "\t")
time <- read.table("clinical HGG LGG.txt",header = T,sep = "\t")
result<- merge(exp,time,by="ID",all = T)
write.table(result,"merge.txt",sep = "\t",quote = F,row.names = F)
