The specific DEGs could act as biomarkers and potential therapeutic targets of depression in cancer comorbidity for future studies through the pathways of IL-17 or histidine metabolism. This evidence concerns the gene IL17A and major depressive disorder.