## -------- eval = false,echo = true ------------------------------------------------------------------------------------------------------------------------------------------#if(!quired('pdatk'))Biocmanager :: install('pdatk')## -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------库(PDATK)## ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------# - 创建一些虚拟数据#ASSAY ASSAY1 <-matrix(rnorm(100),nrow = 10,ncol = 10,dimnames = list = list(paste0('gene_',seq_len(10)),paste0('sample_',seq_len(10)))#列和行元数据rowmdata <-dataframe(gene_name = rownames(assay1),id = seq_len(10),row.names = rownames = rownames = rownames(assay1))colmdata colmdata <--dataFrame(sample_name = colnames(assay1),总_survival = sample.int.int(1000,10),os_status = sample(c(0l,1l),10,替换= true),row.names = colnames(assay1)# - - -使用它来构建生存的XPeriment unvexperiment <-sovivalexperiment(assays = simplelist(rna = assay1),rowdata = rowmdata,coldata = colmdata = colmdata,metadata = list = list(a ='some Metadata'),sovival_time ='supperival_time ='themus_survival',event_survival'我们') ## - - - - - - - - - - - - - - - - - - - - - - --------------------------------------------------构建一个摘要的expperiment sumexperiment <-sumparizedExperiment(ASSAYS = SimpleList(RNA = ASSAY1)),rowdata = rowmdata,coldata = colmdata,metadata = list(a ='some meta data'))# - 将其转换为survivalexperiment#use sumexp参数,必须命名为survexperiment <-sumepperiment(sumepperiment = sumepperiment,sumepperiment,sumepperiment,sumepperiment,soverival_time ='thustral_survival',event_occurred ='os_status')## ------------------------------------------------------------------------------------------------------------------------------------- cohortList <- CohortList(list(cohort1=survExperiment, cohort2=survExperiment), mDataTypes=c('rna_seq', 'rna_micro')) ## ----SurvivalModel_constructor------------------------------------------------ set.seed(1987) survModel <- SurvivalModel(survExperiment, randomSeed=1987)