Immune infiltration revealed elevated activated dendritic cells, mast cells, and myeloid-derived suppressor cells in T2DM samples, with PPP1CA and CTSD correlating significantly with these cell types. Here, CTSD is linked to type 2 diabetes mellitus.