Functional enrichment analysis revealed that MDD and AD shared some of the common pathways: primary immunodeficiency, cytokine-cytokine receptor interaction, and JAK-STAT signaling pathway, etc. Furthermore, correlation analysis revealed that both IL1R1 and NRG1 expression are significantly associated with neutrophils, endothelial cells, and myeloid dendritic cell infiltrations in AD and MDD. This evidence concerns the gene IL1R1 and inborn error of immunity.