meta$mouth=round(meta$days/30,2)#以month为单位,保留两位小数 2 添加age_group列(分组数据) meta$age_group= ifelse(meta$age_at_index>median(meta$age_at_index),'old','young') 三、分析 Surv()函数输出带有截尾信息的生存时间数据; survfit()函数根据生存时间数据、分组信息,并基于”K-M法“输出...
(is.na(meta$OS.time)|is.na(meta$OS));table(k2)meta=meta[k1&k2,]# 选择有用的列 tmp=data.frame(colnames(meta))meta=meta[,c('sample','OS','OS.time','race.demographic','age_at_initial_pathologic_diagnosis','gender.demographic','tumor_stage.diagnoses')]dim(meta)rownames(meta)<-met...
age=uniq.tumor.kirc.phenotype$age_at_initial_pathologic_diagnosis,status=status,OS=os.time)rownames(interesting.tumor.kirc.data)<-rownames(uniq.tumor.kirc.phenotype)index=pathologic_M%in%c("M0","M1","MX")interesting.tumor.kirc.data=interesting.tumor.kirc.data[index,]plot.interesting.tumor...
meta[(grepl('patient.vital_status',colnames(meta)))] ## patient.race # patient.age_at_initial_pathologic_diagnosis # patient.gender # patient.stage_event.clinical_stage meta=as.data.frame(meta[c('patient.bcr_patient_barcode','patient.vital_status', 'patient.days_to_death','patient.days_to...
status<-status[os.index] uniq.tumor.kirc.phenotype <- uniq.tumor.kirc.phenotype[os.index, ] # 提取感兴趣的表型信息 interesting.tumor.kirc.data <- data.frame(gender = uniq.tumor.kirc.phenotype$gender.demographic, age = uniq.tumor.kirc.phenotype$age_at_initial_pathologic_diagnosis, ...
#pathologic_M的生存曲线,三个分期interesting.tumor.kirc.data<-data.frame(pathologic_M=uniq.tumor.kirc.phenotype$pathologic_M,age=uniq.tumor.kirc.phenotype$age_at_initial_pathologic_diagnosis,status=status,OS=os.time)rownames(interesting.tumor.kirc.data)<-rownames(uniq.tumor.kirc.phenotype)index=path...
library(survival) # 多因素Cox建模res.cox <- coxph(Surv(time, status) ~ age + sex + ph.ecog, data = lung)sum.surv<- summary(res.cox)# 结果提取c_index <- sum.surv$concordancec_index 1.4 Cox模型验证 参考: 一张图搞懂临床预测模型构建方法选择 ...
1 任意一个肿瘤在泛癌中的表达情况 2 任意一个基因在肿瘤和正常组织中的表达情况 3 任意一个基因在肿瘤不同分期,不同性别等临床特性的表达情况 4 任意一个基因在任意一个肿瘤,或肿瘤的某种特征中的生存分析 5 这个数据能做到的太多,只要充分发挥想象力,所有的数据获取方式见文末 首先我们从UCSC Xena数据框...
$event=ifelse(meta$vital_status=='Alive',0,1)table(meta$event)#3 年龄分组(部分样本缺失,考虑可能的影响应该不大)meta$age_at_index[is.na(meta$age_at_index)]<-0meta$age_at_index=as.numeric(meta$age_at_index)meta$age_group=ifelse(meta$age_at_index>median(meta$age_at_index),'older...
The cases were distributed as no specific molecular profile (NSMP; n=34, 73.9%) subtype mainly, microsatellite instability-high (MSI-H; n=7, 15.2%), POLE ultra-mutated (n=3, 6.5%), and copy number high (CNH; n=2, 4.3%). Patients with MSI-H subtype had lower body...