The function of BAP1 (BRCA1 associated deubiquitinase 1, Ensembl gene identifier ENSG00000163930) is as follows. Deubiquitinating enzyme that plays a key role in chromatin by mediating deubiquitination of histone H2A and HCFC1 (PubMed:12485996, PubMed:18757409, PubMed:20436459, PubMed:25451922, PubMed:35051358). Catalytic component of the polycomb repressive deubiquitinase (PR-DUB) complex, a complex that specifically mediates deubiquitination of histone H2A monoubiquitinated at 'Lys-120' (H2AK119ub1) (PubMed:20436459, PubMed:25451922, PubMed:30664650, PubMed:35051358). Does not deubiquitinate monoubiquitinated histone H2B (PubMed:20436459, PubMed:30664650). The PR-DUB complex is an epigenetic regulator of gene expression and acts as a transcriptional coactivator, affecting genes involved in development, cell communication, signaling, cell proliferation and cell viability (PubMed:20805357, PubMed:30664650, PubMed:36180891). Antagonizes PRC1 mediated H2AK119ub1 monoubiquitination (PubMed:30664650). As part of the PR-DUB complex, associates with chromatin enriched in histone marks H3K4me1, H3K4me3, and H3K27Ac, but not in H3K27me3 (PubMed:36180891). Recruited to specific gene-regulatory regions by YY1 (PubMed:20805357). Acts as a regulator of cell growth by mediating deubiquitination of HCFC1 N- terminal and C-terminal chains, with some specificity toward 'Lys-48'- linked polyubiquitin chains compared to 'Lys-63'-linked polyubiquitin chains (PubMed:19188440, PubMed:19815555). Deubiquitination of HCFC1 does not lead to increase stability of HCFC1 (PubMed:19188440, PubMed:19815555). Interferes with the BRCA1 and BARD1 heterodimer activity by inhibiting their ability to mediate ubiquitination and autoubiquitination (PubMed:19117993). It however does not mediate deubiquitination of BRCA1 and BARD1 (PubMed:19117993). Able to mediate autodeubiquitination via intramolecular interactions to counteract monoubiquitination at the nuclear localization signal (NLS), thereby protecting it from cytoplasmic sequestration (PubMed:24703950). Negatively regulates epithelial-mesenchymal transition (EMT) of trophoblast stem cells during placental development by regulating genes involved in epithelial cell integrity, cell adhesion and cytoskeletal organization (PubMed:34170818). {ECO:0000269|PubMed:12485996, ECO:0000269|PubMed:18757409, ECO:0000269|PubMed:19117993, ECO:0000269|PubMed:19188440, ECO:0000269|PubMed:19815555, ECO:0000269|PubMed:20436459, ECO:0000269|PubMed:20805357, ECO:0000269|PubMed:24703950, ECO:0000269|PubMed:25451922, ECO:0000269|PubMed:30664650, ECO:0000269|PubMed:34170818, ECO:0000269|PubMed:35051358, ECO:0000269|PubMed:36180891}.