关于X-tile 选择生存曲线的最佳Cut-off

image.png

https://answers.microsoft.com/en-us/windows/forum/windows_8-winapps-appother/net-framework-2050727/7b4a2221-8b9a-4460-9712-c8f5521307dc?auth=1
https://www.microsoft.com/en-us/download/confirmation.aspx?id=6523
https://www.microsoft.com/en-us/download/confirmation.aspx?id=16614

需要下载


image.png

一个是X86 一个是X64

我安装了X64 x-tile 就可以成功安装

image.png
setwd("E:/R_Project/GEO-undermine/GSE53625_fresh_new")
rm(list=ls())
load(file = './Rdata/step5_for_survival.Rdata')
library(survminer)
library(survival)
library(ggplot2)

gene_name<- 'BGN'

match(colnames(exprSet),phe$GSM_ID)
event<- ifelse(phe$`Death at FU`=='yes',0,1)
time<- phe$time
expr_value<- exprSet[gene_name,]

pheno<- data.frame(event=event,time=time,expr_value=expr_value)
write.table(pheno,file = paste0('G:/2019-9-10ESCC_RNA_Seq/',gene_name,'.txt'),sep = '\t',row.names = F)



image.png
按下锁键

根据cutoff 值画生存曲线

if(gene_name%in%row.names(exprSet)){
  phe$group=ifelse(exprSet[gene_name,]>quantile(exprSet[gene_name,],0.7374),'high','low')
  table(phe$group)
  # ggsurvplot(survfit(Surv(time, event)~group, data=phe), conf.int=F, pval=TRUE,
  #            # xlim = c(0,30),
  #            legend.title = gene_name)
  p=ggsurvplot(survfit(Surv(time, event)~group, data = phe), conf.int = F,
               tables.height=0.25,
               pval = TRUE,pval.size=6,font.pval= c(14, "bold", "black"),
               legend.title = gene_name, font.legend= c(14, "plain", "black"),
               # font.main = c(100, "bold", "black"),
               xlim = c(0,72), # present narrower X axis, but not affect
               # survival estimates.
               palette=c("red", "blue"),
               font.x = c(14, "plain", "black"),
               font.y = c(14, "plain", "black"),
               font.tickslab = c(14, "plain", "black"),
               xlab = "Time in months", # customize X axis label.
               break.time.by = 6) # break X axis in time intervals by 500.
  # sfit2<- survfit(Surv(time, event)~group, data=phe_loop)
  tiff(filename = paste0('G:/2019-9-10ESCC_RNA_Seq/Figures/',gene_name,'_log_rank.tiff'),res=600,width = 4000,height = 3000)
  print(p)
  dev.off()
}

你可能感兴趣的:(关于X-tile 选择生存曲线的最佳Cut-off)