前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >寻找生存分析的最佳基因表达分组阈值

寻找生存分析的最佳基因表达分组阈值

作者头像
生信技能树
发布2019-05-17 13:15:17
1.4K0
发布2019-05-17 13:15:17
举报
文章被收录于专栏:生信技能树生信技能树

文字版是:

Based on the FPKM value of each gene, we classified the patients into two groups and examined their prognoses. In the analysis, we excluded genes with low expression, i.e., those with a median expression among samples less than FPKM 1. The prognosis of each group of patients was examined by Kaplan-Meier survival estimators, and the survival outcomes of the two groups were compared by log-rank tests. To choose the best FPKM cut-offs for grouping the patients most significantly, all FPKM values from the 20th to 80th percentiles were used to group the patients, significant differences in the survival outcomes of the groups were examined and the value yielding the lowest log-rank P value is selected.

得到的K-M图如下:

image-20190516092236980

如果是在 http://www.oncolnc.org/ 出图如下:

代码语言:javascript
复制
a=read.csv('BRCA_10384_50_50.csv')
head(a)
a$event=ifelse(a$Status=='Alive',0,1)
library(survival)
library(survminer)
sfit <- survfit(Surv(Days, event)~Group, data=a) 
ggsurvplot(sfit, conf.int=F, pval=TRUE)

phe=a
phe$time=phe$Days/365

## 批量生存分析 使用  logrank test 方法
mySurv=with(phe,Surv(time, event))
log_rank_p <- lapply(2:8, function(i){
  thr=sort(phe$Expression)[round(nrow(phe)*i/10)]
  phe$group=ifelse(phe$Expression > thr,'high','low') 
  print(table( phe$group ))
  data.survdiff=survdiff(mySurv~group,data=phe)
  p.val = 1 - pchisq(data.survdiff$chisq, length(data.survdiff$n) - 1)
  return(p.val)
}) 
log_rank_p=unlist(log_rank_p)
log_rank_p

i=8
thr=sort(phe$Expression)[round(nrow(phe)*i/10)]
phe$group=ifelse(phe$Expression > thr,'high','low') 
print(table( phe$group ))
sfit <- survfit(Surv(time, event)~group, data=phe) 
ggsurvplot(sfit, conf.int=F, pval=TRUE)
本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2019-05-16,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 生信技能树 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档