The function of HLA-B (major histocompatibility complex, class I, B, ENSG00000234745) is as follows. Antigen-presenting major histocompatibility complex class I (MHCI) molecule. In complex with B2M/beta 2 microglobulin displays primarily viral and tumor-derived peptides on antigen-presenting cells for recognition by alpha-beta T cell receptor (TCR) on HLA-B-restricted CD8-positive T cells, guiding antigen-specific T cell immune response to eliminate infected or transformed cells (PubMed:23209413, PubMed:25808313, PubMed:29531227, PubMed:9620674). May also present self-peptides derived from the signal sequence of secreted or membrane proteins, although T cells specific for these peptides are usually inactivated to prevent autoreactivity (PubMed:18991276, PubMed:7743181). Both the peptide and the MHC molecule are recognized by TCR, the peptide is responsible for the fine specificity of antigen recognition and MHC residues account for the MHC restriction of T cells (PubMed:24600035, PubMed:29531227, PubMed:9620674). Typically presents intracellular peptide antigens of 8 to 13 amino acids that arise from cytosolic proteolysis via constitutive proteasome and IFNG-induced immunoproteasome (PubMed:23209413). Can bind different peptides containing allele-specific binding motifs, which are mainly defined by anchor residues at position 2 and 9 (PubMed:25808313, PubMed:29531227). {ECO:0000269|PubMed:18991276, ECO:0000269|PubMed:23209413, ECO:0000269|PubMed:24600035, ECO:0000269|PubMed:25808313, ECO:0000269|PubMed:29531227, ECO:0000269|PubMed:7743181, ECO:0000269|PubMed:9620674}. Allele B*07:02: Displays peptides sharing a common signature motif, namely a Pro residue at position 2 and mainly a Leu anchor residue at the C-terminus (PubMed:7743181). Presents a long peptide (APRGPHGGAASGL) derived from the cancer-testis antigen CTAG1A/NY-ESO-1, eliciting a polyclonal CD8-positive T cell response against tumor cells (PubMed:29531227). Presents viral epitopes derived from HIV-1 gag-pol (TPQDLNTML) and Nef (RPQVPLRPM) (PubMed:25808313). Presents an immunodominant epitope derived from SARS-CoV-2 N/nucleoprotein (SPRWYFYYL) (PubMed:32887977). Displays self-peptides including a peptide derived from the signal sequence of HLA-DPB1 (APRTVALTA) (PubMed:7743181). {ECO:0000269|PubMed:25808313, ECO:0000269|PubMed:29531227, ECO:0000269|PubMed:32887977, ECO:0000269|PubMed:7743181}. Allele B*08:01: Presents to CD8-positive T cells viral epitopes derived from EBV/HHV-4 EBNA3 (QAKWRLQTL), eliciting cytotoxic T cell response. . Allele B*13:02: Presents multiple HIV-1 epitopes derived from gag (RQANFLGKI, GQMREPRGSDI), nef (RQDILDLWI), gag-pol (RQYDQILIE, GQGQWTYQI) and rev (LQLPPLERL), all having in common a Gln residue at position 2 and mainly hydrophobic amino acids Leu, Ile or Val at the C- terminus. Associated with successful control of HIV-1 infection. . Allele B*18:01: Preferentially presents octameric and nonameric peptides sharing a common motif, namely a Glu at position 2 and Phe or Tyr anchor residues at the C-terminus (PubMed:14978097, PubMed:18991276, PubMed:23749632). Presents an EBV/HHV-4 epitope derived from BZLF1 (SELEIKRY) (PubMed:23749632). May present to CD8- positive T cells an antigenic peptide derived from MAGEA3 (MEVDPIGHLY), triggering an anti-tumor immune response (PubMed:12366779). May display a broad repertoire of self-peptides with a preference for peptides derived from RNA-binding proteins (PubMed:14978097). {ECO:0000269|PubMed:12366779, ECO:0000269|PubMed:14978097, ECO:0000269|PubMed:18991276, ECO:0000269|PubMed:23749632}. Allele B*27:05: Presents to CD8-positive T cells immunodominant viral epitopes derived from HCV POLG (ARMILMTHF), HIV-1 gag (KRWIILGLNK), IAV NP (SRYWAIRTR), SARS-CoV-2 N/nucleoprotein (QRNAPRITF), EBV/HHV-4 EBNA4 (HRCQAIRKK) and EBV/HHV-4 EBNA6 (RRIYDLIEL), conferring longterm protection against viral infection (PubMed:15113903, PubMed:18385228, PubMed:19139562, PubMed:32887977, PubMed:9620674). Can present self-peptides derived from cytosolic and nuclear proteins. All peptides carry an Arg at position 2 (PubMed:1922338). The peptide-bound form interacts with NK cell inhibitory receptor KIR3DL1 and inhibits NK cell activation in a peptide-specific way, being particularly sensitive to the nature of the amino acid side chain at position 8 of the antigenic peptide (PubMed:15657948, PubMed:8879234). KIR3DL1 fails to recognize HLA- B*27:05 in complex with B2M and EBV/HHV-4 EBNA6 (RRIYDLIEL) peptide, which can lead to increased activation of NK cells during infection (PubMed:15657948). May present an altered repertoire of peptides in the absence of TAP1-TAP2 and TAPBPL (PubMed:9620674). {ECO:0000269|PubMed:15113903, ECO:0000269|PubMed:15657948, ECO:0000269|PubMed:18385228, ECO:0000269|PubMed:19139562, ECO:0000269|PubMed:1922338, ECO:0000269|PubMed:8879234, ECO:0000269|PubMed:9620674}. Allele B*40:01: Presents immunodominant viral epitopes derived from EBV/HHV-4 LMP2 (IEDPPFNSL) and SARS-CoV-2 N/nucleoprotein (MEVTPSGTWL), triggering memory CD8-positive T cell response (PubMed:18991276, PubMed:32887977). Displays self-peptides sharing a signature motif, namely a Glu at position 2 and a Leu anchor residue at the C-terminus (PubMed:18991276). {ECO:0000269|PubMed:18991276, ECO:0000269|PubMed:32887977}. Allele B*41:01: Displays self-peptides sharing a signature motif, namely a Glu at position 2 and Ala or Pro anchor residues at the C-terminus. . Allele B*44:02: Presents immunodominant viral epitopes derived from EBV/HHV-4 EBNA4 (VEITPYKPTW) and EBNA6 (AEGGVGWRHW, EENLLDFVRF), triggering memory CD8-positive T cell response (PubMed:18991276, PubMed:9620674). Displays self-peptides sharing a signature motif, namely a Glu at position 2 and Phe, Tyr or Trp anchor residues at the C-terminus (PubMed:18991276). . Allele B*45:01: Displays self-peptides sharing a signature motif, namely a Glu at position 2 and Ala or Pro anchor residues at the C-terminus. . Allele B*46:01: Preferentially presents nonameric peptides sharing a signature motif, namely Ala and Leu at position 2 and Tyr, Phe, Leu, or Met anchor residues at the C-terminus. The peptide-bound form interacts with KIR2DL3 and inhibits NK cell cytotoxic response in a peptide-specific way. . Allele B*47:01: Displays self-peptides sharing a signature motif, namely an Asp at position 2 and Leu or Met anchor residues at the C-terminus. . Allele B*49:01: Displays self-peptides sharing a signature motif, namely a Glu at position 2 and Ile or Val anchor residues at the C-terminus. . Allele B*50:01: Displays self-peptides sharing a signature motif, namely a Glu at position 2 and Ala or Pro anchor residues at the C-terminus. . Allele B*51:01: Presents an octameric HIV-1 epitope derived from gag-pol (TAFTIPSI) to the public TRAV17/TRBV7-3 TCR clonotype, strongly suppressing HIV-1 replication. . Allele B*54:01: Displays peptides sharing a common signature motif, namely a Pro residue at position 2 and Ala anchor residue at the C-terminus. . Allele B*55:01: Displays peptides sharing a common signature motif, namely a Pro residue at position 2 and Ala anchor residue at the C-terminus. . Allele B*56:01: Displays peptides sharing a common signature motif, namely a Pro residue at position 2 and Ala anchor residue at the C-terminus. . Allele B*57:01: The peptide-bound form recognizes KIR3DL1 and inhibits NK cell cytotoxic response. Presents HIV gag peptides (immunodominant KAFSPEVIPMF and subdominant KALGPAATL epitopes) predominantly to CD8-positive T cell clones expressing a TRAV41- containing TCR, triggering HLA-B-restricted T cell responses. {ECO:0000269|PubMed:22020283, ECO:0000269|PubMed:25480565, ECO:0000269|PubMed:34228645}. Allele B*67:01: Displays peptides sharing a common signature motif, namely a Pro residue at position 2 and Leu anchor residue at the C-terminus. .