The results showed that the HLA-DPB2 and HLA-DPB1 expression levels have obviously positive associations with the infiltrating abundances of B cells, CD8+ T cells, CD4+ T cells, neutrophils, DCs, Tfh, Th1, macrophages, and NK cells, and with the expression of most biomarkers of B cells, monocytes, NK cells, DCs, T cells, CD8+ T cells, Th1, T-cell exhaustion, and TAMs in BC and its subtype. The gene discussed is CD8A; the disease is breast cancer.