| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 
 | x <- readRDS('DEG_filer.rds')tcga_predict <- readRDS('tcga.predict.rds')
 tcga <- readRDS('../../../COXPH/data/PRAD.rds')
 mat <- as.matrix(tcga$data[rownames(x)])
 rownames(mat) <- NULL
 mat <- t(mat)
 rownames(mat) <- NULL
 
 library(circlize)
 library(ComplexHeatmap)
 col_fun <- colorRamp2(
 c(-4, 0, 4),
 c("#99CCCCAA", "white", "#BC3C29AA")
 )
 
 ha <- HeatmapAnnotation(`Risk group` = tcga_predict$group,
 `Risk Score` = tcga_predict$Risk_Score,
 col = list(
 `Risk group` = c("Low Risk" = "#99CCFFAA", 'High Risk' = '#FF6666AA')
 ),
 
 show_annotation_name = TRUE)
 p <- Heatmap(mat, name = 'Relative Expression', top_annotation = ha, column_order = order(tcga_predict$Risk_Score),
 col=col_fun)
 pdf(file = 'C_Heatmap.pdf', width = 8, height = 8);print(p);dev.off()
 
 |