I had a set of 25 genes and I wanted to make a single survival analysis plot of cancer data from TCGA gdc portal expression data. The dataset is divided into genes having high and low expression with the following columns and 407 rows:
patient_ID_ survival_time survival_event sex Gene1 Gene 2 Gene3 Gene 4 Gene5
On Biostar, 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 (http://www.sthda.com/english/wiki/cox-proportional-hazards-model) to follow 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 + sex, 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 how to do it with any other method. Thanks in advance!