I had a set of 25 genes and I wanted to make a single survival analysis plot of cancer data from the TCGA GDC Portal expression data. To define high and low in the expression values, I used a survival analysis pipeline and used z-score assigning samples more than 1.96 as high and low to this less than -1.96. Now the dataset is divided into genes having high and low expression with the following columns and 407 rows:
- patient_ID
- survival_time
- survival_event
- gender
- Gene1
- Gene2
- Gene3
- Gene4
- Gene5
Some experts suggest using the multivariate Cox model for many genes. The issue is that I am not able to make a single survival plot of high and low expression genes stratified with male and female as in the attached image. I used this tutorial to follow the Cox model for many genes. Here is the code I used for a set of 5 genes. These 5 genes are column names in the dataset, along with survival time and event. I used the survival package in R for the Cox model.
res.cox <- coxph(Surv(survival_time, event) ~ Gene1 + Gene2 + Gene3 + Gene4 + Gene5 + gender, data =survival_dataset)
Can somebody help me with how I can get a single survival analysis plot of high/low expression of genes stratified with male and female? This means the plot will have 4 curves, male with high and low expressions and females with high and low expressions as in the attached image. Or I will appreciate it if somebody can help to show how to do it with any other method. Thanks in advance